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

Compare commits

...

105 Commits
1.1.4 ... 1.0.7

Author SHA1 Message Date
cmpilato
6bcf2d3921 Retroactively "peg" the svn:externals property on these tags which
pulls in the 'templates-contrib' area.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.7@2451 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-08 16:51:21 +00:00
cmpilato
c7ec81e4f7 Tag the 1.0.7 final release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/tags/1.0.7@2019 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-14 21:48:19 +00:00
cmpilato
1bc2914f4b Finalize release date for 1.0.7. Need to get this regression fix available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2018 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-14 21:47:06 +00:00
cmpilato
06f6ba27d0 Backport from trunk r2016, whose log message reads thusly:
Fix issue #373: Regression: "as text" view no longer transmits
   Content-type: text/plain header.
   
   * lib/viewvc.py
     (Request.run_viewvc): Add 'text/plain' to the list of content types
       allowed to be specified via the CGI query params.
     (view_checkout): Revert the change from r1978 which caused this to
       ignore the content-type query param; we'll go back to paying
       attention to that, and simply trust that Request.run_viewvc() has
       sanitized it.

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2017 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-10-02 15:57:59 +00:00
cmpilato
6cf12dd9b3 Begin a new release cycle.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2006 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-09-16 19:05:57 +00:00
cmpilato
a234ea1105 Set release date.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@2004 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-09-16 17:47:58 +00:00
cmpilato
fd3db29ade Add missing module import statement.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1995 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-20 19:05:44 +00:00
cmpilato
2e684b109f Fix the import cycle problem with the mod_python stuffs (issue #369).
* bin/mod_python/viewvc.py,
* bin/mod_python/query.py
  Use the 'imp' module and its offerings to load the right 'viewvc'
  and 'query' modules (from the ViewVC lib directory, not from the
  mod_python directory).

* CHANGES
  Note this change.

Patch by: Eygene Ryabinkin <konvpalto {at} tigris.org>,
          me


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1993 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-20 17:44:29 +00:00
cmpilato
39c10d903b * lib/viewvc.py,
* lib/vclib/ccvs/rcsparse/common.py,
* lib/vclib/ccvs/rcsparse/default.py,
* lib/vclib/ccvs/rcsparse/texttools.py,
* lib/blame.py,
* lib/popen.py
  Purge tab characters from code save for in comments where the tabs
  are to be interpreted literally.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1985 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-13 17:48:17 +00:00
cmpilato
25a30fb45f Note recent change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1984 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-13 17:46:29 +00:00
cmpilato
2f1008737a Fix some indentation-based syntax exceptions caused by stray tab
characters.

* lib/blame.py
  (make_html): Do import of vclib.ccvs.blame here, the only place it's
    needed.

* lib/vclib/ccvs/blame.py
  (CVSParser.parse_cvs_file): Replace some stray tab characters with
    spaces.

Found by: Matt Benson <mbenson {at} apache.org>

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1983 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-13 17:33:57 +00:00
cmpilato
e800659377 Update the URL reference in light of r1978 and r1979.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1981 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-07-28 19:26:42 +00:00
cmpilato
f75096b6c6 Backport from trunk r1978:
Finish issue #354: Lose ability to set Content-type via CGI params.
   
   For security purposes (because spoofing Content-type headers can have
   undesirable side effects), no longer recognize 'content-type' CGI
   parameters whose values aren't one of the magic MIME types ViewVC uses
   for its own (non-MIME-type-setting) purposes.
   
   * lib/viewvc.py
     (Request.run_viewvc): Ignore content-type CGI parameters whose
       values aren't one of the magic ViewVC MIME types used to indicate
       that folks want the markup view.
     (view_checkout): No longer consult the query parameters for a MIME type.

Also:

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1979 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-07-28 18:58:46 +00:00
cmpilato
8f28ea0798 Backport from trunk r1896, and note the fix in CHANGES.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1897 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-05-22 17:51:25 +00:00
cmpilato
2a6c68b575 Backport r1888 from trunk:
Fix issue #348 by making the 'co' parser more resilient to multiple
   "special" lines of output.
   
   Previously, output like the following would choke because the code was
   able to deal with the first "special" line (the warning about unknown
   phrases), but then wasn't able to handle the second "special" line
   (about no side branches).
   
      $ co -pTAG_NAME /cvs/repos/some-file,v
      /cvs/repos/some-file,v  -->  standard output
      co: /cvs/repos/some-file,v: warning: Unknown phrases like `commitid ...;' are present.
      co: /cvs/repos/some-file,v: no side branches present for 1.1
   
   If either of these lines had been the only special ones, stuff worked
   fine.  But in concert, it all fell apart.
   
   * lib/vclib/ccvs/bincvs.py
     (_parse_co_header): Use a line-reading loop instead of trying to
       expect certain output on specific lines.
   
   Verified by: Ross Becker <ross {at} trapezenetworks.com>

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1889 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-05-14 17:11:30 +00:00
cmpilato
b1becd4c33 Add CHANGES item for recent bugfix.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1885 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-05-12 18:56:17 +00:00
cmpilato
e3514e6a3d Merge from trunk r1882 and r1883, fixing issue #346 on the 1.0.x line
(though perhaps not entirely, if use_rcsparse is set).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1884 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-05-12 18:52:13 +00:00
cmpilato
2337c9be23 Ahh ... begin the cycle anew ...
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1826 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 15:39:54 +00:00
cmpilato
d803878191 Update to use new name of the license file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1824 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 15:19:35 +00:00
cmpilato
269f2087b4 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1823 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 15:18:12 +00:00
cmpilato
220af43401 * lib/viewvc.py
(_get_svn_location): Doh!  Return the parts we calculated.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1822 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-27 01:49:57 +00:00
cmpilato
de7782a53a Avoid errors caused by invoking the Subversion command-line client by
a userid that a) has no ~/.subversion area and b) can't create one
(due to lack of permissions).

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): Use a read-only temporary directory for
    Subversion's runtime configuration directory.
  (BlameSource.__del__): New (deletes the temporary directory).

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1821 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-27 01:06:58 +00:00
cmpilato
d177c057b0 Security fixes for remote Subversion repositories.
* lib/vclib/svn_ra/__init__.py
  (LogCollector.add_log): Record copyfrom info.

* lib/viewvc.py
  (view_log): Implement a cache of path-forbiddenness check results,
    and combine a pair of similarly conditioned blocks.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1820 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-25 21:48:27 +00:00
cmpilato
65a68936e7 Type fix.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1819 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-25 21:24:16 +00:00
cmpilato
1c613a947f Make 'forbiddenre' significantly more powerful by allowing folks to
distinguish between file and directory paths.

* viewvc.conf.dist
  (forbiddenre): Update documentation to note that directory paths
    will contains trailing slashes, and provide a related example.

* lib/config.py
  (is_forbidden): If using the 'forbiddenre' option, test directory
    paths only after appending a trailing forward slash.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1817 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-25 20:47:24 +00:00
cmpilato
da5b54e95d Fix the plus/minus line change counting in query results to ignore
values from unreadable files.

* lib/viewvc.py
  (build_commit): Calculate total plus/minus line change count for a
    given commit item (based on the sums of those values in
    non-forbidden file commits associated with it).
  (view_query): Update plus/minus line change count totals only
    *after* trimming unauthorized files

* docs/template-authoring-guide.html
  (query_results): Note new commits.plus and commits.minus items; fix
    description of the plus_count and minus_count items.

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1815 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-25 19:21:08 +00:00
cmpilato
4e27b4f06b Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1814 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-22 15:11:30 +00:00
cmpilato
88c95433f2 Security fix: block access to forbidden paths via the p1 and p2 diff
view parameters.

* lib/viewvc.py
  (_get_svn_location): New, abstracted -- and tweaked to do
    forbiddenness checks -- from _get_diff_path_parts().
  (_get_diff_path_parts): Now use _get_svn_location().

* CHANGES
  Record these changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1811 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-22 13:01:25 +00:00
cmpilato
4db1ef6d19 * templates/error.ezt
Bring up-to-date with trunk's version, only showing tracebacks when no
  human-friendly message is provided in the error, and restoring the
  workaround for older IE versions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1810 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-22 13:01:11 +00:00
cmpilato
2af50a5f27 Security fixes: strip forbidden changed paths in the Subversion
revision view, and don't traverse log history into forbidden locations.

* lib/viewvc.py
  (view_revision): Filter out changes whose paths are forbidden, and
    make copies from unreadable sources look like regular adds (without
    history).

* lib/viewvc.py
  (view_log): When traversing log history on Subversion objects, if
    the object was copied from a forbidden location, make it appear to
    be a regular add (without history) and stop traversing history.

* CHANGES
  Record these changes.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1809 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-22 02:01:09 +00:00
cmpilato
f4f3459c8e Merge from trunk r1806, whose log message read thusly:
Honor hide_cvsroot more like the CVSROOT is forbidden than simply obscured.

   * lib/viewvc.py
     (is_cvsroot_path): New helper function.
     (view_directory, generate_tarball, build_commit): Use is_cvsroot_path().

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1807 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-21 21:49:34 +00:00
cmpilato
ec081f5d8e Backport (sorta) the "forbiddenre" support from trunk.
* lib/config.py
  (Config._force_multi_value): Add 'forbiddenre' to the list.
  (Config.is_forbidden): Now accept 'root_and_path' instead of just a
    module name.  Also, accept 'pathkind'.  Finally, support the new
    'forbiddenre' as a superceding configuration decision over
    'forbidden' (the support for which has been tweaked to deal with
    the new function input).

* lib/viewvc.py
  (Request.run_viewvc, view_directory, generate_tarball, build_commit): 
    Update calls to cfg.is_forbidden(), now calling for files and
    directories (of all depths).

* lib/query.py
  (build_commit): Update calls to cfg.is_forbidden(), now calling for
    files and directories (of all depths).

* viewvc.conf.dist
  Document the new 'forbiddenre' configuration parameter.

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1802 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-21 20:05:57 +00:00
cmpilato
e0eb1f6331 Note recent changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1801 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-21 19:24:47 +00:00
cmpilato
94ba398034 On the 1.0.x branch:
Fix buglets (and minor security leak) related to the files attached
to commit items in the query view and query.cgi script results.  These
views still returned commit objects with all attached metadata even
when all the files associated with that commit were blocked due to
configured forbiddenness.  The generic query.ezt template masked this
bug (because it was keyed on the files more so than on the commit
items), but query_results.ezt revealed it.  Also, we were doing change
limiting at the wrong time, so you'd get results that showed 2 files
but read "Only first 5 files shown...".

* lib/viewvc.py
  (build_commit): Trade the 'limited_files' parameter for a
    'max_files' parameter, and change the way file counting and
    filtering happens so we get accurate file counts and the maximum
    number of allowed files when limiting changes.  Now returns None
    if the would-be-returned commit item has no associated allowed
    files, and defers building of the commit item until necessary.
  (view_query): Don't do file limiting here, defer it to
    build_commit().  Also, watch for (and ignore) None returns from
    build_commit(), too.

* lib/query.py
  (run_query): Strip out commits which have no associated files.
    Since commits in the query view are file-driven, the only way we
    could have a commit that has no files is if the files were
    stripped by forbiddenness checks.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1800 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-21 19:08:34 +00:00
cmpilato
7e250b8f24 Record recent changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1782 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 15:41:47 +00:00
cmpilato
64eb245377 Entity-escape RSS descriptions, and wrap them in <pre> tags.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1781 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 15:40:26 +00:00
cmpilato
d3092409b2 Merge r1779 from trunk, whose log message read thusly:
Finish issue #238 by not making HTML out of short log messages in RSS
   format mode.
   
   * lib/viewvc.py
     (format_log): Now accept optional 'htmlize' parameter.
     (build_commit): Accept 'format' parameter, and use it to determine
       what value to pass for the 'htmlize' parameter of an updated call
       to format_log().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1780 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 15:37:30 +00:00
cmpilato
652dc5b571 Backport trunk's r1765, in which we recommend adding ViewVC to robots.txt.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1766 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-07 02:21:46 +00:00
cmpilato
d04cdeca8c Backport from trunk r1706:
Prevent Exception when generating tarballs for remote Subversion
   repositories.
   
   * lib/vclib/svn_ra/__init__.py
     (SelfCleanFP.read): Add default parameter value for 'len' argument.
   
   Patch by: Ceri Storey <cez@necrofish.org.uk>

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1707 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-09-14 13:05:57 +00:00
cmpilato
480eb1a1f7 Merge from trunk to the 1.0.x release branch r1695, whose log message
read thusly:

   Finish issue #306 - RSS content type should be more specific.
   
   * lib/viewvc.py
     (view_query): Use "application/rss+xml" instead "text/xml" for 
       the RSS feed output stream's content type.  Suggested by 
       Phil Ringnalda <philringnalda@tigris.org>.

Also:

* CHANGES
  Note the change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1696 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-09 18:20:20 +00:00
cmpilato
e477c03157 * viewvc-install
(TREE_LIST): Install the contributed templates, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1645 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-03 18:03:36 +00:00
cmpilato
b4d5c1d9d6 * CHANGES
Note the fix from r1628.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1629 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-26 19:39:10 +00:00
cmpilato
8e1eb9be9a * bin/loginfo-handler
(Cvs1Dot12ArgParse): Handle the imported sources case, too.  Thanks to
    Mark Keisler <mark@mitsein.net> for pointing this out in IRC today.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1628 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-26 19:38:35 +00:00
cmpilato
cb1bf2a45b Add an externals definition which pulls in contributed template sets
for ViewVC 1.0.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1622 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-25 19:43:27 +00:00
cmpilato
60ae172120 Backport from trunk r1605, whose log message read thusly:
Finish issue #287 by ensuring that in a clash of root names, the
   first-listed, cvs_roots-found, CVS repository wins.
   
   * lib/query.py
     (run_query): Ensure that in a rootname clash situation, the CVS
       repository wins.
   
   * lib/viewvc.py
     (list_roots): Ensure that in a rootname clash situation, the CVS
       repository wins.

Also:

* CHANGES
  Note this fix.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1606 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-13 09:16:46 +00:00
cmpilato
f029071eae Merge from trunk r1596-1599, which is bunch of license-related juggling.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1601 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 18:39:52 +00:00
cmpilato
fa95ce8b08 Delete the svn:mergeinfo property.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1600 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 18:33:06 +00:00
cmpilato
3a415a308e Update make-release script with latest from trunk.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1596 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:45:21 +00:00
cmpilato
627e506a76 Copy notes directory from trunk.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1595 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:44:58 +00:00
cmpilato
267ea727a0 Update license-1.html file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1594 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:43:07 +00:00
cmpilato
965e1cfaff Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1593 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:38:34 +00:00
cmpilato
3ffe822b0c Do some documentation and website reorg and purging.
* docs
  New.

* www
* viewcvs.sourceforge.net
  Removed.

* viewvc.org/url-reference.html
* viewvc.org/upgrading.html
* viewvc.org/template-authoring-guide.html
  Move these...

* docs/url-reference.html
* docs/upgrading-howto.html
* docs/template-authoring-guide.html
  ...to here.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1587 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 07:20:02 +00:00
cmpilato
e6de1376bc Begin a new release cycle.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1583 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 06:49:34 +00:00
cmpilato
3f09d2e039 Nail down a release date for 1.0.4.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1581 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 06:14:58 +00:00
cmpilato
ef501bd217 Backport from trunk r1579, whose log message read thusly:
(Hopefully) really finish issue #262 by enabling auto-commit in CVSdb SQL.
   
   * lib/cvsdb.py
     (CheckinDatabase.Connect): Issue "SET AUTOCOMMIT=1" so that InnoDB
       databases automatically commit changes made to the database.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1580 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 06:02:20 +00:00
cmpilato
e0342ff46e Backport from trunk r1486, whose lead message read thusly:
Prep PyFontify.py for Python 2.6 readiness, and make it stop giving
   the following warning in Python 2.5:
   
      Warning: 'with' will become a reserved keyword in Python 2.6
   
   Reported by: Philip M. Gollucci <pgollucci@p6m7g8.com>
   
   * lib/PyFontify.py
     (replace): Removed.  Callers now use string.replace().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1578 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 05:13:04 +00:00
cmpilato
d3210a1fec * templates/include/diff_form.ezt,
* templates/include/pathrev_form.ezt
  Fix various XHTML validation errors.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1576 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 05:01:22 +00:00
cmpilato
2ba682c141 * viewvc.conf.dist
(allow_tar): Move this to be closer to other allowed-view options.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1575 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-09 14:04:48 +00:00
cmpilato
6f67d8874a Backport from trunk r1573, whose log message read thusly:
Finish issue #180 - Query results cache staleness under mod_python

   Remove the code which attempts to cache database connection wrapper
   objects.  That was useful long ago when the ViewVC code was sloppier,
   but now the database handles get passed around in the call stack, so
   there's a 1-to-1 mapping of ViewVC process to database connection.
   The cache is, therefore, entirely unnecessary (and is causing
   problems, in fact, for mod_python users).
   
   * lib/cvsdb.py
     (gCheckinDatabase, gCheckinDatabaseReadOnly): Remove.
     (ConnectDatabase): Add 'readonly' optional parameter.  Don't try to
       play the connection caching game any more -- nobody cares.
     (ConnectDatabaseReadOnly): Reimplement as a wrapper around 
       ConnectDatabase().

Also:

* CHANGES
  Note this fix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1574 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-09 13:50:54 +00:00
cmpilato
88ef87c6af Backport to 1.0.x r1568 from trunk, which fixes some XHTML validation bugs.
* templates/include/footer.ezt,
* templates/include/header.ezt
  Fix the bugs ...

* CHANGES
  ... and note the fixes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1571 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-06 16:53:06 +00:00
cmpilato
dae7542569 Backport to 1.0.x r1569 from trunk, whose log message read thusly:
Finish issue #296 - Query links for SVN deletions produce bad links.

   * lib/viewvc.py
     (build_commit): Rework the view URLs so that, for Subversion, URLs
       related to deleted paths point to the previous revision.  And don't
       bother generating diff URLs for adds and removes -- only changes.

Also:

* CHANGES
  Note this fix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1570 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-06 16:48:25 +00:00
cmpilato
ea28160e45 * lib/viewvc.py
(redirect_pathrev): Automagically transform bogus input into,
    essentially, "HEAD".

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1567 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-04 03:07:46 +00:00
cmpilato
384d0dc1a6 * viewvc-install
(install_file): Use os.sep instead of '/' as the trailing slash in the
    "created" stdout line.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1565 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-02 19:37:07 +00:00
cmpilato
95927627b2 Backport from trunk r1561, which fixes bugs in viewvc-install's
ability to handle existing directories (and other filesystem errors)
on Windows.

* viewvc-install
  (install_file): Test e.errno instead of e[0], because on Windows, a
    Windows-specific subclass of OSError (WindowsError) is raised, and the
    first item of its tuple representation is the Windows-specific
    error code.  But e.errno seems always to hold the OS-independent
    error value.

* CHANGES
  Note this fix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1562 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-02 16:35:03 +00:00
cmpilato
d95ceab8a3 * lib/viewvc.py
Backport bugfix from trunk@r1559.

* CHANGES
  Note the change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1560 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-02 13:28:38 +00:00
cmpilato
1aff68d647 On the 1.0.x branch: backport from trunk r1557, which updates the URL
for the Python for Windows Extensions, and appends exception string
information which suggests they might be missing when failing to
import them.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1558 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-02 12:43:08 +00:00
cmpilato
4a3e55dac7 * INSTALL
(SECURITY INFORMATION): New section (copied from trunk).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1555 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-29 02:08:15 +00:00
cmpilato
171fadee27 * lib/viewvc.py
(view_markup): Raise an exception if the markup view is disable via
    runtime configuration

* CHANGES
  Note this fix.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1548 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-27 20:29:46 +00:00
cmpilato
bef839ab4e Backport to the 1.0.x branch r1344, which fixes a logic error that
broke EZT substitution pattern handling.

* lib/ezt.py
  (_write_value): Fix indentation / logic error.

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1541 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-16 05:06:58 +00:00
cmpilato
6647de80c3 Backport applicable portions of r1539 from trunk to the 1.0.x branch.
* lib/viewvc.py
  (_orig_path, view_directory, view_revision, setup_diff): Catch
    vclib.InvalidRevision exceptions from repos._getrev(), and
    re-throw them as ViewVCExceptions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1540 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-12 15:10:25 +00:00
cmpilato
99e1a51e20 Update the INSTALL file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1522 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-26 17:25:02 +00:00
cmpilato
c25dd8c213 * bin/loginfo-handler
Backport to the viewvc-1.0.x branch trunk revisions r1517 and r1518, which
  fix a buglet in the CVS 1.12 argument parsing and stdin consumption.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1519 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 19:54:33 +00:00
cmpilato
6cc6bde99f Backport to the viewvc-1.0.x branch the fix for issue #12, committed
in r1507 with the following log message:

   Finish issue #12 -- Long paths in tarballs get truncated.
   
   Use a GNU tar extension when path names longer than 100 characters are
   being packaged in our tarball output.  
   
   Patch by: Klaus Rennecke <marion@users.sourceforge.net>
   
   I tested this on a Solaris box that had both the native tar program
   and GNU tar.  Without the patch, but the native and GNU tar programs
   created files with truncated filenames.  With the patch, GNU tar worked as
   expected; the native tar program created a '././@LongLink' file
   whose contents were the long path, and additionally created the
   file with the truncated path.
   
   * lib/viewvc.py
     (generate_tarball_header): For paths longer than 100 characters, use
       a GNU tar extension which allows arbitrary path links.  Also, fix
       the "version" header item to be '00', not \0.
       
   * templates/include/dir_footer.ezt
     Change the "download tarball" link text to indicate that we are
     now generating GNU tarballs.

Additionally:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1508 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 15:40:08 +00:00
cmpilato
d4c351e01f Backport to 1.0.x the fix for issue #262 (svndbadmin doesn't commit
data to MySQL InnoDB tables), committed to trunk in r1500.

* lib/cvsdb.py
  (CheckinDatabase.AddCommit): Set plus_count and minus_count
    explicitly to '0', which seems to be required for some folks'
    MySQL installations.

* bin/make-database
  Explicitly declare that we want tables of type "MyISAM".

Also:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1501 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-05 23:10:03 +00:00
cmpilato
7a5a7cfb69 Backport to viewvc-1.0.x the latest and greatest viewvc-install, which
brings the ability to be run from an arbitrary location, and vastly
improves the output.

* viewvc-install
  Bring into sync with trunk as of r1488.

* CHANGES
  Note these changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1489 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-20 18:14:51 +00:00
cmpilato
38b429220e Backport to the 1.0.x branch from trunk revisions 1345 and 1463:1465,
which fix issues 151 and 257, respectively.

Also:

* CHANGES
  Note these changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1466 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-02 04:00:47 +00:00
cmpilato
f42e157e88 Backport to 1.0.x r1456, whose log message ran thusly:
Finish issue #266 -- Query result shows file names with @ as email
   addresses.
   
   The ultimate problem here was that email address recognition banks on
   the final component of addresses "server" only have 2-4 characters in
   it.  But the query code was doing a little more here than necessary
   anyway, mistakenly using htmlify() instead of its subset, server.escape().
   
   * lib/viewvc.py
     (view_query, english_query, build_commit): Use
       request.server.escape() instead of its superset, htmlify(), to
       format stuff that needs to be HTML-escaped, but doesn't
       necessarily need to try to recognize URLs and email addresses.

Additionally:

 * CHANGES
   Add a change item to reflect this fix.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1457 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-18 01:18:14 +00:00
cmpilato
4312ecd3fa * CHANGES
Finalize 1.0.3 changes list.  Begin a new section for 1.0.4.

* lib/viewvc.py
  (__version__): Bump to 1.0.4-dev.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1448 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 20:31:49 +00:00
cmpilato
504ca48e0f Dictate UTF-8 as the output character set for all ViewVC template-driven
views.  

NOTE: This is a security-related fix.

* lib/sapi.py
  (CgiServer.header, ModPythonServer.header): Add "; charset=UTF-8" to
    the Content-type header in ViewVC output.
  (AspServer.header): If no content type is specified, set the content
    type to 'text/html; charset=UTF-8'.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1446 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 20:18:34 +00:00
cmpilato
0c0ec82ca2 Merge r1443 and r1444 from trunk, which were follow-ups to the issue
#265 fix backported to the 1.0.x branch in r1441.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1445 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 20:01:02 +00:00
cmpilato
58a237b14c Backport to the 1.0.x branch r1440, whose log message read thusly:
Finish issue #265 - ViewVC shows wrong path for items deleted from a
                       parent dir copied in the same revision
   
   * lib/vclib/svn/__init__.py
     (ChangedPathSet): Remove.
     (get_revision_info): Stop using the streamy callback reporting form
       of repos.ChangeCollector(), because its got some ... deficiencies.

Additionally:

* CHANGES
  Create a new 1.0.3 section, and note the above change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1441 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 16:25:48 +00:00
cmpilato
24d1a691dc Update some branch files post-release.
* lib/viewvc.py
  (__version__): Bump for next release cycle.

* CHANGES
  Commit finalized date.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1435 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-09-29 16:56:51 +00:00
cmpilato
51011abec8 Backport to the 1.0.x branch r1428 from trunk, whose log message read
thusly:

   Update the PHP CGI hack and add a comment to the config file pointing
   out the CLI/CGI distinction. Thanks to Mark <mark@mitsein.net> and
   Brian G. Peterson <brian@braverock.com> for bringing this issue up
   on the users' list.
   
   * lib/viewvc.py
     (markup_stream_php): update the cgi hack
   
   * viewvc.conf.dist
     (utilities.php): add comment

Additionally:

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1429 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-09-28 01:13:36 +00:00
cmpilato
0bbe7f5751 Port r1422 to the 1.0.x branch.
* lib/viewvc.py
  (view_markup): Correct the syntax highlighter choosing logic.

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1423 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-16 16:32:09 +00:00
cmpilato
1df169ab24 Backport r1416 to the 1.0.x branch.
* lib/vclib/svn/__init__.py
  (BlameSource.__init__):  Pass the --non-interactive flag to 'svn blame'
    so it doesn't wedge when cache authstuffs aren't available or sufficient.

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1419 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 18:17:39 +00:00
cmpilato
98e7612420 Backport fix for issue #245 (r1417) to the 1.0.x branch.
* lib/viewvc.py
  (build_commit): If the environment variable HTTPS is set to "on", then
    construct the rss_url data dictionary item with an "https" method instead
    of an "http" one.

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1418 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 18:15:32 +00:00
cmpilato
70b0076d88 Backport fix for issue #208 (r1414) to the 1.0.x branch.
* lib/blame.py
  (link_includes): Calculate include paths in such a way that '.' is
    dropped and '..' is normalized.  This should prevent us from
    sending paths through Subversion's APIs that aren't legal (and
    cause assertions to fire).

* CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1415 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 16:48:48 +00:00
cmpilato
e23b88d389 * CHANGES
Update with recent fixes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1398 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-21 09:51:27 +00:00
cmpilato
336ee6b95d Backport to the 1.0.x branch r1396, whose log message readly thusly:
Fix issue #18 (Annotate not working in windows for subversion).
   Thanks to Hernán Martínez Foffani <hernan.martinez@ecc.es> for testing
   this patch on Windows.
   
   * lib/vclib/svn/__init__.py
     (BlameSource.__init__): Patch up the URLs passed to 'svn blame' on
       systems that don't use forward-slashes for path separators.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1397 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-21 09:51:13 +00:00
cmpilato
642130cf93 Merge the corrections to the INSTALL file made in r1386 to the 1.0.x branch.
Wish I'd remembered to do this *before* rolling 1.0.1...

* INSTALL
  Tweaky, tweaky...


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1395 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-21 09:40:36 +00:00
cmpilato
1e3c57f2e0 * lib/viewvc.py
(__version__): Bump to 1.0.2-dev.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/1.0.x@1393 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-21 01:04:12 +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
51 changed files with 2067 additions and 1374 deletions

167
CHANGES
View File

@@ -1,53 +1,121 @@
Version 1.0 (not yet released)
Version 1.0.7 (released 14-Oct-2008)
* fix regression in the 'as text' download view (issue #373)
Version 1.0.6 (released 16-Sep-2008)
* security fix: ignore arbitrary user-provided MIME types (issue #354)
* fix bug in regexp search filter when used with sticky tag (issue #346)
* fix bug in handling of certain 'co' output (issue #348)
* fix regexp search filter template bug
* fix annotate code syntax error
* fix mod_python import cycle (issue #369)
Version 1.0.5 (released 28-Feb-2008)
* security fix: omit commits of all-forbidden files from query results
* security fix: disallow direct URL navigation to hidden CVSROOT folder
* security fix: strip forbidden paths from revision view
* security fix: don't traverse log history thru forbidden locations
* security fix: honor forbiddenness via diff view path parameters
* new 'forbiddenre' regexp-based path authorization feature
* fix root name conflict resolution inconsistencies (issue #287)
* fix an oversight in the CVS 1.12.9 loginfo-handler support
* fix RSS feed content type to be more specific (issue #306)
* fix entity escaping problems in RSS feed data (issue #238)
* fix bug in tarball generation for remote Subversion repositories
* fix query interface file-count-limiting logic
* fix query results plus/minus count to ignore forbidden files
* fix blame error caused by 'svn' unable to create runtime config dir
Version 1.0.4 (released 10-Apr-2007)
* fix some markup bugs in query views (issue #266)
* fix loginfo-handler's support for CVS 1.12.9 (issues #151, #257)
* make viewvc-install able to run from an arbitrary location
* update viewvc-install's output for readability
* fix bug writing commits to non-MyISAM databases (issue #262)
* allow long paths in generated tarballs (issue #12)
* fix bug interpreting EZT substitute patterns
* fix broken markup view disablement
* fix broken directory view link generation in directory log view
* fix Windows-specific viewvc-install bugs
* fix broke query result links for Subversion deleted items (issue #296)
* fix some output XHTML validation buglets
* fix database query cache staleness problems (issue #180)
Version 1.0.3 (released 13-Oct-2006)
* fix bug in path shown for Subversion deleted-under-copy items (issue #265)
* security fix: declare charset for views to avoid IE UTF7 XSS attack
Version 1.0.2 (released 29-Sep-2006)
* minor documentation fixes
* fix Subversion annotate functionality on Windows (issue #18)
* fix annotate assertions on uncanonicalized #include paths (issue #208)
* make RSS URL method match the method used to generate it (issue #245)
* fix Subversion annotation to run non-interactively, preventing hangs
* fix bug in custom syntax highlighter fallback logic
* fix bug in PHP CGI hack to avoid force-cgi-redirect errors
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 +124,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)

466
INSTALL
View File

@@ -1,11 +1,12 @@
CONTENTS
--------
TO THE IMPATIENT
SECURITY INFORMATION
INSTALLING VIEWVC
APACHE CONFIGURATION
UPGRADING VIEWVC
SQL CHECKIN DATABASE
ENSCRIPT CONFIGURATION
ENABLING SYNTAX COLORATION
CVSGRAPH CONFIGURATION
IF YOU HAVE PROBLEMS...
@@ -39,7 +40,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
@@ -50,55 +51,76 @@ Congratulations on getting this far. :-)
* CvsGraph 1.5.0 or later, graphical CVS revision tree generator
(http://www.akhphd.au.dk/~bertho/cvsgraph/)
GUI Operation:
Quick sanity check:
If you just want to see what your CVS repository looks like with
ViewVC, type "./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.
If you just want to see what your repository looks like when seen
through ViewVC, type:
$ bin/standalone.py -r /PATH/TO/REPOSITORY
This will start a tiny ViewVC server at http://localhost:7467/viewvc/,
to which you can connect with your browser.
Standard operation:
To start installing right away (on UNIX): type "./viewvc-install"
in the current directory and answer the prompts. When it
finishes, edit the file viewvc.conf in the installation directory
to tell viewvc the paths to your CVS and Subversion repositories. Next,
configure your web server to run <INSTALL>/cgi/viewvc.cgi, as
appropriate for your web server. The section `INSTALLING VIEWVC'
below is still recommended reading.
to tell ViewVC the paths to your CVS and Subversion repositories.
Next, configure your web server (in the way appropriate to that browser)
to run <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/viewvc.cgi. The section
`INSTALLING VIEWVC' below is still recommended reading.
SECURITY INFORMATION
--------------------
ViewVC provides a feature which allows version controlled content to
be served to web browsers just like static web server content. So, if
you have a directory full of interrelated HTML files that is housed in
your version control repository, ViewVC can serve those files as HTML.
You'll see in your web browser what you'd see if the files were part
of your website, with working references to stylesheets and images and
links to other pages.
It is important to realize, however, that as useful as that feature
is, there is some risk security-wise in its use. Essentially, anyone
with commit access to the CVS or Subversion repositories served by
ViewVC has the ability to affect site content. If a discontented or
ignorant user commits malicious HTML to a version controlled file
(perhaps just by way of documenting examples of such), that malicious
HTML is effectively published and live on your ViewVC instance.
Visitors viewing those versioned controlled documents get the
malicious code, too, which might not be what the original author
intended.
If you wish to disable ViewVC's "checkout" view which implements this
feature, you can do so by editing lib/viewvc.py, and modifying the
function view_checkout() like so, adding the lines indicated:
def view_checkout(request):
>> raise debug.ViewVCException('Checkout view is disabled',
>> '403 Forbidden')
path, rev = _orig_path(request)
fp, revision = request.repos.openfile(path, rev)
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.
@@ -120,8 +142,11 @@ INSTALLING VIEWVC
3) Edit <VIEWVC_INSTALLATION_DIRECTORY>/viewvc.conf for your specific
configuration. In particular, examine the following configuration options:
cvs_roots
cvs_roots (for CVS)
svn_roots (for Subversion)
root_parents (for CVS or Subversion)
default_root
root_as_url_component
rcs_path
mime_types_file
@@ -131,55 +156,57 @@ INSTALLING VIEWVC
then edit the files in <VIEWVC_INSTALLATION_DIRECTORY>/templates.
You need knowledge about HTML to edit the templates.
4) The CGI programs are in <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/. You can
4) The CGI programs are in <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/. You can
symlink to this directory from somewhere in your published HTTP server
path if your webserver is configured to follow symbolic links. You can
also copy the installed <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
also copy the installed <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/*.cgi
scripts after the install (unlike the other files in ViewVC, the scripts
under www/ can be moved).
under bin/ can be moved).
If you are using Apache, then see below at the section
titled APACHE CONFIGURATION.
If you are using Apache, then see below at the section titled
APACHE CONFIGURATION.
NOTE: for security reasons, it is not advisable to install ViewVC
directly into your published HTTP directory tree (due to the MySQL
passwords in viewvc.conf).
5) That's it for repository browsing. Instructions for getting the
SQL checkin database working are below.
That's it for repository browsing. Instructions for getting the SQL
checkin database working are below.
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
ScriptAlias /viewvc <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/viewvc.cgi
into your httpd.conf file. Choose the location in httpd.conf where
also the other ScriptAlias lines reside. Some examples:
ScriptAlias /viewvc /usr/local/viewvc-1.0/www/cgi/viewvc.cgi
ScriptAlias /query /usr/local/viewvc-1.0/www/cgi/query.cgi
ScriptAlias /viewvc /usr/local/viewvc-1.0/bin/cgi/viewvc.cgi
ScriptAlias /query /usr/local/viewvc-1.0/bin/cgi/query.cgi
continue with step 3).
or alternatively METHOD B:
2) Copy the CGI scripts from
<VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
<VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/*.cgi
to the /cgi-bin/ directory configured in your httpd.conf file.
continue with step 3).
and then there's METHOD C:
2) Copy the CGI scripts from
<VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
<VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/*.cgi
to the directory of your choosing in the Document Root adding the following
apache directives for the directory in httpd.conf or an .htaccess file:
@@ -194,7 +221,7 @@ and then there's METHOD C:
or if you've got Mod_Python installed you can use METHOD D:
2) Copy the Python scripts and .htaccess file from
<VIEWVC_INSTALLATION_DIRECTORY>/www/mod_python/
<VIEWVC_INSTALLATION_DIRECTORY>/bin/mod_python/
to a directory being served by apache.
In httpd.conf, make sure that "AllowOverride All" or at least
@@ -207,39 +234,47 @@ 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:
<Location "<url to viewvc.cgi>/<modname_you_wish_to_access_ctl>">
AllowOverride None
AuthUserFile /path/to/passwd/file
AuthName "Client Access"
AuthType Basic
require valid-user
</Location>
<Location "<url to viewvc.cgi>/<modname_you_wish_to_access_ctl>">
AllowOverride None
AuthUserFile /path/to/passwd/file
AuthName "Client Access"
AuthType Basic
require valid-user
</Location>
This idea is courtesy to Nick Bauman from http://www.cortexity.com/
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:
If you use access control, it is recommended that you disable the
checkout_magic option so people can't "sneak in" with URLs like
http://<server_name>/viewvc/*checkout*/<module_name>
http://<server_name>/viewvc/~checkout~/<module_name>
http://<server_name>/viewvc/<module_name>.tar.gz?view=tar
http://<server_name>/viewvc/*checkout*/<module_name>
http://<server_name>/viewvc/~checkout~/<module_name>
5) Optional: Protect your ViewVC instance from server-whacking webcrawlers.
and get access to seeing the file contents.
As ViewVC is a web-based application which each page containing various
links to other pages and views, you can expect your server's performance
to suffer if a webcrawler finds your ViewVC instance and begins
traversing those links. We highly recommend that you add your ViewVC
location to a site-wide robots.txt file. Visit the Wikipedia page
for Robots.txt (http://en.wikipedia.org/wiki/Robots.txt) for more
information.
UPGRADING VIEWVC
-----------------
Please read the file upgrading.html in the website subdirectory or
at <http://viewvc.org/upgrading.html>.
Please read the file upgrading-howto.html in the docs/ subdirectory.
SQL CHECKIN DATABASE
@@ -252,15 +287,13 @@ 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
database.
3) Run the <VIEWVC_INSTALLATION_DIRECTORY>/make-database script. It will
3) Run the <VIEWVC_INSTALLATION_DIRECTORY>/bin/make-database script. It will
prompt you for your MySQL user, password, and the name of database you
want to create. The database name defaults to "ViewVC". This script
creates the database and sets up the empty tables. If you run this on a
@@ -272,105 +305,105 @@ there are some additional steps required to get the database working.
enabled = 1 # Whether to enable query support in viewvc.cgi
host = # MySQL database server host
port = # MySQL database server port (default is 3306)
database_name = # the name of the database you created with
# make-database
user = # the read/write database user
database_name = # name of database you created with make-database
user = # read/write database user
passwd = # password for read/write database user
readonly_user = # the readonly database user -- it's pretty
# safe to use the read/write user here
readonly_passwd = # password for the readonly user
readonly_user = # read-only database user
readonly_passwd = # password for the read-only user
5) Two programs are provided for updating the checkin database from a
CVS repository, cvsdbadmin and loginfo-handler. They serve two
different purposes. The cvsdbadmin program walks through your CVS
repository and adds every commit in every file. This is commonly
used for initializing the database from a repository which has been
in use. The loginfo-handler script is executed by the CVS server's
CVSROOT/loginfo system upon each commit. It makes real-time
updates to the checkin database as commits are made to the
repository.
Note that it's pretty safe in this instance for your read-only user
and your read-write user to be the same.
To build a database of all the commits in the CVS repository /home/cvs,
invoke: "./cvsdbadmin rebuild /home/cvs". If you want to update
the checkin database, invoke: "./cvsdbadmin update /home/cvs". The
update mode checks to see if a commit is already in the database,
and only adds it if it is absent.
5) At this point, you need to tell your version control system(s) to
publish their commit information to the database. This is done
using utilities that ViewVC provides.
To get real-time updates, you'll want to checkout the CVSROOT module
from your CVS repository and edit CVSROOT/loginfo. Add the line:
To publish CVS commits into the database:
ALL <VIEWVC_INSTALLATION_DIRECTORY>/loginfo-handler %{sVv}
Two programs are provided for updating the checkin database from
a CVS repository, cvsdbadmin and loginfo-handler. They serve
two different purposes. The cvsdbadmin program walks through
your CVS repository and adds every commit in every file. This
is commonly used for initializing the database from a repository
which has been in use. The loginfo-handler script is executed
by the CVS server's CVSROOT/loginfo system upon each commit. It
makes real-time updates to the checkin database as commits are
made to the repository.
If you have other scripts invoked by CVSROOT/loginfo, you will want
to make sure to change any running under the "DEFAULT" keyword to
"ALL" like the loginfo handler, and probably carefully read the
execution rules for CVSROOT/loginfo from the CVS manual.
To build a database of all the commits in the CVS repository
/home/cvs, invoke: "./cvsdbadmin rebuild /home/cvs". If you
want to update the checkin database, invoke: "./cvsdbadmin
update /home/cvs". The update mode checks to see if a commit is
already in the database, and only adds it if it is absent.
If you are running the Unix port of CVS-NT, you'll need to use a
slightly different command line:
To get real-time updates, you'll want to checkout the CVSROOT
module from your CVS repository and edit CVSROOT/loginfo. For
folks running CVS 1.12 or better, add this line:
ALL <VIEWVC_INSTALLATION_DIRECTORY>/bin/loginfo-handler %p %{sVv}
If you are running CVS 1.11 or earlier, you'll want a slightly
different command line in CVSROOT/loginfo:
ALL <VIEWVC_INSTALLATION_DIRECTORY>/bin/loginfo-handler %{sVv}
ALL <VIEWVC_INSTALLATION_DIRECTORY>/loginfo-handler %{sVv} cvsnt
The extra 'cvsnt' parameter tells the handler script to parse the
commit information in a different way.
If you have other scripts invoked by CVSROOT/loginfo, you will
want to make sure to change any running under the "DEFAULT"
keyword to "ALL" like the loginfo handler, and probably
carefully read the execution rules for CVSROOT/loginfo from the
CVS manual.
If you are running the Unix port of CVS-NT, the handler script
need to know about it. CVS-NT delivers commit information to
loginfo scripts differently than the way mainstream CVS does.
Your command line should look like this:
ALL <VIEWVC_INSTALLATION_DIRECTORY>/bin/loginfo-handler %{sVv} cvsnt
For Subversion repositories, there is a single script called
svndbadmin that performs both of the above tasks.
To publish Subversion commits into the database:
To build a database of all the commits in the Subversion repository
/home/svn, invoke: "./svndbadmin rebuild /home/svn". If you want
to update the checkin database, invoke: "./svndbadmin update
/home/svn".
To build a database of all the commits in the Subversion
repository /home/svn, invoke: "./svndbadmin rebuild /home/svn".
If you want to update the checkin database, invoke:
"./svndbadmin update /home/svn".
To get real time updates, you will need to add a post-commit hook
(for the repository example above, the script should go in
/home/svn/hooks/post-commit). The script should look something
like this:
To get real time updates, you will need to add a post-commit
hook (for the repository example above, the script should go in
/home/svn/hooks/post-commit). The script should look something
like this:
#!/bin/sh
REPOS="$1"
REV="$2"
<VIEWVC_INSTALLATION_DIRECTORY>/svndbadmin rebuild "$REPOS" "$REV"
#!/bin/sh
REPOS="$1"
REV="$2"
<VIEWVC_INSTALLATION_DIRECTORY>/bin/svndbadmin rebuild "$REPOS" "$REV"
If you allow revision property changes in your repository, create a
post-revprop-change hook script containing the same commands as the
post-commit one. This will make sure that the checkin database
stays consistent when you change the svn:log, svn:author or
svn:date revision properties.
If you allow revision property changes in your repository,
create a post-revprop-change hook script containing the same
commands as the post-commit one. This will make sure that the
checkin database 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.
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
----------------------
ENABLING SYNTAX COLORATION
--------------------------
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 two 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 either 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' or 'highlight_path' option
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.
That's it! Now when you view the contents of recognized filetypes in
ViewVC, you should see colorized syntax.
CVSGRAPH CONFIGURATION
@@ -380,71 +413,69 @@ 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.
cvsgraph.conf for operation with ViewVC.
SUBVERSION INTEGRATION
----------------------
ViewVC now 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.
Unlike the CVS integration, which simply wraps the RCS and CVS utility
programs, the Subversion integration requires additional Python
libraries. 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.
Generally speaking, you'll know when your installation of Subversion's
bindings has been successful if you can import the 'svn.repos' module
from within your Python interpreter:
bindings has been successful if you can import the 'svn.core' module
from within your Python interpreter. Here's an example of doing so
which doubles as a quick way to check what version of the Subversion
Python binding you have:
% python
Python 2.2.2 (#1, Oct 29 2002, 02:47:30)
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn.repos
>>>
>>> from svn.core import *
>>> "%s.%s.%s" % (SVN_VER_MAJOR, SVN_VER_MINOR, SVN_VER_PATCH)
'1.2.0'
>>>
Note that by default, Subversion installs its bindings in a location
that is not in Python's default module search path (for example, on
Linux systems the default is usually /usr/local/lib/svn-python). You
need to remedy this, either by adding this path to Python's module
search path, or by relocation the bindings to some place in that
search path, or by relocating the bindings to some place in that
search path.
For example, you might want to create .pth file in your Python
installation directory's site-packages area which tells Python where
to find additional modules (in this case, you Subversion Python
bindings). You would do this as follows (and as root):
$ echo "/path/to/svn/bindings" > /path/to/python/site-packages/svn.pth
(Though, obviously, with the correct paths specified.)
Configuration of the Subversion repositories happens in much the same
way as with CVS repositories, only with the 'svn_roots' configuration
variable instead of the 'cvs_roots' one.
@@ -453,39 +484,42 @@ variable instead of the 'cvs_roots' one.
IF YOU HAVE PROBLEMS ...
------------------------
If you've trouble to make viewvc.cgi work:
If nothing seems to work:
=== If nothing seems to work:
* Check if you can execute CGI-scripts (Apache needs to have an
ScriptAlias /cgi-bin or cgi-script Handler defined). Try to
execute a simple CGI-script that often comes with the distribution
of the webserver; locate the logfiles and try to find hints which
explain the malfunction
o check if you can execute CGI-scripts (Apache needs to have an
ScriptAlias /cgi-bin or cgi-script Handler defined). Try to
execute a simple CGI-script that often comes with the distribution
of the webserver; locate the logfiles and try to find hints
which explain the malfunction
o view the entries in the webserver's error.log
* View the entries in the webserver's error.log
=== If viewvc seems to work but doesn't show the expected result
(Typical error: you can't see any files)
If ViewVC seems to work but doesn't show the expected result (Typical
error: you can't see any files)
o check whether the CGI-script has read-permissions to your
CVS-Repository. The CGI-script often runs as the user 'nobody'
or 'httpd' ..
* Check whether the CGI-script has read-permissions to your
CVS-Repository. The CGI-script generally runs as the same user
that the web server does, often user 'nobody' or 'httpd'.
o does viewvc find your RCS utilities? (edit rcs_path)
* Does ViewVC find your RCS utilities? (edit rcs_path)
=== If something else happens or you can't get it to work:
If something else happens or you can't get it to work:
o check the ViewVC home page:
* Check the ViewVC home page:
http://viewvc.org/
http://viewvc.org/
o review the ViewVC mailing list archive to see if somebody else had
the same problem, and it was solved:
* Review the ViewVC mailing list archive to see if somebody else had
the same problem, and it was solved:
http://viewvc.tigris.org/servlets/SummarizeList?listName=users
http://viewvc.tigris.org/servlets/SummarizeList?listName=users
o send mail to the ViewVC mailing list: users@viewvc.tigris.org
* Check the ViewVC issue database to see if the problem you are
seeing is the result of a known bug:
NOTE: make sure you provide an accurate description of the problem
and any relevant tracebacks or error logs.
http://viewvc.tigris.org/issues/query.cgi
* Send mail to the ViewVC mailing list, users@viewvc.tigris.org.
NOTE: make sure you provide an accurate description of the problem
-- including the version of ViewVC you are using -- and any
relevant tracebacks or error logs.

View File

@@ -1,63 +1,21 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ViewVC: License v1</title>
<link rel="stylesheet" type="text/css" href="./styles.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div id="title">
<a href="http://www.viewvc.org/"><img
src="./images/title.jpg" alt="ViewVC: Repository Browsing"/></a>
</div>
<div id="menu">
<p><a href="./index.html">Home</a> |
<a href="http://viewvc.tigris.org/">Project Page</a> |
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>
</div>
<table id="pagetable">
<tr>
<td id="pagecolumn1">
<h4>On this page:</h4>
<ul id="bookmarks">
<li><a href="#sec-license">License</a></li>
</ul>
<hr/>
<address><a href="mailto:&#117&#115&#101&#114&#115&#64&#118&#105&#101&#119&#118&#99&#46&#116&#105&#103&#114&#105&#115&#46&#111&#114&#103">ViewVC Users Group</a></address>
</td>
<td id="pagecolumn2">
<div class="section">
<h2 id="sec-license">License</h2>
<p>The following text constitutes the license agreement for the <a
href="./index.html">ViewVC</a> software (formerly known as
ViewCVS). It is an agreement between <a
href="./who.html#sec-viewcvs-group">The ViewCVS Group</a> and the
users of ViewVC.</p>
href="http://www.viewvc.org/">ViewVC</a> software (formerly known
as ViewCVS). It is an agreement between <a
href="http://www.viewvc.org/who.html#sec-viewcvs-group">The ViewCVS
Group</a> and the users of ViewVC.</p>
<p style="font-size: 80%;"><em>Note: the copyright years were updated
on May 12, 2001 and September 5, 2002. No other changes were made
to the license.</em></p>
<blockquote>
<hr/>
<p><strong>Copyright &copy; 1999-2002 The ViewCVS Group. All rights
<p><strong>Copyright &copy; 1999-2008 The ViewCVS Group. All rights
reserved.</strong></p>
<p>By using ViewVC, you agree to the terms and conditions set forth
@@ -90,10 +48,18 @@
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.</p>
</div>
</blockquote>
<hr />
<p>The following changes have occured to this license over time:</p>
<ul>
<li>May 12, 2001 &mdash; copyright years updated</li>
<li>September 5, 2002 &mdash; copyright years updated</li>
<li>March 17, 2006 &mdash; software renamed from "ViewCVS"</li>
<li>April 10, 2007 &mdash; copyright years updated</li>
<li>February 22, 2008 &mdash; copyright years updated</li>
</ul>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -32,9 +32,9 @@ import sys
import os
if LIBRARY_DIR:
sys.path.insert(0, LIBRARY_DIR)
sys.path.insert(0, LIBRARY_DIR)
else:
sys.path.insert(0, os.path.abspath(os.path.join(sys.argv[0], "../../lib")))
sys.path.insert(0, os.path.abspath(os.path.join(sys.argv[0], "../../lib")))
#########################################################################
@@ -49,9 +49,13 @@ import vclib.bincvs
DEBUG_FLAG = 0
## output functions
def debug(text):
def debug(text):
if DEBUG_FLAG:
print 'DEBUG(viewvc-loginfo):', text
if type(text) != (type([])):
text = [text]
for line in text:
line = line.rstrip('\n\r')
print 'DEBUG(viewvc-loginfo):', line
def warning(text):
print 'WARNING(viewvc-loginfo):', text
@@ -61,139 +65,160 @@ def error(text):
sys.exit(1)
_re_revisions = re.compile(
r",(?P<old>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and first revision number
r",(?P<new>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and second revision number
r"(?:$| )" # space or end of string
r",(?P<old>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and first revision
r",(?P<new>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and second revision
r"(?:$| )" # space or end of string
)
def HeuristicArgParse(s, repository):
"""Current versions of CVS (except for CVSNT) do not escape spaces in file
and directory names that are passed to the loginfo handler. Since the input
to loginfo is a space separated string, this can lead to ambiguities. This
function attempts to guess intelligently which spaces are separators and
which are part of file or directory names. It disambiguates spaces in
filenames from the separator spaces between files by assuming that every
space which is preceded by two well-formed revision numbers is in fact a
separator. It disambiguates the first separator space from spaces in the
directory name by choosing the longest possible directory name that actually
exists in the repository"""
if s[-16:] == ' - New directory':
return None, None
if s[-19:] == r' - Imported sources':
return None, None
file_data_list = []
start = 0
while 1:
m = _re_revisions.search(s, start)
if start == 0:
if m is None:
error('Argument "%s" does not contain any revision numbers' % s)
directory, filename = FindLongestDirectory(s[:m.start()], repository)
if directory is None:
error('Argument "%s" does not start with a valid directory' % s)
debug('Directory name is "%s"' % directory)
def Cvs1Dot12ArgParse(args):
"""CVS 1.12 introduced a new loginfo format while provides the various
pieces of interesting version information to the handler script as
individual arguments instead of as a single string."""
if args[1] == '- New directory':
return None, None
elif args[1] == '- Imported sources':
return None, None
else:
if m is None:
warning('Failed to interpret past position %i in the loginfo argument, '
'leftover string is "%s"' % start, pos[start:])
filename = s[start:m.start()]
old_version, new_version = m.group('old', 'new')
directory = args.pop(0)
files = []
while len(args) >= 3:
files.append(args[0:3])
args = args[3:]
return directory, files
def HeuristicArgParse(s, repository):
"""Older versions of CVS (except for CVSNT) do not escape spaces in file
and directory names that are passed to the loginfo handler. Since the input
to loginfo is a space separated string, this can lead to ambiguities. This
function attempts to guess intelligently which spaces are separators and
which are part of file or directory names. It disambiguates spaces in
filenames from the separator spaces between files by assuming that every
space which is preceded by two well-formed revision numbers is in fact a
separator. It disambiguates the first separator space from spaces in the
directory name by choosing the longest possible directory name that
actually exists in the repository"""
file_data_list.append((filename, old_version, new_version))
if (s[-16:] == ' - New directory'
or s[:26] == ' - New directory,NONE,NONE'):
return None, None
debug('File "%s", old revision %s, new revision %s'
% (filename, old_version, new_version))
if (s[-19:] == ' - Imported sources'
or s[-29:] == ' - Imported sources,NONE,NONE'):
return None, None
start = m.end()
if start == len(s): break
file_data_list = []
start = 0
return directory, file_data_list
while 1:
m = _re_revisions.search(s, start)
if start == 0:
if m is None:
error('Argument "%s" does not contain any revision numbers' \
% s)
directory, filename = FindLongestDirectory(s[:m.start()],
repository)
if directory is None:
error('Argument "%s" does not start with a valid directory' \
% s)
debug('Directory name is "%s"' % directory)
else:
if m is None:
warning('Failed to interpret past position %i in the loginfo '
'argument, leftover string is "%s"' \
% start, pos[start:])
filename = s[start:m.start()]
old_version, new_version = m.group('old', 'new')
file_data_list.append((filename, old_version, new_version))
debug('File "%s", old revision %s, new revision %s'
% (filename, old_version, new_version))
start = m.end()
if start == len(s): break
return directory, file_data_list
def FindLongestDirectory(s, repository):
"""Splits the first part of the argument string into a directory name
and a file name, either of which may contain spaces. Returns the longest
possible directory name that actually exists"""
"""Splits the first part of the argument string into a directory name
and a file name, either of which may contain spaces. Returns the longest
possible directory name that actually exists"""
parts = string.split(s, " ")
for i in range(len(parts)-1, 0, -1):
directory = string.join(parts[:i])
filename = string.join(parts[i:])
if os.path.isdir(os.path.join(repository, directory)):
return directory, filename
return None, None
parts = string.split(s, " ")
for i in range(len(parts)-1, 0, -1):
directory = string.join(parts[:i])
filename = string.join(parts[i:])
if os.path.isdir(os.path.join(repository, directory)):
return directory, filename
return None, None
_re_cvsnt_revisions = re.compile(
r"(?P<filename>.*)" # comma and first revision number
r",(?P<old>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and first revision number
r",(?P<new>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and second revision number
r"$" # end of string
r"(?P<filename>.*)" # comma and first revision
r",(?P<old>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and first revision
r",(?P<new>(?:\d+\.\d+)(?:\.\d+\.\d+)*|NONE)" # comma and second revision
r"$" # end of string
)
def CvsNtArgParse(s, repository):
"""CVSNT escapes all spaces in filenames and directory names with
backslashes"""
"""CVSNT escapes all spaces in filenames and directory names with
backslashes"""
if s[-18:] == r' -\ New\ directory':
return None, None
if s[-18:] == r' -\ New\ directory':
return None, None
if s[-21:] == r' -\ Imported\ sources':
return None, None
if s[-21:] == r' -\ Imported\ sources':
return None, None
file_data_list = []
file_data_list = []
directory, pos = NextFile(s)
debug('Directory name is "%s"' % directory)
directory, pos = NextFile(s)
debug('Directory name is "%s"' % directory)
while 1:
fileinfo, pos = NextFile(s, pos)
if fileinfo is None:
break
while 1:
fileinfo, pos = NextFile(s, pos)
if fileinfo is None:
break
m = _re_cvsnt_revisions.match(fileinfo)
if m is None:
warning('Can\'t parse file information in "%s"' % fileinfo)
continue
m = _re_cvsnt_revisions.match(fileinfo)
if m is None:
warning('Can\'t parse file information in "%s"' % fileinfo)
continue
file_data = m.group('filename', 'old', 'new')
file_data_list.append(file_data)
file_data = m.group('filename', 'old', 'new')
debug('File "%s", old revision %s, new revision %s' % file_data)
debug('File "%s", old revision %s, new revision %s' % file_data)
file_data_list.append(file_data)
return directory, file_data_list
return directory, file_data_list
def NextFile(s, pos = 0):
escaped = 0
ret = ''
i = pos
while i < len(s):
c = s[i]
if escaped:
ret += c
escaped = 0
elif c == '\\':
escaped = 1
elif c == ' ':
return ret, i + 1
else:
ret += c
i += 1
escaped = 0
ret = ''
i = pos
while i < len(s):
c = s[i]
if escaped:
ret += c
escaped = 0
elif c == '\\':
escaped = 1
elif c == ' ':
return ret, i + 1
else:
ret += c
i += 1
return ret or None, i
return ret or None, i
def ProcessLoginfo(rootpath, directory, files):
cfg = viewvc.load_config(CONF_PATHNAME)
@@ -235,41 +260,58 @@ if __name__ == '__main__':
debug('Repository name is "%s"' % repository)
## parse arguments
if len(sys.argv) > 1:
# the first argument should contain file version information
arg = sys.argv[1]
else:
# if there are no arguments, read version information from first line
# of input like old versions of viewcvs
arg = string.rstrip(sys.stdin.readline())
if len(sys.argv) > 2:
# if there is a second argument it indicates which parser should be
# used to interpret the version information
if sys.argv[2] == 'cvs':
fun = HeuristicArgParse
elif sys.argv[2] == 'cvsnt':
fun = CvsNtArgParse
else:
error('Bad arguments')
else:
# if there is no second argument, guess which parser to use based
# on the operating system. Since CVSNT now runs on Windows and
# Linux, the guess isn't neccessarily correct
if sys.platform == "win32":
fun = CvsNtArgParse
else:
fun = HeuristicArgParse
argc = len(sys.argv)
debug('Got %d arguments:' % (argc))
debug(map(lambda x: ' ' + x, sys.argv))
if len(sys.argv) > 3:
error('Bad arguments')
# if we have more than 3 arguments, we are likely using the
# newer loginfo format introduced in CVS 1.12:
#
# ALL <path>/bin/loginfo-handler %p %{sVv}
if argc > 3:
directory, files = Cvs1Dot12ArgParse(sys.argv[1:])
else:
if len(sys.argv) > 1:
# the first argument should contain file version information
arg = sys.argv[1]
else:
# if there are no arguments, read version information from
# first line of input like old versions of ViewCVS did
arg = string.rstrip(sys.stdin.readline())
if len(sys.argv) > 2:
# if there is a second argument it indicates which parser
# should be used to interpret the version information
if sys.argv[2] == 'cvs':
fun = HeuristicArgParse
elif sys.argv[2] == 'cvsnt':
fun = CvsNtArgParse
else:
error('Bad arguments')
else:
# if there is no second argument, guess which parser to use based
# on the operating system. Since CVSNT now runs on Windows and
# Linux, the guess isn't necessarily correct
if sys.platform == "win32":
fun = CvsNtArgParse
else:
fun = HeuristicArgParse
directory, files = fun(arg, repository)
debug('Discarded from stdin:')
debug(map(lambda x: ' ' + x, sys.stdin.readlines())) # consume stdin
repository = cvsdb.CleanRepository(repository)
directory, files = fun(arg, repository)
debug('Repository: %s' % (repository))
debug('Directory: %s' % (directory))
debug('Files: %s' % (str(files)))
if files is None:
debug('Not a checkin, nothing to do')
debug('Not a checkin, nothing to do')
else:
ProcessLoginfo(repository, directory, files)
ProcessLoginfo(repository, directory, files)
sys.exit(0)

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -39,7 +39,7 @@ CREATE TABLE branches (
branch varchar(64) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE branch (branch)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS checkins;
CREATE TABLE checkins (
@@ -62,7 +62,7 @@ CREATE TABLE checkins (
KEY dirid (dirid),
KEY fileid (fileid),
KEY branchid (branchid)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS descs;
CREATE TABLE descs (
@@ -71,7 +71,7 @@ CREATE TABLE descs (
hash bigint(20) DEFAULT '0' NOT NULL,
PRIMARY KEY (id),
KEY hash (hash)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS dirs;
CREATE TABLE dirs (
@@ -79,7 +79,7 @@ CREATE TABLE dirs (
dir varchar(255) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE dir (dir)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS files;
CREATE TABLE files (
@@ -87,7 +87,7 @@ CREATE TABLE files (
file varchar(255) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE file (file)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS people;
CREATE TABLE people (
@@ -95,7 +95,7 @@ CREATE TABLE people (
who varchar(32) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE who (who)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS repositories;
CREATE TABLE repositories (
@@ -103,7 +103,7 @@ CREATE TABLE repositories (
repository varchar(64) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE repository (repository)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS tags;
CREATE TABLE tags (
@@ -117,7 +117,7 @@ CREATE TABLE tags (
KEY dirid (dirid),
KEY fileid (fileid),
KEY branchid (branchid)
);
) TYPE=MyISAM;
"""
if __name__ == "__main__":

View File

@@ -42,9 +42,23 @@ if LIBRARY_DIR:
sys.path.insert(0, LIBRARY_DIR)
import sapi
import viewvc
import query
reload(query) # need reload because initial import loads this stub file
import imp
# Import real ViewVC module
fp, pathname, description = imp.find_module('viewvc', [LIBRARY_DIR])
try:
viewvc = imp.load_module('viewvc', fp, pathname, description)
finally:
if fp:
fp.close()
# Import real ViewVC Query modules
fp, pathname, description = imp.find_module('query', [LIBRARY_DIR])
try:
query = imp.load_module('query', fp, pathname, description)
finally:
if fp:
fp.close()
cfg = viewvc.load_config(CONF_PATHNAME)

View File

@@ -42,9 +42,15 @@ if LIBRARY_DIR:
sys.path.insert(0, LIBRARY_DIR)
import sapi
import viewvc
reload(viewvc) # need reload because initial import loads this stub file
import imp
# Import real ViewVC module
fp, pathname, description = imp.find_module('viewvc', [LIBRARY_DIR])
try:
viewvc = imp.load_module('viewvc', fp, pathname, description)
finally:
if fp:
fp.close()
def index(req):
server = sapi.ModPythonServer(req)

View File

@@ -1586,10 +1586,20 @@ td {
<td>Boolean</td>
<td>True if files list was cut short due to <tt>limit_changes</tt>.</td>
</tr>
<tr class="varlevel2">
<td class="varname">commits.minus</td>
<td>String</td>
<td>Total number of lines removed from files in this commit.</td>
</tr>
<tr class="varlevel2">
<td class="varname">commits.num_files</td>
<td>String</td>
<td>Number of files in the <var>commits.files</var> list.</td>
<td>Total number of files in the <var>commits.files</var> list.</td>
</tr>
<tr class="varlevel2">
<td class="varname">commits.plus</td>
<td>String</td>
<td>Number of lines added to files in this commit.</td>
</tr>
<tr class="varlevel2">
<td class="varname">commits.rev</td>
@@ -1630,12 +1640,14 @@ td {
<tr class="varlevel1">
<td class="varname">minus_count</td>
<td>String</td>
<td>Total number of lines removed in the commit (over all files).</td>
<td>Total number of lines removed from all files across all returned
commits.</td>
</tr>
<tr class="varlevel1">
<td class="varname">plus_count</td>
<td>String</td>
<td>Total number of lines added in the commit (over all files).</td>
<td>Total number of lines added to all files across all returned
commits.</td>
</tr>
<tr class="varlevel1">
<td class="varname">queryform_href</td>

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

@@ -89,7 +89,7 @@ th.caption {
<li><a href="#compat-tarball">'<code>tarball=1</code>' Parameter &rArr; '<code>view=tar</code>'</a></li>
<li><a href="#compat-graph">'<code>graph=1</code>' Parameter &rArr; '<code>view=graph</code>'</a></li>
<li><a href="#compat-makeimage">'<code>graph=1&makeimage=1</code>' Parameters &rArr; '<code>view=graphimg</code>'</a></li>
<li><a href="#compat-content_type">'<code>content_type=text/vnd.viewcvs-markup</code>' and '<code>content_type=text/x-cvsweb-markup</code>' Parameters&rArr; '<code>view=markup</code>'
<li><a href="#compat-content_type">'<code>content-type=text/vnd.viewcvs-markup</code>' and '<code>content-type=text/x-cvsweb-markup</code>' Parameters&rArr; '<code>view=markup</code>'
<li><a href="#compat-attic">'<code>Attic/FILE</code>' Paths &rArr; '<code>FILE</code>'</a></li>
</ul>
</div>
@@ -284,11 +284,6 @@ th.caption {
<td>depends</td>
<td><a href="#view-param"><code>view</code> parameter</a>, not needed if the <code>default_file_view</code> configuration variable is set to <code>co</code>, since that makes the checkout view the default view for file paths. Also not needed if the <code>/*checkout*</code> magic prefix or the <code>revision</code> parameter is present.
</tr>
<tr>
<td><code>content-type=<var>TYPE</var></code></td>
<td>optional</td>
<td>MIME type to send with checked out file, default is a guess based on file extension</td>
</tr>
<tr>
<td><code>revision=<var>REVISION</var></code></td>
<td>optional</td>
@@ -1233,8 +1228,8 @@ th.caption {
<h3 id="compat-makeimage">'<code>graph=1&amp;makeimage=1</code>' Parameters &rArr; '<code>view=graphimg</code>'</h3>
<p>A <code>graph=1&amp;makeimage=1</code> parameter is treated like a <code>view=graph</code> parameter. There is currently no redirect when it is encountered, but there could be one in the future.</p>
<h3 id="compat-content_type">'<code>content_type=text/vnd.viewcvs-markup</code>' and '<code>content_type=text/x-cvsweb-markup</code>' Parameters&rArr; '<code>view=markup</code>'</h3>
<p><code>content_type=text/vnd.viewcvs-markup</code> and <code>content_type=text/x-cvsweb-markup</code> parameters are treated like a <code>view=markup</code> parameter. There is currently no redirect when it is encountered, but there could be one in the future.</p>
<h3 id="compat-content_type">'<code>content-type=text/vnd.viewcvs-markup</code>' and '<code>content-type=text/x-cvsweb-markup</code>' Parameters&rArr; '<code>view=markup</code>'; other values ignored</h3>
<p><code>content-type=text/vnd.viewcvs-markup</code> and <code>content-type=text/x-cvsweb-markup</code> parameters are treated like a <code>view=markup</code> parameter. There is currently no redirect when it is encountered, but there could be one in the future. Other values of the <code>content-type</code> parameter, which were used to dictate the MIME type of files displayed in the checkout/download view prior to ViewVC 1.0.6, are ignored.</p>
<h3 id="compat-attic">'<code>Attic/FILE</code>' Paths &rArr; '<code>FILE</code>'</h3>
<p>When ViewVC encounters an invalid repository path whose last or second-to-last component is named <code>Attic</code>, and stripping the component yields a valid path, it will redirect to a URL with that path.</p>

View File

@@ -51,16 +51,12 @@ keywordsList = ["and", "assert", "break", "class", "continue", "def",
"return", "try", "while",
]
# First a little helper, since I don't like to repeat things. (Tismer speaking)
def replace(where, what, with):
return string.join(string.split(where, what), with)
# A regexp for matching Python comments.
commentPat = "#.*"
# A regexp for matching simple quoted strings.
pat = "q[^q\\n]*(\\[\000-\377][^q\\n]*)*q"
quotePat = replace(pat, "q", "'") + "|" + replace(pat, 'q', '"')
quotePat = string.replace(pat, "q", "'") + "|" + string.replace(pat, 'q', '"')
# A regexp for matching multi-line tripled-quoted strings. (Way to go, Tim!)
pat = """
@@ -82,7 +78,8 @@ pat = """
qqq
"""
pat = string.join(string.split(pat), '') # get rid of whitespace
tripleQuotePat = replace(pat, "q", "'") + "|" + replace(pat, 'q', '"')
tripleQuotePat = string.replace(pat, "q", "'") + "|" \
+ string.replace(pat, 'q', '"')
# A regexp which matches all and only Python keywords. This will let
# us skip the uninteresting identifier references.

View File

@@ -33,7 +33,6 @@ import time
import math
import cgi
import vclib
import vclib.ccvs.blame
re_includes = re.compile('\\#(\\s*)include(\\s*)"(.*?)"')
@@ -42,25 +41,28 @@ def link_includes(text, repos, path_parts, include_url):
match = re_includes.match(text)
if match:
incfile = match.group(3)
include_path_parts = path_parts[:-1]
for part in filter(None, string.split(incfile, '/')):
if part == "..":
if not include_path_parts:
# nothing left to pop; don't bother marking up this include.
return text
include_path_parts.pop()
elif part and part != ".":
include_path_parts.append(part)
# check current directory and parent directory for file
for depth in (-1, -2):
include_path = path_parts[:depth] + [incfile]
try:
# will throw if path doesn't exist
if repos.itemtype(include_path, None) == vclib.FILE:
break
except vclib.ItemNotFound:
pass
else:
include_path = None
include_path = None
try:
if repos.itemtype(include_path_parts, None) == vclib.FILE:
include_path = string.join(include_path_parts, '/')
except vclib.ItemNotFound:
pass
if include_path:
url = string.replace(include_url, '/WHERE/',
string.join(include_path, '/'))
return '#%sinclude%s<a href="%s">"%s"</a>' % \
(match.group(1), match.group(2), url, incfile)
return '#%sinclude%s<a href="%s">"%s"</a>' % \
(match.group(1), match.group(2),
string.replace(include_url, '/WHERE/', include_path), incfile)
return text
@@ -97,6 +99,7 @@ class _item:
def make_html(root, rcs_path):
import vclib.ccvs.blame
bs = vclib.ccvs.blame.BlameSource(os.path.join(root, rcs_path))
count = bs.num_lines
@@ -158,9 +161,9 @@ def make_html(root, rcs_path):
# Close the highlighted section
#if (defined $mark_cmd and mark_cmd != 'begin'):
# chop($output)
# output = output + endOfRow + (startOfRow % row_color)
# inMark = 0
# chop($output)
# output = output + endOfRow + (startOfRow % row_color)
# inMark = 0
print output
print endOfRow + '</table>'

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -19,6 +19,8 @@ import os
import string
import ConfigParser
import fnmatch
import re
import vclib
#########################################################################
@@ -39,7 +41,7 @@ import fnmatch
class Config:
_sections = ('general', 'options', 'cvsdb', 'templates')
_force_multi_value = ('cvs_roots', 'forbidden',
_force_multi_value = ('cvs_roots', 'forbidden', 'forbiddenre',
'svn_roots', 'languages', 'kv_files',
'root_parents')
@@ -151,8 +153,9 @@ class Config:
self.general.svn_path = ''
self.general.mime_types_file = ''
self.general.address = '<a href="mailto:user@insert.your.domain.here">No admin address has been configured</a>'
self.general.forbidden = ()
self.general.kv_files = [ ]
self.general.forbidden = []
self.general.forbiddenre = []
self.general.kv_files = []
self.general.languages = ['en-us']
self.templates.directory = None
@@ -222,19 +225,65 @@ class Config:
self.options.http_expiration_time = 600
self.options.generate_etags = 1
def is_forbidden(self, module):
if not module:
def is_forbidden(self, root, path_parts, pathtype):
# If we don't have a root and path to check, get outta here.
if not (root and path_parts):
return 0
default = 0
for pat in self.general.forbidden:
if pat[0] == '!':
default = 1
if fnmatch.fnmatchcase(module, pat[1:]):
return 0
elif fnmatch.fnmatchcase(module, pat):
return 1
return default
# Give precedence to the new 'forbiddenre' stuff first.
if self.general.forbiddenre:
# Join the root and path-parts together into one path-like thing.
root_and_path = string.join([root] + path_parts, "/")
if pathtype == vclib.DIR:
root_and_path = root_and_path + '/'
# If we still have a list of strings, replace those suckers with
# lists of (compiled_regex, negation_flag)
if type(self.general.forbiddenre[0]) == type(""):
for i in range(len(self.general.forbiddenre)):
pat = self.general.forbiddenre[i]
if pat[0] == '!':
self.general.forbiddenre[i] = (re.compile(pat[1:]), 1)
else:
self.general.forbiddenre[i] = (re.compile(pat), 0)
# Do the forbiddenness test.
default = 0
for (pat, negated) in self.general.forbiddenre:
match = pat.search(root_and_path)
if negated:
default = 1
if match:
return 0
elif match:
return 1
return default
# If no 'forbiddenre' is in use, we check 'forbidden', which only
# looks at the top-most directory.
elif self.general.forbidden:
# A root and a single non-directory path component? That's not
# a module.
if len(path_parts) == 1 and pathtype != vclib.DIR:
return 0
# Do the forbiddenness test.
module = path_parts[0]
default = 0
for pat in self.general.forbidden:
if pat[0] == '!':
default = 1
if fnmatch.fnmatchcase(module, pat[1:]):
return 0
elif fnmatch.fnmatchcase(module, pat):
return 1
return default
# No forbiddenness configuration? Just allow it.
else:
return 0
def _parse_roots(config_name, config_value):
roots = { }

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -23,11 +23,6 @@ import dbi
## error
error = "cvsdb error"
## cached (active) database connections
gCheckinDatabase = None
gCheckinDatabaseReadOnly = None
## CheckinDatabase provides all interfaces needed to the SQL database
## back-end; it needs to be subclassed, and have its "Connect" method
## defined to actually be complete; it should run well off of any DBI 2.0
@@ -50,6 +45,8 @@ class CheckinDatabase:
def Connect(self):
self.db = dbi.connect(
self._host, self._port, self._user, self._passwd, self._database)
cursor = self.db.cursor()
cursor.execute("SET AUTOCOMMIT=1")
def sql_get_id(self, table, column, value, auto_set):
sql = "SELECT id FROM %s WHERE %s=%%s" % (table, column)
@@ -249,8 +246,8 @@ class CheckinDatabase:
revision = commit.GetRevision()
sticky_tag = "NULL"
branch_id = self.GetBranchID(commit.GetBranch())
plus_count = commit.GetPlusCount()
minus_count = commit.GetMinusCount()
plus_count = commit.GetPlusCount() or '0'
minus_count = commit.GetMinusCount() or '0'
description_id = self.GetDescriptionID(commit.GetDescription())
sql = "REPLACE INTO checkins"\
@@ -677,39 +674,20 @@ def CreateCommit():
def CreateCheckinQuery():
return CheckinDatabaseQuery()
def ConnectDatabase(cfg, readonly=0):
if readonly:
user = cfg.cvsdb.readonly_user
passwd = cfg.cvsdb.readonly_passwd
else:
user = cfg.cvsdb.user
passwd = cfg.cvsdb.passwd
db = CheckinDatabase(cfg.cvsdb.host, cfg.cvsdb.port, user, passwd,
cfg.cvsdb.database_name, cfg.cvsdb.row_limit)
db.Connect()
return db
def ConnectDatabaseReadOnly(cfg):
global gCheckinDatabaseReadOnly
if gCheckinDatabaseReadOnly:
return gCheckinDatabaseReadOnly
gCheckinDatabaseReadOnly = CheckinDatabase(
cfg.cvsdb.host,
cfg.cvsdb.port,
cfg.cvsdb.readonly_user,
cfg.cvsdb.readonly_passwd,
cfg.cvsdb.database_name,
cfg.cvsdb.row_limit)
gCheckinDatabaseReadOnly.Connect()
return gCheckinDatabaseReadOnly
def ConnectDatabase(cfg):
global gCheckinDatabase
if gCheckinDatabase:
return gCheckinDatabase
gCheckinDatabase = CheckinDatabase(
cfg.cvsdb.host,
cfg.cvsdb.port,
cfg.cvsdb.user,
cfg.cvsdb.passwd,
cfg.cvsdb.database_name,
cfg.cvsdb.row_limit)
gCheckinDatabase.Connect()
return gCheckinDatabase
return ConnectDatabase(cfg, 1)
def GetCommitListFromRCSFile(repository, path_parts, revision=None):
commit_list = []

View File

@@ -200,7 +200,7 @@ Directives
equivalent to "[CALLBACK QUAL_NAME]"
"""
#
# Copyright (C) 2001-2005 Greg Stein. All Rights Reserved.
# Copyright (C) 2001-2007 Greg Stein. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -659,7 +659,7 @@ def _write_value(value, args, ctx):
piece = args[idx]
else:
piece = '<undef>'
printer(ctx, piece)
printer(ctx, piece)
# plain old value, write to output
else:

View File

@@ -364,11 +364,11 @@ class _pipe:
else:
if self.thread:
self.thread.join()
if type(self.child_pid) == type([]):
if type(self.child_pid) == type([]):
for pid in self.child_pid:
exit = os.waitpid(pid, 0)[1]
return exit
else:
else:
return os.waitpid(self.child_pid, 0)[1]
return None

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -25,6 +25,7 @@ import time
import cvsdb
import viewvc
import vclib
import ezt
import debug
import urllib
@@ -282,10 +283,8 @@ def build_commit(server, cfg, desc, files, cvsroots, viewvc_link):
ob.log = '&nbsp;'
for commit in files:
dir_parts = filter(None, string.split(commit.GetDirectory(), '/'))
if dir_parts \
and ((dir_parts[0] == 'CVSROOT' and cfg.options.hide_cvsroot) \
or cfg.is_forbidden(dir_parts[0])):
parts = filter(None, string.split(commit.GetDirectory(), '/'))
if parts and cfg.options.hide_cvsroot and parts[0] == 'CVSROOT':
continue
ctime = commit.GetTime()
@@ -304,6 +303,11 @@ def build_commit(server, cfg, desc, files, cvsroots, viewvc_link):
file = (directory and directory + "/") + commit.GetFile()
cvsroot_name = cvsroots.get(repository)
## skip forbidden files
if cfg.is_forbidden(cvsroot_name,
filter(None, string.split(file, "/")), vclib.FILE):
continue
## if we couldn't find the cvsroot path configured in the
## viewvc.conf file, then don't make the link
if cvsroot_name:
@@ -345,7 +349,7 @@ def run_query(server, cfg, form_data, viewvc_link):
files = [ ]
cvsroots = {}
rootitems = cfg.general.cvs_roots.items() + cfg.general.svn_roots.items()
rootitems = cfg.general.svn_roots.items() + cfg.general.cvs_roots.items()
for key, value in rootitems:
cvsroots[cvsdb.CleanRepository(value)] = key
@@ -366,6 +370,13 @@ def run_query(server, cfg, form_data, viewvc_link):
commits.append(build_commit(server, cfg, current_desc, files,
cvsroots, viewvc_link))
# Strip out commits that don't have any files attached to them. The
# files probably aren't present because they've been blocked via
# forbiddenness.
def _only_with_files(commit):
return len(commit.files) > 0
commits = filter(_only_with_files, commits)
return commits
def main(server, cfg, viewvc_link):
@@ -403,6 +414,7 @@ def main(server, cfg, viewvc_link):
'query' : query,
'commits' : commits,
'num_commits' : len(commits),
'rss_href' : None,
}
if form_data.hours:

View File

@@ -135,7 +135,7 @@ class CgiServer(Server):
def addheader(self, name, value):
self.headers.append((name, value))
def header(self, content_type='text/html', status=None):
def header(self, content_type='text/html; charset=UTF-8', status=None):
if not self.headerSent:
self.headerSent = 1
@@ -209,7 +209,10 @@ class AspServer(ThreadedServer):
if not self.headerSent:
try:
self.headerSent = 1
if content_type is not None: self.response.ContentType = content_type
if content_type is None:
self.response.ContentType = 'text/html; charset=UTF-8'
else:
self.response.ContentType = content_type
if status is not None: self.response.Status = status
except AttributeError:
pass
@@ -290,7 +293,7 @@ class ModPythonServer(ThreadedServer):
def header(self, content_type=None, status=None):
if content_type is None:
self.request.content_type = 'text/html'
self.request.content_type = 'text/html; charset=UTF-8'
else:
self.request.content_type = content_type
self.headerSent = 1

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)
@@ -534,31 +534,25 @@ def _parse_co_header(fp):
raise COMalformedOutput, "Unable to find filename in co output stream"
filename = match.group(1)
# look for a revision in the second line.
line = fp.readline()
if not line:
raise COMalformedOutput, "Missing second line from co output stream"
match = _re_co_revision.match(line)
if match:
return filename, match.group(1)
elif _re_co_missing_rev.match(line) or _re_co_side_branches.match(line):
raise COMissingRevision, "Got missing revision error from co output stream"
elif _re_co_warning.match(line):
pass
else:
raise COMalformedOutput, "Unable to find revision in co output stream"
# look through subsequent lines for a revision. we might encounter
# some ignorable or problematic lines along the way.
while 1:
line = fp.readline()
if not line:
break
# look for a revision.
match = _re_co_revision.match(line)
if match:
return filename, match.group(1)
elif _re_co_missing_rev.match(line) or _re_co_side_branches.match(line):
raise COMissingRevision, "Got missing revision error from co output stream"
elif _re_co_warning.match(line):
pass
else:
break
# if we get here, the second line wasn't a revision, but it was a
# warning we can ignore. look for a revision in the third line.
line = fp.readline()
if not line:
raise COMalformedOutput, "Missing third line from co output stream"
match = _re_co_revision.match(line)
if match:
return filename, match.group(1)
raise COMalformedOutput, "Unable to find revision in co output stream"
# if your rlog doesn't use 77 '=' characters, then this must change
LOG_END_MARKER = '=' * 77 + '\n'
ENTRY_END_MARKER = '-' * 28 + '\n'
@@ -670,7 +664,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

@@ -346,7 +346,7 @@ class CVSParser(rcsparse.Sink):
is_trunk_revision = self.trunk_rev.match(revision) is not None
if is_trunk_revision:
diffs = self.deltatext_split(last_revision)
diffs = self.deltatext_split(last_revision)
# Revisions on the trunk specify deltas that transform a
# revision into an earlier revision, so invert the translation
@@ -379,7 +379,7 @@ class CVSParser(rcsparse.Sink):
# the trunk. They specify deltas that transform a revision
# into a later revision.
adjust = 0
diffs = self.deltatext_split(revision)
diffs = self.deltatext_split(revision)
for command in diffs:
if skip > 0:
skip = skip - 1

View File

@@ -78,7 +78,7 @@ class RCSStopParser(Exception):
#
class _Parser:
stream_class = None # subclasses need to define this
stream_class = None # subclasses need to define this
def parse_rcs_admin(self):
while 1:
@@ -196,7 +196,7 @@ class _Parser:
if token == ';':
break
author = author + token + ' '
author = author[:-1] # toss the trailing space
author = author[:-1] # toss the trailing space
# Parse state
self.ts.match('state')
@@ -206,7 +206,7 @@ class _Parser:
if token == ';':
break
state = state + token + ' '
state = state[:-1] # toss the trailing space
state = state[:-1] # toss the trailing space
# Parse branches
self.ts.match('branches')

View File

@@ -26,7 +26,7 @@ class _TokenStream:
# note: we use a multiple of a standard block size
CHUNK_SIZE = 192 * 512 # about 100k
# CHUNK_SIZE = 5 # for debugging, make the function grind...
# CHUNK_SIZE = 5 # for debugging, make the function grind...
def __init__(self, file):
self.rcsfile = file
@@ -51,7 +51,7 @@ class _TokenStream:
buf = self.rcsfile.read(self.CHUNK_SIZE)
if buf == '':
# signal EOF by returning None as the token
del self.buf # so we fail if get() is called again
del self.buf # so we fail if get() is called again
return None
idx = 0

View File

@@ -25,7 +25,7 @@ _tt = TextTools
_idchar_list = map(chr, range(33, 127)) + map(chr, range(160, 256))
_idchar_list.remove('$')
_idchar_list.remove(',')
#_idchar_list.remove('.') leave as part of 'num' symbol
#_idchar_list.remove('.') # leave as part of 'num' symbol
_idchar_list.remove(':')
_idchar_list.remove(';')
_idchar_list.remove('@')
@@ -41,10 +41,10 @@ _T_STRING_START = 40
_T_STRING_SPAN = 60
_T_STRING_END = 70
_E_COMPLETE = 100 # ended on a complete token
_E_TOKEN = 110 # ended mid-token
_E_STRING_SPAN = 130 # ended within a string
_E_STRING_END = 140 # ended with string-end ('@') (could be mid-@@)
_E_COMPLETE = 100 # ended on a complete token
_E_TOKEN = 110 # ended mid-token
_E_STRING_SPAN = 130 # ended within a string
_E_STRING_END = 140 # ended with string-end ('@') (could be mid-@@)
_SUCCESS = +100
@@ -65,7 +65,7 @@ class _mxTokenStream:
# note: we use a multiple of a standard block size
CHUNK_SIZE = 192 * 512 # about 100k
# CHUNK_SIZE = 5 # for debugging, make the function grind...
# CHUNK_SIZE = 5 # for debugging, make the function grind...
def __init__(self, file):
self.rcsfile = file

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -15,9 +15,11 @@
import vclib
import os
import os.path
import stat
import string
import cStringIO
import signal
import shutil
import time
import tempfile
import popen
@@ -270,62 +272,70 @@ class ChangedPath:
self.is_copy = is_copy
class ChangedPathSet:
def __init__(self):
self.changes = { }
def get_revision_info(svnrepos, rev):
fsroot = svnrepos._getroot(rev)
def add_change(self, change):
# Get the changes for the revision
editor = repos.ChangeCollector(svnrepos.fs_ptr, fsroot, svnrepos.pool)
e_ptr, e_baton = delta.make_editor(editor, svnrepos.pool)
repos.svn_repos_replay(fsroot, e_ptr, e_baton, svnrepos.pool)
changes = editor.get_changes()
changedpaths = {}
# Copy the Subversion changes into a new hash, converting them into
# ChangedPath objects.
for path in changes.keys():
change = changes[path]
if change.path:
change.path = _cleanup_path(change.path)
if change.base_path:
change.base_path = _cleanup_path(change.base_path)
path = change.path
action = 'modified'
is_copy = 0
if not change.path:
action = 'deleted'
path = change.base_path
elif change.added:
action = 'added'
replace_check_path = path
if change.base_path and change.base_rev:
is_copy = 1
replace_check_path = change.base_path
if self.changes.has_key(replace_check_path) \
and self.changes[replace_check_path].action == 'deleted':
if not hasattr(change, 'action'): # new to subversion 1.4.0
action = 'modified'
if not change.path:
action = 'deleted'
elif change.added:
action = 'added'
replace_check_path = path
if change.base_path and change.base_rev:
replace_check_path = change.base_path
if changedpaths.has_key(replace_check_path) \
and changedpaths[replace_check_path].action == 'deleted':
action = 'replaced'
else:
if change.action == repos.CHANGE_ACTION_ADD:
action = 'added'
elif change.action == repos.CHANGE_ACTION_DELETE:
action = 'deleted'
elif change.action == repos.CHANGE_ACTION_REPLACE:
action = 'replaced'
else:
action = 'modified'
if (action == 'added' or action == 'replaced') \
and change.base_path \
and change.base_rev:
is_copy = 1
if change.item_kind == core.svn_node_dir:
pathtype = vclib.DIR
elif change.item_kind == core.svn_node_file:
pathtype = vclib.FILE
else:
pathtype = None
self.changes[path] = ChangedPath(path, pathtype, change.prop_changes,
changedpaths[path] = ChangedPath(path, pathtype, change.prop_changes,
change.text_changed, change.base_path,
change.base_rev, action, is_copy)
def get_changes(self):
changes = self.changes.values()
changes.sort(lambda a, b: _compare_paths(a.filename, b.filename))
return changes
# Actually, what we want is a sorted list of ChangedPath objects.
change_items = changedpaths.values()
change_items.sort(lambda a, b: _compare_paths(a.filename, b.filename))
def get_revision_info(svnrepos, rev):
fsroot = svnrepos._getroot(rev)
# Get the changes for the revision
cps = ChangedPathSet()
editor = repos.ChangeCollector(svnrepos.fs_ptr, fsroot,
svnrepos.pool, cps.add_change)
e_ptr, e_baton = delta.make_editor(editor, svnrepos.pool)
repos.svn_repos_replay(fsroot, e_ptr, e_baton, svnrepos.pool)
# Now get the revision property info. Would use
# editor.get_root_props(), but something is broken there...
datestr, author, msg = _fs_rev_props(svnrepos.fs_ptr, rev, svnrepos.pool)
date = _datestr_to_date(datestr, svnrepos.pool)
return date, author, msg, cps.get_changes()
return date, author, msg, change_items
def _log_helper(svnrepos, rev, path, pool):
@@ -483,12 +493,43 @@ class BlameSource:
self.last = None
self.first_rev = first_rev
# Do a little dance to get a URL that works in both Unix-y and
# Windows worlds.
rootpath = os.path.abspath(rootpath)
if rootpath and rootpath[0] != '/':
rootpath = '/' + rootpath
if os.sep != '/':
rootpath = string.replace(rootpath, os.sep, '/')
# Make a read-only temporary directory for Subversion to use as
# its runtime config dir. (Read-only because that will prevent
# Subversion from fleshing out all the default runtime config
# contents.)
self.config_dir = self._mkdtemp()
os.chmod(self.config_dir, stat.S_IRUSR | stat.S_IXUSR)
url = 'file://' + string.join([rootpath, fs_path], "/")
fp = popen.popen(svn_client_path,
('blame', "-r%d" % int(rev), "%s@%d" % (url, int(rev))),
("blame",
"-r%d" % int(rev),
"--non-interactive",
"--config-dir", self.config_dir,
"%s@%d" % (url, int(rev))),
'rb', 1)
self.fp = fp
def _mkdtemp(self):
### FIXME: When we require Python 2.3, this can go away.
for i in range(10):
dir = tempfile.mktemp()
try:
os.mkdir(dir, 0700)
return dir
except OSError, e:
if e.errno == errno.EEXIST:
continue # try again
raise
raise IOError, (errno.EEXIST, "No usable temporary directory name found")
def __getitem__(self, idx):
if idx == self.idx:
@@ -513,6 +554,13 @@ class BlameSource:
self.last = item
self.idx = idx
return item
def __del__(self):
try:
if self.config_dir:
shutil.rmtree(self.config_dir)
except:
pass
class BlameSequencingError(Exception):

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -100,8 +100,12 @@ def created_rev(svnrepos, full_name, rev):
kind = ra.svn_ra_check_path(svnrepos.ra_session, full_name, rev,
svnrepos.pool)
if kind == core.svn_node_dir:
props = ra.svn_ra_get_dir(svnrepos.ra_session, full_name,
rev, svnrepos.pool)
retval = ra.svn_ra_get_dir(svnrepos.ra_session, full_name,
rev, svnrepos.pool)
if type(retval) == type([]) and len(retval) == 3:
props = retval[2]
else: # compat with older (broken) bindings
props = retval
return int(props[core.SVN_PROP_ENTRY_COMMITTED_REV])
return core.SVN_INVALID_REVNUM
@@ -176,12 +180,14 @@ class LogCollector:
# Changed paths have leading slashes
changed_paths = paths.keys()
changed_paths.sort(lambda a, b: _compare_paths(a, b))
this_path = None
copyfrom_path = copyfrom_rev = this_path = None
if self.path in changed_paths:
this_path = self.path
change = paths[self.path]
if change.copyfrom_path:
this_path = change.copyfrom_path
copyfrom_path = change.copyfrom_path[1:]
copyfrom_rev = change.copyfrom_rev
for changed_path in changed_paths:
if changed_path != self.path:
# If a parent of our path was copied, our "next previous"
@@ -194,7 +200,7 @@ class LogCollector:
if self.show_all_logs or this_path:
date = _datestr_to_date(date, pool)
entry = Revision(revision, date, author, message, None,
self.path[1:], None, None)
self.path[1:], copyfrom_path, copyfrom_rev)
self.logs.append(entry)
if this_path:
self.path = this_path
@@ -240,7 +246,7 @@ class SelfCleanFP:
self._path = path
self._eof = 0
def read(self, len):
def read(self, len=None):
if len:
chunk = self._fp.read(len)
else:

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# -*-python-*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -15,8 +15,18 @@
# -----------------------------------------------------------------------
import os, sys, traceback, string, thread
try:
import win32api
except ImportError, e:
raise ImportError, str(e) + """
Did you install the Python for Windows Extensions?
http://sourceforge.net/projects/pywin32/
"""
import win32process, win32pipe, win32con
import win32event, win32file, win32api, winerror
import win32event, win32file, winerror
import pywintypes, msvcrt
# Buffer size for spooling

53
notes/TODO Normal file
View File

@@ -0,0 +1,53 @@
PREFACE
-------
This file will go away soon after release 0.8. Please use the SourceForge
tracker to resubmit any of the items listed below, if you think, it is
still an issue:
http://sourceforge.net/tracker/?group_id=18760
Before reporting please check, whether someone else has already done this.
Working patches increase the chance to be included into the next release.
-- PeFu / October 2001
TODO ITEMS
----------
*) add Tamminen Eero's comments on how to make Linux directly execute
the Python script. From email on Feb 19.
[ add other examples, such as my /bin/sh hack or the teeny CGI stub
importing the bulk hack ]
*) insert rcs_path into PATH before calling "rcsdiff". rcsdiff might
use "co" and needs to find it on the path.
*) show the "locked" flag (attach it to the LogEntry objects).
Idea from Russell Gordon <russell@hoopscotch.dhs.org>
*) committing with a specific revision number:
http://mailman.lyra.org/pipermail/viewcvs/2000q1/000008.html
*) add capability similar to cvs2cl.pl:
http://mailman.lyra.org/pipermail/viewcvs/2000q2/000050.html
suggestion from Chris Meyer <cmeyer@gatan.com>.
*) add a tree view of the directory structure (and files?)
*) include a ConfigParser.py to help older Python installations
*) add a check for the rcs programs/paths to viewvc-install. clarify the
dependency on RCS in the docs.
*) have a "check" mode that verifies binaries are available on rcs_path
-> alternately (probably?): use rcsparse rather than external tools
KNOWN BUGS
----------
*) time.timezone seems to not be available on some 1.5.2 installs.
I was unable to verify this. On RedHat and SuSE Linux this bug
is non existant.
*) With old repositories containing many branches, tags or thousands
or revisions, the cvsgraph feature becomes unusable (see INSTALL).
ViewVC can't do much about this, but it might be possible to
investigate the number of branches, tags and revision in advance
and disable the cvsgraph links, if the numbers exceed a certain
treshold.

85
notes/releases.txt Normal file
View File

@@ -0,0 +1,85 @@
RELEASE MANAGEMENT
ViewVC rolls releases from release branches associate with each minor
version of the software. For example, the 1.1.0 is rolled from the
1.1.x branch. The same is true for the 1.1.1, 1.1.2, ... releases.
There is a script, `tools/make-release', which creates a release
directory and the various archive files that we distribute. All other
steps required to get a ViewVC release out of the door require manual
execution (currently by C. Michael Pilato). Those steps are as
follows:
Checkout a working copy of the release branch for the release you
intend to roll, and in that working copy, perform the following steps
(X, Y, and Z below represent integral major, minor, and patch version
numbers, and not literal):
1. Review any open bug reports:
http://viewvc.tigris.org/servlets/ProjectIssues
2. Add a new subsection to the file 'docs/upgrading.html' describing
all user visible changes for users of previous releases of ViewVC.
Commit any modifications. NOTE: This step should not be necessary
for patch releases.
3. Verify that copyright years are correct in both the LICENSE.html
file and the source code.
4. Update and commit the 'CHANGES' file.
5. Test, test, test! There is no automatic testsuite available. So
just run with permuting different `viewvc.conf' settings... and
pray. Fix what needs fixin', keeping the CHANGES file in sync
with the branch.
6. At this point, the source code committed to the release branch
should exactly reflect what you wish to distribute and dub "the
release".
7. Edit the file 'lib/viewvc.py' and remove the "-dev" suffix from
__version__. The remainder should be of the form "X.Y.Z", where X,
Y, and Z are positive integers. Do NOT commit this change.
8. Update your working copy to HEAD, and tag the release:
svn update
svn cp -m "Tag the X.Y.Z final release." . \
http://viewvc.tigris.org/svn/viewvc/tags/X.Y.Z
9. Go into an empty directory and run the 'make-release' script:
tools/make-release viewvc-X.Y.Z X.Y.Z
10. Verify the archive files:
- do they have a LICENSE.html file?
- do they have necessary include documentation?
- do they *not* have unnecessary stuff?
- do they install and work correctly?
11. Upload the created archive files (tar.gz and zip) into the Files
and Documents section of the Tigris.org project, and modify the
CHECKSUMS document there accordingly. Also, drop a copy of the
archive files into the root directory of the viewvc.org website
(unversioned).
12. Update the websites (both the viewvc.org/ and www/ ones) to refer
to the new release files.
13. Edit the file 'lib/viewvc.py' again, re-adding the "-dev" suffix
and incrementing the patch number assigned to the __version__
variable, and commit:
svn ci -m "Begin a new release cycle."
14. Edit the Issue Tracker configuration options, adding a new Version
for the just-released one, and a new Milestone for the next patch
(and possibly, minor or major) release. (For the Milestone sort
key, use a packed integer XXYYZZ: 1.0.3 == 10003, 2.11.4 == 21104.)
15. Write an announcement explaining all the cool new features and
post it to the announce@ list, to the project's News area, and to
other places interested in this sort of stuff, such as Freshmeat
(http://www.freshmeat.net).

View File

@@ -9,16 +9,43 @@
<h3>An Exception Has Occurred</h3>
[if-any msg]
<p><pre>[msg]</pre></p>
<p>[msg]</p>
[end]
[if-any status]
<h4>HTTP Response Status</h4>
<p><pre>[status]</pre></p>
<hr />
[end]
[if-any msg][else]
<h4>Python Traceback</h4>
<p><pre>
[stacktrace]
</pre></p>
[end]
[# Here follows a bunch of space characters, present to ensure that
our error message is larger than 512 bytes so that IE's "Friendly
Error Message" won't show. For more information, see
http://oreillynet.com/onjava/blog/2002/09/internet_explorer_subverts_err.html]
</body>
</html>

View File

@@ -9,7 +9,7 @@
enter a numeric revision.
[end]
</p>
<form method="get" action="[diff_select_action]" name="diff_select">
<form method="get" action="[diff_select_action]" id="diff_select">
<table cellpadding="2" cellspacing="0" class="auto">
<tr>
@@ -26,7 +26,7 @@
</select>
<input type="text" size="12" name="tr1"
value="[if-any rev_selected][rev_selected][else][first_revision][end]"
onchange="document.diff_select.r1.selectedIndex=0" />
onchange="document.getElementById('diff_select').r1.selectedIndex=0" />
[else]
<input type="text" size="12" name="r1"
value="[if-any rev_selected][rev_selected][else][first_revision][end]" />
@@ -42,7 +42,7 @@
</select>
<input type="text" size="12" name="tr2"
value="[last_revision]"
onchange="document.diff_select.r1.selectedIndex=0" />
onchange="document.getElementById('diff_select').r2.selectedIndex=0" />
[else]
<input type="text" size="12" name="r2" value="[last_revision]" />
[end]

View File

@@ -1,38 +1,28 @@
[if-any search_re_form]
<hr />
[# this table holds the selectors on the left, and reset on the right ]
<table class="auto">
<tr>
<td>Show files containing the regular expression:</td>
<td>
<form method="get" action="[search_re_action]">
<div>
[search_re_hidden_values]
<input type="text" name="search" value="[search_re]" />
<input type="submit" value="Show" />
</div>
</form>
</td>
</tr>
[if-any search_re]
<tr>
<td>&nbsp;</td>
<td>
<form method="get" action="[search_tag_action]">
<div>
[search_tag_hidden_values]
<input type="submit" value="Show all files" />
</div>
</form>
</td>
</tr>
[end]
</table>
<hr />
<div>
Show files containing the regular expression:
<form method="get" action="[search_re_action]" style="display: inline;">
<div style="display: inline;">
[search_re_hidden_values]
<input type="text" name="search" value="[search_re]" />
<input type="submit" value="Show" />
</div>
</form>
[if-any search_re]
<form method="get" action="[search_re_action]" style="display: inline;">
<div style="display: inline;">
[search_re_hidden_values]
<input type="submit" value="Show all files" />
</div>
</form>
[end]
[end]
</div>
[# if you want to disable tarball generation remove the following: ]
[if-any tarball_href]
<p style="margin:0;"><a href="[tarball_href]">Download tarball</a></p>
<p style="margin:0;"><a href="[tarball_href]">Download GNU tarball</a></p>
[end]
[include "footer.ezt"]

View File

@@ -5,11 +5,11 @@
<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>
<td style="text-align: right;">[if-any rss_href]<a href="[rss_href]" title="RSS 2.0 feed"><img src="[docroot]/images/feed-icon-16x16.jpg"/>[else]&nbsp;[end]</td>
<td style="text-align: right;">[if-any rss_href]<a href="[rss_href]" title="RSS 2.0 feed"><img src="[docroot]/images/feed-icon-16x16.jpg" alt="RSS 2.0 feed"/></a>[else]&nbsp;[end]</td>
</tr>
</table>

View File

@@ -6,7 +6,7 @@
<title>[if-any rootname][[][rootname]][else]ViewVC[end] [page_title]</title>
<meta name="generator" content="ViewVC [vsn]" />
<link rel="stylesheet" href="[docroot]/styles.css" type="text/css" />
[if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" HREF="[rss_href]">[end]
[if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" href="[rss_href]" />[end]
</head>
<body>
<div class="vc_navheader">

View File

@@ -1,4 +1,5 @@
<form method="get" action="[pathrev_action]" style="display: inline">
<div style="display: inline">
[pathrev_hidden_values]
[is roottype "cvs"]
[define pathrev_selected][pathrev][end]
@@ -34,16 +35,19 @@
<input type="text" name="pathrev" value="[pathrev]" size="6"/>
[end]
<input type="submit" value="Set" />
</div>
</form>
[if-any pathrev]
<form method="get" action="[pathrev_clear_action]" style="display: inline">
<div style="display: inline">
[pathrev_clear_hidden_values]
[if-any lastrev]
[is pathrev lastrev][else]<input type="submit" value="Set to [lastrev]">[end]
[is pathrev lastrev][else]<input type="submit" value="Set to [lastrev]" />[end]
(<i>Current path doesn't exist after revision <strong>[lastrev]</strong></i>)
[else]
<input type="submit" value="Clear">
<input type="submit" value="Clear" />
[end]
</div>
</form>
[end]

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

@@ -9,8 +9,8 @@
<title>[if-any commits.rev][commits.rev]: [end][[commits.author]] [commits.short_log]</title>
[if-any commits.rss_url]<link>[commits.rss_url]</link>[end]
<author>[commits.author]</author>
<pubDate>[commits.rss_date]</pubDate>
<description>[commits.log]</description>
<pubDate>[if-any commits.rss_date][commits.rss_date][else](unknown date)[end]</pubDate>
<description>&lt;pre&gt;[format "xml"][commits.log][end]&lt;/pre&gt;</description>
</item>[end]
</channel>
</rss>

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -45,30 +45,44 @@ for PLATFORM in unix windows; do
EOL="--native-eol LF"
fi
svn export ${EOL} http://viewvc.tigris.org/svn/viewvc/${ROOT} ${TARGET}
echo "Beginning build for ${PLATFORM}:"
echo " Exporting source code..."
svn export --quiet ${EOL} http://viewvc.tigris.org/svn/viewvc/${ROOT} ${TARGET}
### Various shifting, cleanup.
# Documentation is now also distributed together with the release, but
# we still copy the license file to its traditional place (it is small
# and many files still contain comments refering to this location):
# Remove some not useful directories
rm -r ${TARGET}/{elemx,tests,tools,tparse,viewcvs.sourceforge.net,www}
for JUNK in elemx \
notes \
tests \
tools \
tparse \
viewcvs.sourceforge.net \
viewvc.org \
www; do
if [ -d ${TARGET}/${JUNK} ]; then
echo " Removing ${TARGET}/${JUNK}..."
rm -r ${TARGET}/${JUNK}
fi
done
# Make sure permissions are reasonable:
echo " Normalizing permissions..."
find ${TARGET} -print | xargs chmod uoa+r
find ${TARGET} -type d -print | xargs chmod uoa+x
if test ${PLATFORM} = windows; then
# Create also a ZIP file for those poor souls :-) still using Windows:
echo " Creating ZIP archive..."
zip -qor9 ${TARGET}.zip ${TARGET}
else
# Cut the tarball:
echo " Creating tarball archive..."
tar cf - ${TARGET} | gzip -9 > ${TARGET}.tar.gz
fi
# remove target directory
rm -r ${TARGET}
done
echo 'Done.'
echo "Done."

View File

@@ -1,2 +0,0 @@
*.tar.gz
*.zip

View File

@@ -1 +0,0 @@
RedirectMatch ^(.*)$ http://www.viewvc.org/$1

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- Mode: python -*-
#
# Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
# Copyright (C) 1999-2007 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
@@ -11,10 +11,7 @@
#
# -----------------------------------------------------------------------
#
# install script for viewvc -- temporary?
#
# ### this will eventually be replaced by autoconf plus tools. an
# ### interactive front-end to ./configure may be provided.
# Install script for ViewVC
#
# -----------------------------------------------------------------------
@@ -27,7 +24,7 @@ import py_compile
import getopt
import StringIO
# get access to our library modules
# Get access to our library modules.
sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), 'lib'))
import compat
@@ -36,324 +33,441 @@ import compat_ndiff
version = viewvc.__version__
## installer text
INFO_TEXT = """
This is the ViewVC %s installer.
It will allow you to choose the install path for ViewVC. You will
now be asked some installation questions.
Defaults are given in square brackets. Just hit [Enter] if a default
is okay.
""" % version
## installer defaults
## Installer defaults.
DESTDIR = None
ROOT_DIR = None
CLEAN_MODE = None
## list of files for installation
## tuple (source path, destination path, install mode, true/false flag for
## search-and-replace, flag or text for prompt before replace,
## compile_it)
##
## List of files for installation.
## tuple (source path,
## destination path,
## mode,
## boolean -- search-and-replace?
## boolean -- prompt before replacing?
## boolean -- compile?)
FILE_INFO_LIST = [
("bin/cgi/viewvc.cgi", "bin/cgi/viewvc.cgi", 0755, 1, 0, 0),
("bin/cgi/query.cgi", "bin/cgi/query.cgi", 0755, 1, 0, 0),
("bin/mod_python/viewvc.py", "bin/mod_python/viewvc.py", 0755, 1, 0, 0),
("bin/mod_python/query.py", "bin/mod_python/query.py", 0755, 1, 0, 0),
("bin/cgi/viewvc.cgi", "bin/cgi/viewvc.cgi", 0755, 1, 0, 0),
("bin/cgi/query.cgi", "bin/cgi/query.cgi", 0755, 1, 0, 0),
("bin/mod_python/viewvc.py", "bin/mod_python/viewvc.py", 0755, 1, 0, 0),
("bin/mod_python/query.py", "bin/mod_python/query.py", 0755, 1, 0, 0),
("bin/mod_python/handler.py", "bin/mod_python/handler.py", 0755, 1, 0, 0),
("bin/mod_python/.htaccess", "bin/mod_python/.htaccess", 0755, 0, 0, 0),
("bin/standalone.py", "bin/standalone.py", 0755, 1, 0, 0),
("viewvc.conf.dist", "viewvc.conf", 0644, 0,
"""Note: If you are upgrading from viewcvs-0.7 or earlier:
The section [text] has been removed from viewcvs.conf. The functionality
went into the new files in subdirectory templates.""", 0),
("cvsgraph.conf.dist", "cvsgraph.conf", 0644, 0, 1, 0),
("bin/loginfo-handler", "bin/loginfo-handler", 0755, 1, 0, 0),
("bin/cvsdbadmin", "bin/cvsdbadmin", 0755, 1, 0, 0),
("bin/svndbadmin", "bin/svndbadmin", 0755, 1, 0, 0),
("bin/make-database", "bin/make-database", 0755, 1, 0, 0),
("bin/mod_python/.htaccess", "bin/mod_python/.htaccess", 0755, 0, 0, 0),
("bin/standalone.py", "bin/standalone.py", 0755, 1, 0, 0),
("bin/loginfo-handler", "bin/loginfo-handler", 0755, 1, 0, 0),
("bin/cvsdbadmin", "bin/cvsdbadmin", 0755, 1, 0, 0),
("bin/svndbadmin", "bin/svndbadmin", 0755, 1, 0, 0),
("bin/make-database", "bin/make-database", 0755, 1, 0, 0),
("viewvc.conf.dist", "viewvc.conf.dist", 0644, 0, 0, 0),
("viewvc.conf.dist", "viewvc.conf", 0644, 0, 1, 0),
("cvsgraph.conf.dist", "cvsgraph.conf.dist", 0644, 0, 0, 0),
("cvsgraph.conf.dist", "cvsgraph.conf", 0644, 0, 1, 0),
]
if sys.platform == "win32":
FILE_INFO_LIST.extend([
("bin/asp/viewvc.asp", "bin/asp/viewvc.asp", 0755, 1, 0, 0),
("bin/asp/query.asp", "bin/asp/query.asp", 0755, 1, 0, 0),
("bin/asp/viewvc.asp", "bin/asp/viewvc.asp", 0755, 1, 0, 0),
("bin/asp/query.asp", "bin/asp/query.asp", 0755, 1, 0, 0),
])
## List of directories for installation.
## type (source path,
## destination path,
## boolean -- prompt before replacing?)
TREE_LIST = [
("lib", "lib", 0),
("templates", "templates", 1),
]
("lib", "lib", 0),
("templates", "templates", 1),
("templates-contrib", "templates-contrib", 1),
]
# used to escape substitution strings passed to re.sub(). re.escape() is no
# good because it blindly puts backslashes in front of anything that is not
# a number or letter regardless of whether the resulting sequence will be
# interpreted.
def ReEscape(str):
return string.replace(str, "\\", "\\\\")
def Error(text, etype=None, evalue=None):
print
print "[ERROR] %s" % text
## List of file extensions we can't show diffs for.
BINARY_FILE_EXTS = [
'.png',
'.gif',
'.jpg',
]
def _escape(str):
"""Callback function for re.sub().
re.escape() is no good because it blindly puts backslashes in
front of anything that is not a number or letter regardless of
whether the resulting sequence will be interpreted."""
return string.replace(str, "\\", "\\\\")
def _actual_src_path(path):
"""Return the real on-disk location of PATH, which is relative to
the ViewVC source directory."""
return os.path.join(os.path.dirname(sys.argv[0]),
string.replace(path, '/', os.sep))
def error(text, etype=None, evalue=None):
"""Print error TEXT to stderr, pretty printing the optional
exception type and value (ETYPE and EVALUE, respective), and then
exit the program with an errorful code."""
sys.stderr.write("\n[ERROR] %s\n" % (text))
if etype:
print '[ERROR] ',
traceback.print_exception(etype, evalue, None, file=sys.stdout)
traceback.print_exception(etype, evalue, None, file=sys.stderr)
sys.exit(1)
def MkDir(path):
try:
compat.makedirs(path)
except os.error, e:
if e[0] == 17:
# EEXIST: file exists
return
if e[0] == 13:
# EACCES: permission denied
Error("You do not have permission to create directory %s" % path)
Error("Unknown error creating directory %s" % path, OSError, e)
def SetOnePath(contents, var, value):
def replace_var(contents, var, value):
"""Replace instances of the variable VAR as found in file CONTENTS
with VALUE."""
pattern = re.compile('^' + var + r'\s*=\s*.*$', re.MULTILINE)
repl = '%s = r"%s"' % (var, os.path.join(ROOT_DIR, value))
return re.sub(pattern, ReEscape(repl), contents)
return re.sub(pattern, _escape(repl), contents)
def SetPythonPaths(contents):
def replace_paths(contents):
"""Replace all ViewVC path placeholders found in file CONTENTS."""
if contents[:2] == '#!':
shbang = '#!' + sys.executable
contents = re.sub('^#![^\n]*', ReEscape(shbang), contents)
contents = SetOnePath(contents, 'LIBRARY_DIR', 'lib')
contents = SetOnePath(contents, 'CONF_PATHNAME', 'viewvc.conf')
contents = re.sub('^#![^\n]*', _escape(shbang), contents)
contents = replace_var(contents, 'LIBRARY_DIR', 'lib')
contents = replace_var(contents, 'CONF_PATHNAME', 'viewvc.conf')
return contents
def InstallFile(src_path, dest_path, mode, set_python_paths, prompt_replace,
compile_it):
dest_path = os.path.join(ROOT_DIR, dest_path)
def install_file(src_path, dst_path, mode, subst_path_vars,
prompt_replace, compile_it):
"""Install a single file whose source is at SRC_PATH (which is
relative to the ViewVC source directory) into the location
DST_PATH (which is relative both to the global ROOT_DIR and
DESTDIR settings), and set the file's MODE. If SUBST_PATH_VARS is
set, substitute path variables in the file's contents. If
PROMPT_REPLACE is set (and is not overridden by global setting
CLEAN_MODE), prompt the user for how to deal with already existing
files that differ from the to-be-installed version. If COMPILE_IT
is set, compile the file as a Python module."""
if prompt_replace and os.path.exists(DESTDIR + dest_path):
# Collect ndiff output from ndiff
sys.stdout = StringIO.StringIO()
compat_ndiff.main([DESTDIR + dest_path, src_path])
ndiff_output = sys.stdout.getvalue()
src_path = _actual_src_path(src_path)
dst_path = os.path.join(ROOT_DIR, string.replace(dst_path, '/', os.sep))
destdir_path = DESTDIR + dst_path
# Return everything to normal
sys.stdout = sys.__stdout__
overwrite = None
if not (prompt_replace and os.path.exists(destdir_path)):
# If the file doesn't already exist, or we've been instructed to
# replace it without prompting, then drop in the new file and get
# outta here.
overwrite = 1
else:
# If we're here, then the file already exists, and we've possibly
# got to prompt the user for what to do about that.
# Collect ndiff output from ndiff
sys.stdout = StringIO.StringIO()
compat_ndiff.main([destdir_path, src_path])
ndiff_output = sys.stdout.getvalue()
# Collect the '+ ' and '- ' lines
# total collects the difference lines to be printed later
total = ""
# I use flag to throw out match lines.
flag = 1
for line in string.split(ndiff_output,'\n'):
# Print line if it is a difference line
if line[:2] == "+ " or line[:2] == "- " or line[:2] == "? ":
total = total + line + "\n"
flag = 1
else:
# Compress lines that are the same to print one blank line
if flag:
total = total + "\n"
flag = 0
# Return everything to normal
sys.stdout = sys.__stdout__
if total == "\n":
print " File %s exists,\n but there is no difference between target and source files.\n" % (DESTDIR + dest_path)
return
# Collect the '+ ' and '- ' lines.
diff_lines = []
looking_at_diff_lines = 0
for line in string.split(ndiff_output, '\n'):
# Print line if it is a difference line
if line[:2] == "+ " or line[:2] == "- " or line[:2] == "? ":
diff_lines.append(line)
looking_at_diff_lines = 1
else:
# Compress lines that are the same to print one blank line
if looking_at_diff_lines:
diff_lines.append("")
looking_at_diff_lines = 0
if type(prompt_replace) == type(""):
print prompt_replace
while 1:
temp = raw_input("""
File %s exists and is different from source file.
DO YOU WANT TO,
overwrite [o]
do not overwrite [d]
view differences [v]: """ % (DESTDIR + dest_path))
print
temp = string.lower(temp[0])
if temp == "d":
return
if temp == "v":
if string.lower(src_path[-4:]) in [ '.gif', '.png', '.jpg' ]:
print 'Can not print differences between binary files'
# If there are no differences, we're done here.
if not diff_lines:
overwrite = 1
else:
print total
print """
# If we get here, there are differences.
if CLEAN_MODE == 'true':
overwrite = 1
elif CLEAN_MODE == 'false':
overwrite = 0
else:
print "File %s exists and is different from source file." \
% (destdir_path)
while 1:
name, ext = os.path.splitext(src_path)
if ext in BINARY_FILE_EXTS:
temp = raw_input("Do you want to [O]verwrite or "
"[D]o not overwrite? ")
else:
temp = raw_input("Do you want to [O]verwrite, [D]o "
"not overwrite, or [V]iew "
"differences? ")
temp = string.lower(temp[0])
if temp == "v" and ext not in BINARY_FILE_EXTS:
print """
---------------------------------------------------------------------------"""
print string.join(diff_lines, '\n') + '\n'
print """
LEGEND
A leading '- ' indicates line to remove from installed file
A leading '+ ' indicates line to add to installed file
A leading '? ' shows intraline differences."""
A leading '- ' indicates line to remove from installed file
A leading '+ ' indicates line to add to installed file
A leading '? ' shows intraline differences.
---------------------------------------------------------------------------"""
elif temp == "d":
overwrite = 0
elif temp == "o":
overwrite = 1
if temp == "o":
ReplaceFile(src_path, dest_path, mode, set_python_paths,
prompt_replace, compile_it)
if overwrite is not None:
break
assert overwrite is not None
if not overwrite:
print " preserved %s" % (dst_path)
return
else:
ReplaceFile(src_path, dest_path, mode, set_python_paths,
prompt_replace, compile_it)
return
def ReplaceFile(src_path, dest_path, mode, set_python_paths,
prompt_replace, compile_it):
try:
contents = open(src_path, "rb").read()
except IOError, e:
Error(str(e))
### If we get here, we're creating or overwriting the existing file.
if set_python_paths:
contents = SetPythonPaths(contents)
# Read the source file's contents.
try:
contents = open(src_path, "rb").read()
except IOError, e:
error(str(e))
## write the file to the destination location
path, basename = os.path.split(DESTDIR + dest_path)
MkDir(path)
try:
open(DESTDIR + dest_path, "wb").write(contents)
except IOError, e:
if e[0] == 13:
# EACCES: permission denied
Error("You do not have permission to write file %s" % dest_path)
Error("Unknown error writing file %s" % dest_path, IOError, e)
os.chmod(DESTDIR + dest_path, mode)
if compile_it:
py_compile.compile(DESTDIR + dest_path,
DESTDIR + dest_path + "c" , dest_path)
return
# (Optionally) substitute ViewVC path variables.
if subst_path_vars:
contents = replace_paths(contents)
# Ensure the existence of the containing directories.
dst_parent = os.path.dirname(destdir_path)
if not os.path.exists(dst_parent):
try:
compat.makedirs(dst_parent)
print " created %s%s" % (dst_parent, os.sep)
except os.error, e:
if e.errno == 17: # EEXIST: file exists
return
if e.errno == 13: # EACCES: permission denied
error("You do not have permission to create directory %s" \
% (dst_parent))
error("Unknown error creating directory %s" \
% (dst_parent, OSError, e))
# Now, write the file contents to their destination.
try:
exists = os.path.exists(destdir_path)
open(destdir_path, "wb").write(contents)
print " %s %s" \
% (exists and 'replaced ' or 'installed', dst_path)
except IOError, e:
if e.errno == 13:
# EACCES: permission denied
error("You do not have permission to write file %s" % (dst_path))
error("Unknown error writing file %s" % (dst_path, IOError, e))
# Set the files's mode.
os.chmod(destdir_path, mode)
# (Optionally) compile the file.
if compile_it:
py_compile.compile(destdir_path, destdir_path + "c" , dst_path)
def install_tree(src_path, dst_path, prompt_replace):
files = os.listdir(src_path)
files.sort()
for fname in files:
# eliminate some items which appear in a development area
if fname == 'CVS' or fname == '.svn' or fname == '_svn' \
or fname[-4:] == '.pyc' or fname[-5:] == '.orig' \
or fname[-4:] == '.rej' or fname[0] == '.' \
or fname[-1] == '~':
continue
"""Install a tree whose source is at SRC_PATH (which is relative
to the ViewVC source directory) into the location DST_PATH (which
is relative both to the global ROOT_DIR and DESTDIR settings). If
PROMPT_REPLACE is set (and is not overridden by global setting
CLEAN_MODE), prompt the user for how to deal with already existing
files that differ from the to-be-installed version."""
src = os.path.join(src_path, fname)
dst = os.path.join(dst_path, fname)
if os.path.isdir(src):
install_tree(src, dst, prompt_replace)
orig_src_path = src_path
orig_dst_path = dst_path
src_path = _actual_src_path(src_path)
dst_path = os.path.join(ROOT_DIR, string.replace(dst_path, '/', os.sep))
destdir_path = os.path.join(DESTDIR + dst_path)
# Get a list of items in the directory.
files = os.listdir(src_path)
files.sort()
for fname in files:
# Ignore some stuff found in development directories, but not
# intended for installation.
if fname == 'CVS' or fname == '.svn' or fname == '_svn' \
or fname[-4:] == '.pyc' or fname[-5:] == '.orig' \
or fname[-4:] == '.rej' or fname[0] == '.' \
or fname[-1] == '~':
continue
orig_src_child = orig_src_path + '/' + fname
orig_dst_child = orig_dst_path + '/' + fname
# If the item is a subdirectory, recurse. Otherwise, install the file.
if os.path.isdir(os.path.join(src_path, fname)):
install_tree(orig_src_child, orig_dst_child, prompt_replace)
else:
set_paths = 0
compile_it = fname[-3:] == '.py'
install_file(orig_src_child, orig_dst_child, 0644,
set_paths, prompt_replace, compile_it)
# Check for .py and .pyc files that don't belong in installation.
for fname in os.listdir(destdir_path):
if not os.path.isfile(os.path.join(destdir_path, fname)) or \
not ((fname[-3:] == '.py' and fname not in files) or
(fname[-4:] == '.pyc' and fname[:-1] not in files)):
continue
# If we get here, there's cruft.
delete = None
if CLEAN_MODE == 'true':
delete = 1
elif CLEAN_MODE == 'false':
delete = 0
else:
print "File %s does not belong in ViewVC %s." \
% (dst_path, version)
while 1:
temp = raw_input("Do you want to [D]elete it, or [L]eave "
"it as is? ")
temp = string.lower(temp[0])
if temp == "l":
delete = 0
elif temp == "d":
delete = 1
if delete is not None:
break
assert delete is not None
if delete:
print " deleted %s" % (os.path.join(dst_path, fname))
os.unlink(os.path.join(destdir_path, fname))
else:
print " preserved %s" % (os.path.join(dst_path, fname))
def usage_and_exit(errstr=None):
stream = errstr and sys.stderr or sys.stdout
stream.write("""Usage: %s [OPTIONS]
Installs the ViewVC web-based version control repository browser.
Options:
--help, -h, -? Show this usage message and exit.
--prefix=DIR Install ViewVC into the directory DIR. If not provided,
the script will prompt for this information.
--destdir=DIR Use DIR as the DESTDIR. This is generally only used
by package maintainers. If not provided, the script will
prompt for this information.
--clean-mode= If 'true', overwrite existing ViewVC configuration files
found in the target directory, and purge Python modules
from the target directory that aren't part of the ViewVC
distribution. If 'false', do not overwrite configuration
files, and do not purge any files from the target
directory. If not specified, the script will prompt
for the appropriate action on a per-file basis.
""" % (os.path.basename(sys.argv[0])))
if errstr:
stream.write("ERROR: %s\n\n" % (errstr))
sys.exit(1)
else:
print " ", src
set_paths = 0
compile_it = fname[-3:] == '.py'
InstallFile(src, dst, 0644, set_paths, prompt_replace, compile_it)
sys.exit(0)
# prompt to delete all .py and .pyc files that don't belong in installation
full_dst_path = os.path.join(DESTDIR + ROOT_DIR, dst_path)
for fname in os.listdir(full_dst_path):
if not os.path.isfile(os.path.join(full_dst_path, fname)) or \
not ((fname[-3:] == '.py' and fname not in files) or
(fname[-4:] == '.pyc' and fname[:-1] not in files)):
continue
while 1:
temp = raw_input("""
File %s does not belong in ViewVC %s.
DO YOU WANT TO,
delete [d]
leave as is [l]: """ % (os.path.join(dst_path, fname), version))
print
temp = string.lower(temp[0])
if temp == "l":
break
if temp == "d":
os.unlink(os.path.join(full_dst_path, fname))
break
## MAIN
if __name__ == "__main__":
# option parsing
# Option parsing.
try:
optlist, args = getopt.getopt(sys.argv[1:], "", ['prefix=', 'destdir='])
optlist, args = getopt.getopt(sys.argv[1:], "h?",
['prefix=',
'destdir=',
'clean-mode=',
'help'])
except getopt.GetoptError, e:
Error("Invalid option", getopt.GetoptError, e)
usage_and_exit(str(e))
for opt, arg in optlist:
if opt == '--prefix':
ROOT_DIR = arg
if opt == '--destdir':
DESTDIR = arg
if opt == '--help' or opt == '-h' or opt == '-?':
usage_and_exit()
if opt == '--prefix':
ROOT_DIR = arg
if opt == '--destdir':
DESTDIR = arg
if opt == '--clean-mode':
arg = arg.lower()
if arg not in ('true', 'false'):
usage_and_exit("Invalid value for --overwrite parameter.")
CLEAN_MODE = arg
## print greeting
print INFO_TEXT
# Print the header greeting.
print """This is the ViewVC %s installer.
## prompt for ROOT_DIR if none provided
It will allow you to choose the install path for ViewVC. You will now
be asked some installation questions. Defaults are given in square brackets.
Just hit [Enter] if a default is okay.
""" % version
# Prompt for ROOT_DIR if none provided.
if ROOT_DIR is None:
if sys.platform == "win32":
pf = os.getenv("ProgramFiles", "C:\\Program Files")
default = os.path.join(pf, "viewvc-" + version)
else:
default = "/usr/local/viewvc-" + version
temp = string.strip(raw_input("Installation path [%s]: " % default))
print
if len(temp):
ROOT_DIR = temp
else:
ROOT_DIR = default
## prompt for DESTDIR if none provided
if sys.platform == "win32":
pf = os.getenv("ProgramFiles", "C:\\Program Files")
default = os.path.join(pf, "viewvc-" + version)
else:
default = "/usr/local/viewvc-" + version
temp = string.strip(raw_input("Installation path [%s]: " \
% default))
print
if len(temp):
ROOT_DIR = temp
else:
ROOT_DIR = default
# Prompt for DESTDIR if none provided.
if DESTDIR is None:
default = ''
temp = string.strip(raw_input(
"DESTDIR path (generally, only package maintainers will need "
"to change\nthis) [%s]: " % default))
print
if len(temp):
DESTDIR = temp
else:
DESTDIR = default
## install the files
print "Installing ViewVC to:", ROOT_DIR,
if DESTDIR:
print "(DESTDIR = %s)" % (DESTDIR)
else:
print
default = ''
temp = string.strip(raw_input(
"DESTDIR path (generally only used by package "
"maintainers) [%s]: " \
% default))
print
if len(temp):
DESTDIR = temp
else:
DESTDIR = default
# Install the files.
print "Installing ViewVC to %s%s:" \
% (ROOT_DIR, DESTDIR and " (DESTDIR = %s)" % (DESTDIR) or "")
for args in FILE_INFO_LIST:
print " ", args[0]
apply(InstallFile, args)
apply(install_file, args)
for args in TREE_LIST:
apply(install_tree, args)
apply(install_tree, args)
# Print some final thoughts.
print """
ViewVC File Installation Complete
ViewVC file installation complete.
Consult INSTALL for detailed information to finish the installation
and configure ViewVC for your system.
Consult the INSTALL document for detailed information on completing the
installation and configuration of ViewVC on your system. Here's a brief
overview of the remaining steps:
Overview of remaining steps:
1) Edit the %s file.
1) Edit the %s file.
2) Configure an existing web server to run (or copy to cgi-bin)
%s.
OR
Run the web server that comes with ViewVC at
%s.
""" % (
os.path.join(ROOT_DIR, 'viewvc.conf'),
os.path.join(ROOT_DIR, 'bin', 'cgi', 'viewvc.cgi'),
os.path.join(ROOT_DIR, 'standalone.py'))
2) Either configure an existing web server to run
%s.
Or, copy %s to an
already-configured cgi-bin directory.
Or, use the standalone server provided by this distribution at
%s.
""" % (os.path.join(ROOT_DIR, 'viewvc.conf'),
os.path.join(ROOT_DIR, 'bin', 'cgi', 'viewvc.cgi'),
os.path.join(ROOT_DIR, 'bin', 'cgi', 'viewvc.cgi'),
os.path.join(ROOT_DIR, 'bin', 'standalone.py'))

View File

@@ -142,8 +142,9 @@ use_rcsparse = 0
address = <a href="mailto:cvs-admin@insert.your.domain.here">No admin address has been configured</a>
#
# This should contain a list of modules in the repository that should not be
# displayed (by default or by explicit path specification).
# This should contain a list of modules (that is, top-level directories within
# repositories) that should not be displayed (by default or by explicit path
# specification).
#
# This configuration can be a simple list of modules, or it can get quite
# complex:
@@ -162,8 +163,9 @@ address = <a href="mailto:cvs-admin@insert.your.domain.here">No admin address ha
#
# Tests are case-sensitive.
#
forbidden =
# NOTE: This is for the hiding of modules within repositories, *not*
# for the hiding of repositories (roots) themselves.
#
# Some examples:
#
# Disallow "example" but allow all others:
@@ -184,6 +186,40 @@ forbidden =
# Allow "xml", forbid other modules starting with "x", and allow the rest:
# forbidden = !xml, x*, !*
#
forbidden =
#
# This is similar to 'forbidden', but differs in some key ways:
#
# *) Rather than shell-style "glob" expressions, the values in this
# list are regular expressions. You can still prepend a ! character
# to each regular expression to invert its meaning, though.
#
# *) It compares not against modules only, but against paths consisting
# of the repository (or root) name plus the path of the versioned file
# or directory to be tested. For example, to see if the user is
# authorized to see the path "/trunk/www/index.html" in the repository
# whose root name is "svnrepos", this authorizer will test the path
# "svnrepos/trunk/www/index.html" against the list of forbidden regular
# expressions. Directory paths will be terminated by a forward slash.
#
# NOTE: Use of this configuration option will *disable* any configuration of
# the 'forbidden' option -- they cannot be used simultaneously.
#
# Some examples:
#
# Disallow files named "PRIVATE", but allow all others:
# forbiddenre = /PRIVATE$
#
# Allow only the "example1" and "example2" roots and the paths inside them,
# disallowing all others (which can be done in multiple ways):
# forbiddenre = !^example1(/|$), !^example2(/|$)/
# forbiddenre = !^example[12](/|$)
#
# Only allow visibility of HTML files and the directories that hold them:
# forbiddenre = !^.*(/|\.html)$
#
forbiddenre =
#
# This option provides a mechanism for custom key/value pairs to be
@@ -359,6 +395,9 @@ hr_ignore_keyword_subst = 1
#
hr_intraline = 0
# allow on-the-fly generation of repository tarballs
allow_tar = 0
# allow annotation of files.
allow_annotate = 1
@@ -459,16 +498,14 @@ highlight_convert_tabs = 2
use_php = 0
# path to php executable
# (This should be set to the path of a PHP CLI executable, not the path
# to a CGI executable. If you use a CGI executable, you may see "no input file
# specified" or "force-cgi-redirect" errors instead of colorized source. The
# output of "php -v" tells you whether an given executable is CLI or CGI.)
php_exe_path = php
# php_exe_path = /usr/local/bin/php
# php_exe_path = C:\Program Files\php\cli\php.exe
#
# ViewVC can generate tarball from a repository on the fly.
#
allow_tar = 0
# allow_tar = 1
#
# Use CvsGraph. See http://www.akhphd.au.dk/~bertho/cvsgraph/ for
# documentation and download.

View File

@@ -18,7 +18,7 @@
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>

View File

@@ -18,7 +18,7 @@
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>

View File

@@ -18,7 +18,7 @@
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>

View File

@@ -18,7 +18,7 @@
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>
@@ -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

@@ -0,0 +1,95 @@
#!/bin/sh
DATE=`date +"%Y%m%d"`
EXPORTDIR="viewvc-${DATE}"
PUBLISH_DIR=/www/viewvc/nightly
# export HEAD of trunk
svn export --quiet http://viewvc.tigris.org/svn/viewvc/trunk ${EXPORTDIR} --username guest --password ""
# use Python to determine the version number, reading it from
# viewvc.__version__
cd $EXPORTDIR/lib
VERSION=`python -c "import viewvc; print viewvc.__version__"`
TARGET=viewvc-${VERSION}-${DATE}
# make a release
cd ../tools
./make-release ${TARGET}
# remove results of last build
rm -rf ${PUBLISH_DIR}/viewvc*.tar.gz ${PUBLISH_DIR}/viewvc*.zip ${PUBLISH_DIR}/index.html
# publish new build
mv ${TARGET}.* ${PUBLISH_DIR}
cd ../..
cat > ${PUBLISH_DIR}/index.html <<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ViewVC: Nightly Snapshots</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../styles.css"/>
</head>
<body>
<div id="title">
<a href="http://www.viewvc.org/"><img
src="../images/title.jpg" alt="ViewVC: Repository Browsing"/></a>
</div>
<div id="menu">
<p><a href="../index.html">Home</a> |
<a href="http://viewvc.tigris.org/">Project Page</a> |
<a href="../download.html">Download</a> |
<a href="../contributing.html">Contributing</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="../contact.html">Contact</a> |
<a href="../who.html">About</a>
</p>
</div>
<table id="pagetable">
<tr>
<td id="pagecolumn1">
<h4>On this page:</h4>
<ul id="bookmarks">
<li><a href="#sec-snapshots">Snapshots</a></li>
</ul>
<p><a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
</td>
<td id="pagecolumn2">
<div class="section">
<h2 id="sec-snapshots">Snapshots</h2>
<ul>
EOF
echo "<li><a href=\"${TARGET}.tar.gz\">${TARGET}.tar.gz</a></li>" >> ${PUBLISH_DIR}/index.html
echo "<li><a href=\"${TARGET}.zip\">${TARGET}.zip</a></li>" >> ${PUBLISH_DIR}/index.html
cat >> ${PUBLISH_DIR}/index.html <<EOF
</ul>
</div>
</td>
</tr>
</table>
</body>
</html>
EOF
# more cleanup
rm -rf ${EXPORTDIR}

View File

@@ -18,7 +18,7 @@
<a href="./download.html">Download</a> |
<a href="./upgrading.html">Upgrading</a> |
<a href="./contributing.html">Contributing</a> |
<a href="./license-1.html">License</a> |
<a href="http://viewvc.tigris.org/nonav/source/browse/*checkout*/viewvc/trunk/LICENSE.html">License</a> |
<a href="./contact.html">Contact</a> |
<a href="./who.html">About</a>
</p>

View File

@@ -14,7 +14,7 @@ ViewVC requires the Python interpreter which you can download from
and the Python for Windows Extensions which are at
http://starship.python.net/crew/mhammond/win32/
http://sourceforge.net/projects/pywin32/
For CVS support, ViewVC also requires that the CVSNT client (cvs.exe) OR the
RCS tools (rlog.exe, rcsdiff.exe, and co.exe) be installed on your computer.
@@ -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
@@ -404,7 +404,7 @@ KNOWN ISSUES
page would always return nothing (leaving the screen blank). There were a
number of workarounds for this problem, but the fix is to download and
install the latest python win32 extensions from
http://starship.python.net/crew/mhammond/win32/Downloads.html
http://sourceforge.net/projects/pywin32/
- ViewVC can't convert timestamps on diff pages to local time when it is used
with CVSNT. This is caused by a CVSNT bug, which is described at

View File

@@ -1,63 +0,0 @@
<html>
<head>
<title>ViewVC - Version Control Repository Browser</title>
<!-- Custom stylations to hide the obnoxious project info -->
<style type="text/css">
#projecthome .axial { display: none; }
#apphead h1 { display: none; }
#longdescription { border: none; }
#longdescription h2 { display: none; }
#customcontent h2 { display: block; }
</style>
<!-- End custom stylations -->
</head>
<body>
<div class="app" id="customcontent">
<h1>ViewVC &mdash; Web-based Version Control Repository Browsing</h1>
<div class="h2">
<h2>What Is ViewVC?</h2>
<p>ViewVC is a browser interface for CVS and Subversion version
control repositories. It generates templatized HTML to present
navigable directory, revision, and change log listings. It can
display specific versions of files as well as diffs between those
versions. Basically, ViewVC provides the bulk of the report-like
functionality you expect out of your version control tool, but much
more prettily than the average textual command-line program
output.</p>
<p>Here are some of the additional features of ViewVC:</p>
<ul>
<li>Support for filesystem-accessible CVS and Subversion repositories</li>
<li>Individually configurable virtual host support</li>
<li>Line-based annotation/blame display</li>
<li>Revision graph capabilities (<em>CVS only</em>)</li>
<li>Syntax highlighting support</li>
<li>Commit metadata query facilities</li>
<li>Template-driven output generation</li>
<li>Colorized, side-by-side differences</li>
<li>Tarball generation (by tag/branch for CVS, by revision for
Subversion)</li>
<li>Localization support based on the Accept-Language request header</li>
<li>Ability to run either as CGI script or as a standalone
server</li>
<li>Regexp-based file searching</li>
<li>INI-like configuration file (as opposed to requiring actual code
tweaks)</li>
</ul>
<p>For a complete list of changes present in each release, see
ViewVC's <a
href="http://viewvc.tigris.org/source/browse/viewvc/trunk/CHANGES?rev=HEAD"
>CHANGES</a> file.</p>
</div>
</div>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!-- Overrides the left-nav tool bar on viewvc.tigris.org, a feature
specific to tigris.org's CEE branding. See www/overrides/ in the
look.tigris.org project for details. -->
<!-- dd --><ul>
<li><a href="http://www.viewvc.org/"
>Project website</a></li>
<!-- #################################################### --></ul></dd><dd><ul>
<li><a href="http://viewvc.tigris.org/servlets/ProjectMemberList"
>Membership</a></li>
<!-- #################################################### --></ul></dd><dd><ul>
<li><a href="http://viewvc.tigris.org/servlets/ProjectNewsList"
>Announcements</a></li>
<!-- li><a href="http://viewvc.tigris.org/servlets/ProjectForumView"
>Discussion forums</a></li -->
<li><a href="http://viewvc.tigris.org/servlets/ProjectMailingListList"
>Mailing lists</a></li>
<li><a href="http://viewvc.tigris.org/servlets/ProjectDocumentList"
>Documents &amp; files</a></li>
<li><a href="http://viewvc.tigris.org/source/browse/viewvc/"
>Subversion</a></li>
<li><a href="http://viewvc.tigris.org/issues/buglist.cgi?component=viewvc&amp;issue_status=UNCONFIRMED&amp;issue_status=NEW&amp;issue_status=STARTED&amp;issue_status=REOPENED"
>Issue tracker</a></li>
</ul><!-- /dd -->