1
0
mirror of https://github.com/vitalif/viewvc-4intranet synced 2019-04-16 04:14:59 +03:00

Compare commits

...

16 Commits

Author SHA1 Message Date
cmpilato
a67b467261 Oops. Stick a datestamp in the CHANGES file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.1@1389 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-20 22:15:26 +00:00
cmpilato
5135318425 Tag the 1.0.1 final release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.1@1388 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-20 22:11:36 +00:00
cmpilato
9693f2b981 * CHANGES
Note recent change that uses real modification times for Subversion
  directories in generated tarballs.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1387 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-20 22:08:53 +00:00
cmpilato
69ab22922f Backport fix for issue #250 (r1384) to the 1.0.x branch.
* lib/viewvc.py
  (generate_tarball): Add new (optional) dir_mtime parameter, used to specify
    the modification time of the current directory while generating tarball
    data.  Now, allow empty directories in Subversion tarballs (while
    preserving the "pruning" behavior for CVS tarballs).

* CHANGES
  Note the change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1385 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 20:06:34 +00:00
cmpilato
d422c3abc9 Backport fix for issue #249 (r1382) to the 1.0.x branch.
* lib/query.py
  (main): Add 'rss_href' to the data dictionary so the template
    doesn't freak out.

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1383 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 18:35:29 +00:00
cmpilato
ded0015f5c Backport fix for issue #241 (r1377) to the 1.0.x branch.
* lib/viewvc.py
  (get_file_view_info): Fix an oops which caused some whack URL
    generation for download-as-text links on files whose path has changed
    over time.

* CHANGES
  Update to reflect this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1378 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 15:53:09 +00:00
cmpilato
6232555f79 Backport fix for issue #237 (r1375) to the 1.0.x branch.
* lib/vclib/bincvs/__init__.py
  (_tag_tuple): Return () instead of raising a ValueError for
    single-slot revisions.

* CHANGES
  Update to reflect this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1376 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 15:31:44 +00:00
cmpilato
81fa4ce6fd Syncronize the 1.0.x CHANGES file with recent formatting fixes from trunk.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1369 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-26 15:49:25 +00:00
cmpilato
98378e7560 Backport the patch from r1367 (from issue #239), and not the change in
the CHANGES file.
   
* templates/include/footer.ezt
  Fix an XHTML validation error caused by not closing an <A> tag.

* CHANGES
  Note the bugfix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1368 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-26 15:48:00 +00:00
cmpilato
8da2897df2 Backport r1357 to the 1.0.x release branch. That log message read:
Fix exception on log page when use_pagesize is enabled. Patch from
   Jay Rossiter / Signe <signe@cothlamadh.net> on users' list.
   
   * lib/viewvc.py
     (view_log): call paging() with right arguments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1361 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-18 17:31:55 +00:00
cmpilato
45bca25fbc * CHANGES
Add change for r1357's bugfix.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1359 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-18 17:27:57 +00:00
cmpilato
a54b3bcbbe * lib/viewvc.py
(__version__): Bump to 1.0.1-dev.

* CHANGES
  Give a date for the 1.0.0 release.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1352 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-01 21:20:24 +00:00
cmpilato
2612b3bd0a Merge r1339 from trunk into the 1.0.x branch.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1340 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-20 06:55:11 +00:00
rey4
588f19cb0b Merge trunk revision 1333 into 1.0 branch
* branches/1.0.x


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1336 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-14 14:33:45 +00:00
rey4
6d540deba2 Merge trunk doc updates from 1330 and 1331 onto 1.0 branch
* CHANGES
* INSTALL
* viewvc.org/index.html
* viewvc.org/upgrading.html
* windows/README
* www/index.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1332 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-09 16:09:09 +00:00
cmpilato
9f612d3b29 Branch for 1.0.0 release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1327 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-06 19:53:43 +00:00
11 changed files with 181 additions and 195 deletions

106
CHANGES
View File

@@ -1,53 +1,60 @@
Version 1.0 (not yet released)
Version 1.0.1 (released 20-Jul-2006)
* fix exception on log page when use_pagesize is enabled
* fix an XHTML validation bug in the footer template (issue #239)
* fix handling of single-component CVS revision numbers (issue #237)
* fix bug in download-as-text URL link generation (issue #241)
* fix query.cgi bug, missing 'rss_href' template data item (issue #249)
* no longer omit empty Subversion directories from tarballs (issue #250)
* use actual modification time for Subversion directories in tarballs
Version 1.0 (released 01-May-2006)
* add support for viewing Subversion repositories
* add support for running on MS Windows (2003-Feb-09)
* generate strict XHTML output (2005-Sep-08)
* add support for running on MS Windows
* generate strict XHTML output
* add support for caching by sending "Last-Modified", "Expires",
"ETag", and "Cache-Control" headers (2004-Jun-03)
"ETag", and "Cache-Control" headers
* add support for Mod_Python on Apache 2.x and ASP on IIS
* Several changes to standalone.py:
- -h commandline option to specify hostname for non local use.
- -r commandline option may be repeated to use more than repository
before actually installing ViewCVS.
- New GUI field to test paging.
* add new, better-integrated query interface (2004-Jul-17)
* add integrated RSS feeds (2005-Dec-22)
* add new, better-integrated query interface
* add integrated RSS feeds
* add new "root_as_url_component" option to embed root names as
path components in ViewCVS URLs for a more natural URL scheme
in ViewCVS configurations with multiple repositories.
(2002-Dec-12)
* add new "use_localtime" option to display local times instead of
UTC times (2002-May-06)
* add new "use_localtime" option to display local times instead of UTC times
* add new "root_parents" option to make it possible to add and
remove repositories without modifying the ViewCVS configuration
(2004-Jul-16)
* add new "template_dir" option to facilitate switching between
sets of templates (2005-Feb-08)
* add new "template_dir" option to facilitate switching between sets of
templates
* add new "sort_group_dirs" option to disable grouping of
directories in directory listings (2005-Mar-07)
* add new "port" option to connect to a MySQL database on a nonstandard
port (2005-Dec-22)
directories in directory listings
* add new "port" option to connect to a MySQL database on a nonstandard port
* make "default_root" option optional. When no root is specified,
show a page listing all available repositories (2005-Feb-04)
show a page listing all available repositories
* add "default_file_view" option to make it possible for relative
links and image paths in checked out HTML files to work without
the need for special /*checkout*/ prefixes in URLs. Deprecate
"checkout_magic" option and disable by default (2006-Apr-03)
"checkout_magic" option and disable by default
* add "limit_changes" option to limit number of changed files shown per
commit by default in query results and in the Subversion revision view
* hide CVS "Attic" directories and add simple toggle for showing
dead files in directory listings (2004-Jul-31)
dead files in directory listings
* show Unified, Context and Side-by-side diffs in HTML instead of
in bare text pages (2004-Jun-22)
in bare text pages
* make View/Download links work the same for all file types
(2004-Jan-21)
* add links to tip of selected branch on log page (2005-Oct-03)
* allow use of "Highlight" program for colorizing (2005-Dec-20)
* add links to tip of selected branch on log page
* allow use of "Highlight" program for colorizing
* enable enscript colorizing for more file types
* add sorting arrows for directory views (2004-Jul-21)
* get rid of popup windows for checkout links (2004-Jan-21)
* add sorting arrows for directory views
* get rid of popup windows for checkout links
* obfuscate email addresses in html output by encoding @ symbol
with an HTML character reference (2004-Jul-29)
* add paging capability (2001-Dec-31)
with an HTML character reference
* add paging capability
* Improvements to templates
- add new template authoring guide
- increase coverage, use templates to produce HTML for diff pages,
@@ -56,41 +63,36 @@ Version 1.0 (not yet released)
- add new template variables providing ViewCVS URLs for more
links between related pages and less URL generation inside
templates
* add new [define] EZT directive for assigning variables within
templates (2004-Apr-21)
* add new [define] EZT directive for assigning variables within templates
* add command line argument parsing to install script to allow
non-interactive installs (2005-Jan-06)
* add stricter parameter validation to lower likelihood of CSS
vulnerabilities (2002-May-24)
non-interactive installs
* add stricter parameter validation to lower likelihood of cross-site
scripting vulnerabilities
* add support for cvsweb's "mime_type=text/x-cvsweb-markup" URLs
(2002-Oct-10)
* fix incompatibility with enscript 1.6.3 (2002-Feb-05)
* fix bug in parsing FreeBSD rlog output (2003-Jul-24)
* fix incompatibility with enscript 1.6.3
* fix bug in parsing FreeBSD rlog output
* work around rlog assumption all two digit years in RCS files are
relative to the year 1900. (2005-Sep-30)
relative to the year 1900.
* change loginfo-handler to cope with spaces in filenames and
support a simpler command line invocation from CVS (2003-Feb-11)
* show diff error when comparing two binary files (2002-Jan-23)
* make regular expression search skip binary files (2002-Jan-17)
support a simpler command line invocation from CVS
* make cvsdbadmin work properly when invoked on CVS subdirectory
paths instead of top-level CVS root paths
* show diff error when comparing two binary files
* make regular expression search skip binary files
* make regular expression search skip nonversioned files in CVS
directories instead of choking on them (2002-Sep-27)
directories instead of choking on them
* fix tarball generator so it doesn't include forbidden modules
(2002-Feb-22)
* output "404 Not Found" errors instead of "403 Forbidden" errors
to not reveal whether forbidden paths exist (2005-May-17)
* fix sorting bug in directory view (2002-Apr-18)
to not reveal whether forbidden paths exist
* fix sorting bug in directory view
* reset log and directory page numbers when leaving those pages
(2005-Jan-29)
* reset sort direction in directory listing when clicking new
columns (2004-Jul-21)
* fix "Accept-Language" handling for Netscape 4.x browsers
(2002-May-23)
* fix file descriptor leak in standalone server (2004-Jul-17)
* clean up zombie processes from running enscript (2002-Jun-15)
* fix mysql "Too many connections" error in cvsdbadmin (2003-Jul-24)
* get rid of mxDateTime dependency for query database (2003-Feb-09)
* reset sort direction in directory listing when clicking new columns
* fix "Accept-Language" handling for Netscape 4.x browsers
* fix file descriptor leak in standalone server
* clean up zombie processes from running enscript
* fix mysql "Too many connections" error in cvsdbadmin
* get rid of mxDateTime dependency for query database
* store query database times in UTC instead of local time
(2003-Feb-09)
* fix daylight saving time bugs in various parts of the code
Version 0.9.4 (released 17-Aug-2005)

152
INSTALL
View File

@@ -5,7 +5,7 @@ CONTENTS
APACHE CONFIGURATION
UPGRADING VIEWVC
SQL CHECKIN DATABASE
ENSCRIPT CONFIGURATION
ENSCRIPT AND HIGHLIGHT CONFIGURATION
CVSGRAPH CONFIGURATION
IF YOU HAVE PROBLEMS...
@@ -39,7 +39,7 @@ Congratulations on getting this far. :-)
* a web server capable of running CGI programs
(for example, Apache at http://httpd.apache.org/)
* MySQL to create and query a commit database
* MySQL 3.22 and MySQLdb 0.9.0 or later to create a commit database
(http://www.mysql.com/)
(http://sourceforge.net/projects/mysql-python)
* Enscript, code colorizer
@@ -53,7 +53,7 @@ Congratulations on getting this far. :-)
GUI Operation:
If you just want to see what your CVS repository looks like with
ViewVC, type "./standalone.py -g -r /PATH/TO/CVS/ROOT". This
ViewVC, type "bin/standalone.py -g -r /PATH/TO/CVS/ROOT". This
will start a tiny webserver serving at http://localhost:7467/.
PLEASE NOTE: This requires Python with thread support enabled and
the Tkinter GUI. If you don't have one of these, omit the '-g' option.
@@ -73,32 +73,19 @@ Congratulations on getting this far. :-)
INSTALLING VIEWVC
------------------
1) To get viewvc.cgi to work, make sure that you have Python 1.5 or
greater installed and a webserver which is capable of executing
CGI scripts (either based on the .cgi extension, or by placing the
script within a specific directory).
NOTE: Windows users can refer to windows/README for Windows-specific
installation instructions.
You need to have RCS installed. Specifically, "rlog", "rcsdiff",
and "co". This script was tested against RedHat's rcs-5.7-10.rpm
Someone running HP-UX reported problems, that rcs doesn'nt honour
the setting of $PATH to find the diff utility. Please test, if
"rcsdiff -u" works. If not you might have to recompile RCS.
1) To get viewvc.cgi to work, make sure that you have Python installed
and a webserver which is capable of executing CGI scripts (either
based on the .cgi extension, or by placing the script within a specific
directory).
Note, that the viewvc.cgi script needs to have READ-ONLY, physical
access to the CVS repository (or a copy of it). Therefore, rsh/ssh or
pserver access to the repository will not work.
For the more human readable diff formats you need a modern diff utility.
If you are using Linux, this is no problem. But on commercial unices
you might want to install GNU-diff to be able to use unified or
side-by-side diffs.
If you want to use cvsgraph, you have to obtain and install this
separately. See below. This was tested with cvsgraph-1.5.1.
For the checkin database to work, you will need MySQL >= 3.22,
and the Python DBAPI 2.0 module, MySQLdb. This was tested with
MySQLdb 0.9.1.
Note that to browse CVS repositories, the viewvc.cgi script needs to
have READ-ONLY, physical access to the repository (or a copy of it).
Therefore, rsh/ssh or pserver access to the repository will not work.
And you need to have the RCS utilities installed, specifically "rlog",
"rcsdiff", and "co".
2) Installation is handled by the ./viewvc-install script. Run this
script and you will be prompted for a installation root path.
@@ -152,16 +139,18 @@ INSTALLING VIEWVC
APACHE CONFIGURATION
--------------------
1) Find out where the web server configuration file is kept. On
SuSE Linux it is /etc/httpd/httpd.conf, On RedHat Linux 7.3 it
is /etc/httpd/conf/httpd.conf. On other unices you may look
at /usr/local/etc or /etc/local. Use the vendor documentation
or the find utility, if in doubt.
1) Find out where the web server configuration file is kept. Typical
locations are /etc/httpd/httpd.conf, /etc/httpd/conf/httpd.conf,
and /etc/apache/httpd.conf. Depending on how apache was installed,
you may also look under /usr/local/etc or /etc/local. Use the vendor
documentation or the find utility if in doubt.
Either METHOD A:
2) The ScriptAlias directive is very useful for pointing
directly to the viewvc.cgi script. Simply insert a line containing
ScriptAlias /viewvc <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/viewvc.cgi
into your httpd.conf file. Choose the location in httpd.conf where
also the other ScriptAlias lines reside. Some examples:
@@ -207,11 +196,12 @@ or if you've got Mod_Python installed you can use METHOD D:
continue with step 3).
3) Restart apache. On SuSE Linux this is done using the command
rcapache restart and on RedHat Linux this is done using the command
/sbin/service httpd restart
3) Restart apache. The commands to do this vary. "httpd -k restart" and
"apache -k restart" are two common variants. On RedHat Linux it is
done using the command "/sbin/service httpd restart" and on SuSE Linux
it is done with "rcapache restart"
4) Optional: adding access control:
4) Optional: Add access control.
In your httpd.conf you can control access to certain modules by adding
directives like this:
@@ -224,21 +214,19 @@ or if you've got Mod_Python installed you can use METHOD D:
require valid-user
</Location>
This idea is courtesy to Nick Bauman from http://www.cortexity.com/
If you use access control, it is recommended that you disable the
checkout_magic option so people can't "sneak in" with URLs like
WARNING: If you enable the "checkout_magic" or "allow_tar" options, you
will need to add additional location directives to prevent people
from sneaking in with URLs like:
http://<server_name>/viewvc/*checkout*/<module_name>
http://<server_name>/viewvc/~checkout~/<module_name>
and get access to seeing the file contents.
http://<server_name>/viewvc/<module_name>.tar.gz?view=tar
UPGRADING VIEWVC
-----------------
Please read the file upgrading.html in the website subdirectory or
Please read the file upgrading.html in the viewvc.org/ subdirectory or
at <http://viewvc.org/upgrading.html>.
@@ -252,9 +240,7 @@ database. In fact, the databases are 100% compatible.
Various queries can be performed on the database. After installing ViewVC,
there are some additional steps required to get the database working.
1) You need MySQL >= 3.22, and the Python module MySQLdb 0.9.0 installed.
Python 1.5.2 is REQUIRED by MySQLdb, therefore to use this part of
ViewVC you must be using Python 1.5.2.
1) You need MySQL and MySQLdb (a Python DBAPI 2.0 module) installed.
2) You need to create a MySQL user who has permission to create databases.
Optionally, you can create a second user with read-only access to the
@@ -338,40 +324,26 @@ there are some additional steps required to get the database working.
stays consistent when you change the svn:log, svn:author or
svn:date revision properties.
6) You may want to modify the HTML template file:
<VIEWVC_INSTALLATION_DIRECTORY>/templates/query.ezt
This is used by the query.cgi script to generate part of its HTML output.
At some point the currently hardcoded table output will also vanish.
7) You should be ready to go. Load up the query.cgi script and give
it a try.
6) You should be ready to go. Click one of the "Query revision history"
links in ViewVC directory listings and give it a try.
ENSCRIPT CONFIGURATION
----------------------
ENSCRIPT AND HIGHLIGHT CONFIGURATION
------------------------------------
Enscript is program that can colorize sourcecode of a lot of languages.
Linux distributions like for example SuSE Linux from at least 7.0
up to the recently released 7.3 already contain a precompiled and
configured enscript 1.6.2 package.
Enscript and Highlight are programs that can colorize source code for
a lot of languages. ViewVC can be configured to use either one.
1) Download genscript from http://www.codento.com/people/mtr/genscript/
1) Install Enscript or Highlight using your system's package manager
or downloading from the project home pages.
2) Configure and compile per instructions with enscript.
(I 've not done this, since I'm using the precompiled package
delivered with SuSE Linux)
2) Set the 'use_enscript' or 'use_highlight' options in viewvc.conf to 1.
3) Set the 'use_enscript' option in viewvc.conf to 1.
3) You may also need to set 'enscript_path' and 'highlight_path' options
if the executables are not located on the system PATH.
4) That's it!
5) If you want to colorize exotic languages, you might have to
patch 'lib/viewvc.py' and add a new highlighting file to enscript.
For example, if you are interested in a patch for Modula-2 support,
send mail to pefu@sourceforge.net.
CVSGRAPH CONFIGURATION
----------------------
@@ -380,39 +352,23 @@ CvsGraph is a program that can display a clickable, graphical tree
of files in a CVS repository.
WARNING: Under certain circumstances (many revisions of a file
or many branches or both) cvsgraph can generate very huge images.
or many branches or both) CvsGraph can generate very huge images.
Especially on thin clients these images may crash the Web-Browser.
Currently there is no known way to avoid this behavior of cvsgraph.
Currently there is no known way to avoid this behavior of CvsGraph.
So you have been warned!
Nevertheless cvsgraph can be quite helpful on repositories with
Nevertheless, CvsGraph can be quite helpful on repositories with
a reasonable number of revisions and branches.
1) Install viewvc according to instructions in 'INSTALLING
VIEWVC' section above. The installation directory is where
the 'viewvc-install' script copied and configured the viewvc
programs.
1) Install CvsGraph using your system's package manager or downloading
from the project home page.
2) Download CvsGraph from http://www.akhphd.au.dk/~bertho/cvsgraph/
2) Set the 'use_cvsgraph' options in viewvc.conf to 1.
3) Configure and compile per instructions with CvsGraph. I had
problems with 'configure' finding the gd library. Had to create
a link from libgd.so to libgd.do.4.0.0. On Solaris you might
want to edit the link command line and add the option -R if
you have you libraries at non-standard location.
3) You may also need to set the 'cvsgraph_path' option if the
CvsGraph executable is not located on the system PATH.
4) Place the 'cvsgraph' executable into a directory readable by the
userid running the web server. (default is '/usr/local/bin' if
you simply type 'make install' in the cvsgraph directory).
5) Check the setting of the 'cvsgraph_path' option in viewvc.conf:
/usr/local/bin/ is most often NOT contained in $PATH of the
webserver process (e.g. Apache), so you will have to edit this.
Set the 'use_cvsgraph' option in viewvc.conf to 1.
6) That's it!
7) There is a file <VIEWVC_INSTALLATION_DIRECTORY>/cvsgraph.conf that
4) There is a file <VIEWVC_INSTALLATION_DIRECTORY>/cvsgraph.conf that
you may want to edit if desired to set color and font characteristics.
See the cvsgraph.conf documentation. No edits are required in
cvsgraph.conf for operation with viewvc.
@@ -421,8 +377,8 @@ a reasonable number of revisions and branches.
SUBVERSION INTEGRATION
----------------------
ViewVC now supports browsing of Subversion repositories. To use
ViewVC with Subversion, make sure you have both Subversion itself and
ViewVC supports browsing of Subversion repositories. To use ViewVC
with Subversion, make sure you have both Subversion itself and
the Subversion Python bindings installed. See Subversion's
installation notes for more details on how to build and install these
items.

View File

@@ -403,6 +403,7 @@ def main(server, cfg, viewvc_link):
'query' : query,
'commits' : commits,
'num_commits' : len(commits),
'rss_href' : None,
}
if form_data.hours:

View File

@@ -474,7 +474,7 @@ def _tag_tuple(revision_string):
t = map(int, string.split(revision_string, '.'))
l = len(t)
if l == 1:
raise ValueError
return ()
if l > 2 and t[-2] == 0 and l % 2 == 0:
del t[-2]
return tuple(t)
@@ -670,7 +670,8 @@ def _parse_log_header(fp):
_re_log_info = re.compile(r'^date:\s+([^;]+);'
r'\s+author:\s+([^;]+);'
r'\s+state:\s+([^;]+);'
r'(\s+lines:\s+([0-9\s+-]+))?\n$')
r'(\s+lines:\s+([0-9\s+-]+);?)?'
r'(\s+commitid:\s+([a-zA-Z0-9]+))?\n$')
### _re_rev should be updated to extract the "locked" flag
_re_rev = re.compile(r'^revision\s+([0-9.]+).*')
def _parse_log_entry(fp):

View File

@@ -14,7 +14,7 @@
#
# -----------------------------------------------------------------------
__version__ = '1.0-dev'
__version__ = '1.0.1'
# this comes from our library; measure the startup time
import debug
@@ -272,7 +272,9 @@ class Request:
# If this is using an old-style 'rev' parameter, redirect to new hotness.
# Subversion URLs will now use 'pathrev'; CVS ones use 'revision'.
if self.repos and self.query_dict.has_key('rev'):
if self.roottype == 'svn' and not self.query_dict.has_key('pathrev'):
if self.roottype == 'svn' \
and not self.query_dict.has_key('pathrev') \
and not self.view_func == view_revision:
self.query_dict['pathrev'] = self.query_dict['rev']
del self.query_dict['rev']
else: # elif not self.query_dict.has_key('revision'): ?
@@ -944,7 +946,7 @@ def get_file_view_info(request, where, rev=None, mime_type=None, pathrev=-1):
pathtype=vclib.FILE,
params={'content-type': 'text/plain',
'revision': rev,
'pathrev': rev},
'pathrev': pathrev},
escape=1)
if request.cfg.options.allow_annotate:
annotate_href = request.get_url(view_func=view_annotate,
@@ -2121,7 +2123,7 @@ def view_log(request):
if cfg.options.use_pagesize:
data['log_pagestart'] = int(request.query_dict.get('log_pagestart',0))
data['entries'] = paging(data, 'entries', data['log_pagestart'],
'revision', cfg.options.use_pagesize)
'rev', cfg.options.use_pagesize)
request.server.header()
generate_page(request, "log", data)
@@ -2828,7 +2830,7 @@ def generate_tarball_header(out, name, size=0, mode=None, mtime=0,
out.write(block)
def generate_tarball(out, request, reldir, stack):
def generate_tarball(out, request, reldir, stack, dir_mtime=None):
# get directory info from repository
rep_path = request.path_parts + reldir
entries = request.repos.listdir(rep_path, request.pathrev, {})
@@ -2845,30 +2847,43 @@ def generate_tarball(out, request, reldir, stack):
if reldir:
tar_dir = tar_dir + _path_join(reldir) + '/'
# Subdirectory datestamps will be the youngest of the datestamps of
# version items (files for CVS, files or dirs for Subversion) in
# that subdirectory.
latest_date = 0
cvs = request.roottype == 'cvs'
for file in entries:
# Skip dead or busted CVS files, and CVS subdirs.
if (cvs and (file.kind != vclib.FILE or (file.rev is None or file.dead))):
continue
if file.date > latest_date:
latest_date = file.date
# If our caller doesn't dictate a datestamp to use for the current
# directory, its datestamps will be the youngest of the datestamps
# of versioned items in that subdirectory. We'll be ignoring dead
# or busted items and, in CVS, subdirs.
if dir_mtime is None:
dir_mtime = 0
for file in entries:
if cvs and (file.kind != vclib.FILE or file.rev is None or file.dead):
continue
if file.date > dir_mtime:
dir_mtime = file.date
# push directory onto stack. it will only be included in the tarball if
# files are found underneath it
# Push current directory onto the stack.
stack.append(tar_dir)
# If this is Subversion, we generate a header for this directory
# regardless of its contents. For CVS it will only get into the
# tarball if it has files underneath it, which we determine later.
if not cvs:
generate_tarball_header(out, tar_dir, mtime=dir_mtime)
# Run through the files in this directory, skipping busted ones.
for file in entries:
if (file.kind != vclib.FILE or
(cvs and (file.rev is None or file.dead))):
if file.kind != vclib.FILE:
continue
if cvs and (file.rev is None or file.dead):
continue
for dir in stack:
generate_tarball_header(out, dir, mtime=latest_date)
del stack[:]
# If we get here, we've seen at least one valid file in the
# current directory. For CVS, we need to make sure there are
# directory parents to contain it, so we flush the stack.
if cvs:
for dir in stack:
generate_tarball_header(out, dir, mtime=dir_mtime)
del stack[:]
if cvs:
info = os.stat(file.path)
@@ -2876,7 +2891,8 @@ def generate_tarball(out, request, reldir, stack):
else:
mode = 0644
### read the whole file into memory? bad... better to do 2 passes
### FIXME: Read the whole file into memory? Bad... better to do
### 2 passes.
fp = request.repos.openfile(rep_path + [file.name], request.pathrev)[0]
contents = fp.read()
fp.close()
@@ -2886,21 +2902,22 @@ def generate_tarball(out, request, reldir, stack):
out.write(contents)
out.write('\0' * (511 - ((len(contents) + 511) % 512)))
# recurse into subdirectories
# Recurse into subdirectories, skipping busted ones.
for file in entries:
if file.errors or file.kind != vclib.DIR:
continue
# skip forbidden/hidden directories (top-level only)
# Skip forbidden/hidden directories (top-level only).
if not rep_path:
if (request.cfg.is_forbidden(file.name)
or (cvs and request.cfg.options.hide_cvsroot
and file.name == 'CVSROOT')):
continue
generate_tarball(out, request, reldir + [file.name], stack)
mtime = request.roottype == 'svn' and file.date or None
generate_tarball(out, request, reldir + [file.name], stack, mtime)
# pop directory (if it's being pruned. otherwise stack is already empty)
# Pop the current directory from the stack.
del stack[-1:]
def download_tarball(request):
@@ -2914,6 +2931,8 @@ def download_tarball(request):
sys.stdout.flush()
fp = popen.pipe_cmds([('gzip', '-c', '-n')])
### FIXME: For Subversion repositories, we can get the real mtime of the
### top-level directory here.
generate_tarball(fp, request, [], [])
fp.write('\0' * 1024)

View File

@@ -5,7 +5,7 @@
<table>
<tr>
<td><address>[cfg.general.address]</address></td>
<td style="text-align: right;"><strong><a href="[help_href]">ViewVC Help</strong></td>
<td style="text-align: right;"><strong><a href="[help_href]">ViewVC Help</a></strong></td>
</tr>
<tr>
<td>Powered by <a href="http://viewvc.tigris.org/">ViewVC [vsn]</a></td>

View File

@@ -12,7 +12,7 @@
<th>Jump to revision:</th>
<td>
[jump_rev_hidden_values]
<input type="text" name="rev" value="[rev]" />
<input type="text" name="revision" value="[rev]" />
<input type="submit" value="Go" />
[if-any prev_href]
<a href="[prev_href]"><img src="[docroot]/images/back.png" alt="Previous" width="20" height="22" /></a>[end]

View File

@@ -64,7 +64,7 @@
<li>Individually configurable virtual host support.</li>
<li>Line-based annotation/blame display (<em>CVS only</em>).</li>
<li>Line-based annotation/blame display.</li>
<li>Revision graph capabilities (via integration with <a
href="http://www.akhphd.au.dk/~bertho/cvsgraph/">CvsGraph</a>)
@@ -72,7 +72,8 @@
<li>Syntax highlighting support (via integration with <a
href="http://www.codento.com/people/mtr/genscript/">GNU
enscript</a>).</li>
enscript</a> or
<a href="http://www.andre-simon.de/">Highlight</a>).</li>
<li><a href="http://www.mozilla.org/projects/bonsai/">Bonsai</a>-like
repository query facilities.</li>

View File

@@ -57,28 +57,27 @@
<p>This document describes some of the things that you will need to
consider, change, or handle when upgrading an existing ViewVC
installation to a newer version.</p>
or ViewCVS installation to a newer version.</p>
<p>Upgrading from an ancient version of ViewVC to the latest version
<p>Upgrading from an ancient version to the latest version
isn't necessarily a multi step process. The instructions are only
organized that way. You can certainly upgrade in a single step.</p>
<p>It is always recommended to install the new version in a fresh
directory and to carefully compare the configuration files. A
possible approach is to name the directories
<code>/usr/local/viewcvs-0.6</code>,
<code>/usr/local/viewcvs-0.7</code> and so on and than create a
symbolic link <code>viewcvs</code> pointing to the production
<code>/usr/local/viewvc-1.0</code>,
<code>/usr/local/viewcvs-1.1</code> and so on and than create a
symbolic link <code>viewvc</code> pointing to the production
version. This way you can easily test several versions and switch
back, if your users start to complain. </p>
back if your users start to complain.</p>
</div>
<div class="section">
<h2 id="sec-from-0-9">Upgrading From 0.9</h2>
<h2 id="sec-from-0-9">Upgrading From ViewCVS 0.9</h2>
<p>This section discusses how to upgrade ViewCVS 0.9 to version 1.0 or
a later version of the software.</p>
<p>This section discusses how to upgrade ViewCVS 0.9 to ViewVC 1.0.</p>
<h3>CGI Stubs</h3>
@@ -161,7 +160,7 @@
<h3>Templates</h3>
<p>The templates have changed drastically in this version of ViewVC.
If you are using customized templates from 0.9 or earlier, you want
If you are using customized templates from 0.9 or earlier, you will want
to port your old customizations to the new template files instead of
trying to get the old template files to work with the new ViewVC.</p>
@@ -982,7 +981,7 @@
</div>
<div class="section">
<h2 id="sec-from-0-8">Upgrading From 0.8</h2>
<h2 id="sec-from-0-8">Upgrading From ViewCVS 0.8</h2>
<p>
This section discusses how to upgrade ViewCVS 0.8 to version

View File

@@ -74,7 +74,7 @@ See the sections below for information on setting up optional features and
troubleshooting. From here on <PYTHON_DIR> will stand for the Python root
directory (usually something like C:\Python22) and <VIEWVC_INSTALL_DIR> will
represent the directory where ViewVC has been installed to (default is
C:\Program Files\viewvc-1.0-dev).
C:\Program Files\viewvc-VERSION).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SERVER CONFIGURATION

View File

@@ -18,6 +18,13 @@
<h1>ViewVC &mdash; Web-based Version Control Repository Browsing</h1>
<div class="h2">
<h2>Latest Release</h2>
<p>The most recent release of ViewVC is: <strong>1.0.0-rc1</strong></p>
</div>
<div class="h2">
<h2>What Is ViewVC?</h2>