Commit Graph

811 Commits (fa035c8ae7166b1b59ef31ca3b1f22bead68efe5)

Author SHA1 Message Date
cmpilato fa035c8ae7 * lib/vclib/svn/__init__.py
Bump version requirement to Subversion 1.3.1.  Also, remove
  unnecessary pools from the entirety of the module.

* lib/vclib/svn_ra/__init__.py
  Bump version requirement to Subversion 1.3.1.

* INSTALL
  Bump Subversion version requirement to Subversion 1.3.1.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1475 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-09 20:47:45 +00:00
cmpilato d83ff39472 Followup to r1439, with the correct logic in generate_page().
* lib/viewvc.py
  (generate_page): Reverse the logic in the if/else to be correct.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1473 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-09 17:55:25 +00:00
cmpilato 118c6cc35e Allow ViewVC to work when rcsparse is backed by the tparse module.
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
  Use rcsparse.parse() instead of rcsparse.Parser.parse() throughout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1472 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-08 20:01:40 +00:00
cmpilato 5f22029349 * lib/vclib/ccvs/rcsparse/common.py
Remove dependency on compat.  It's time for rcsparse to be free, and by
  golly, it's okay if it requires Python 2.0 now to do it.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1471 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-08 19:59:11 +00:00
cmpilato ac60888eaf Add some debug code to facilitate tarball generation debugging.
* lib/debug.py
  (SHOW_TIMES, SHOW_CHILD_PROCESSES): Add some explanatary comments.
  (TARFILE_PATH): New.

* lib/viewvc.py
  (download_tarball): When tarball debugging is enabled, generate the tarfile
    at the configured location, and deliver either a cheap success message
    or an error view to the browser.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1461 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-01 14:24:41 +00:00
cmpilato 818c168978 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.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1456 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-18 01:11:33 +00:00
cmpilato 8845bc551f Merge security fix made in r1446 from 1.0.x to trunk. That log message read:
Dictate UTF-8 as the output character set for all ViewVC
   template-driven views.
   
   * 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/trunk@1450 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 20:48:05 +00:00
cmpilato 1171d112b7 * lib/vclib/svn/__init__.py
(get_revision_info): Removing some debugging code accidentally
    committed in r1443.  Because life would be too easy if cmpilato
    weren't a sloppy coder, and we certainly can't have *that*.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1444 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 19:44:29 +00:00
cmpilato c41ffe04e2 Followup to r1440, in which I butchered some code under the guise of
fixing issue #265.  Sheesh.

* viewvc/lib/vclib/svn/__init__.py
  (get_revision_info): Store ChangedPath items in a different hash
    than the one we get from the Subversion bindings so replacement
    detection works.  While here, add support for Subversion 1.4.0's
    new 'action' changed item member.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1443 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 19:26:03 +00:00
cmpilato 5bf80b54f4 *** WARNING: THIS CHANGE BREAKS STUFF; ALSO NEED r1443 and r1444 ***
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.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1440 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-13 15:59:00 +00:00
cmpilato a6cad82e55 Remove some redundancy by teaching generate_page(), which is *always*
immediately preceded by a call to request.server.header(), to just
make that call itself.

* lib/viewvc.py
  (generate_page): Add 'content_type' parameter, and handle the call
    to request.server.header() here instead of it always preceding
    calls to this function.
  (view_markup, view_roots, view_directory, view_log, view_annotate,
   view_cvsgraph, view_diff, view_revision, view_queryform): Lose
    calls to request.server.header() -- generate_page() does this for
    us now.
  (view_query): Update calls to generate_page(), and lose calls to
    request.server.header().



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1439 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-12 17:04:15 +00:00
rey4 aaf85a14a6 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


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1428 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-09-27 20:06:22 +00:00
cmpilato acd8ab25e9 Minor vclib interface cleanup, adding a new Annotation object, and
having the Repository.annotate() implementations return lists of them
(instead of lists of those cool-but-overused-_item-thingies).

* lib/vclib/__init__.py
  (Repository.annotate): Note that this interface now returns
    Annotation objects.
  (Annotation): New.
  Also, do some docstring addition/modification elsewhere in this file.

* lib/vclib/ccvs/blame.py
  (BlameSource.__getitem__): Return vclib.Annotation objects now.
  (_item): Remove as unneeded.

* lib/vclib/svn/__init__.py
  (BlameSource.__getitem__): Return vclib.Annotation objects now.
  (_item): Remove as unneeded.

* lib/vclib/svn_ra/__init__.py
  (SubversionRepository._blame_cb): Store vclib.Annotation objects now.
  (_item): Remove as unneeded.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1427 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-18 22:35:14 +00:00
cmpilato 41e1ae4171 Expose the path for each root in the [roots] common template data
object, again with the same warnings applied to [rootpath] in r1425.

* lib/viewvc.py
  (common_template_data):  Expose the path for each root in the "roots"
    data item.

* docs/upgrading-howto.html,
* docs/template-authoring-guide.html
  Update the docs.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1426 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-18 16:05:29 +00:00
cmpilato eb70cfaaec * lib/viewvc.py
(common_template_data): Expose request.rootpath as "rootpath".

* docs/upgrading-howto.html,
* docs/template-authoring-guide.html
  Note this new exposition, though with a warning about its use in an
  insecure environment.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1425 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-17 15:20:44 +00:00
cmpilato 7a51a39ba0 * lib/compat.py
(mkdtemp): Flesh out the parameter list for mkdtemp(), passing those
    params to mktemp().

* viewvc/lib/viewvc.py
  (MarkupEnscript.__call__): Give the temporary directory a "viewvc"
    prefix so it is more easily identifiable in the case of a
    problem.  Also, fix a minor indentation inconsistency.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1424 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-16 23:59:12 +00:00
cmpilato 3dcc42d802 Fix a bug noticed by Michael Guntsche <mike@it-loops.com> which caused
file formats covered by custom "streamer" syntax highlighters to not
be passed through escript or highlight when their respective custom
stream was disabled.

* lib/viewvc.py
  (view_markup): Correct the syntax highlighter choosing logic.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1422 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-16 16:25:46 +00:00
cmpilato 696feb50e0 Fix some bugs introduced in r1407. Noticed by maxb.
* lib/viewvc.py
  (download_tarball): Don't reference non-existant variable cfg until
    creating it as a reference to request.cfg.
  (MarkupPHP.__init__): Drop the 'php_exe_path' variable, and add
    'cfg'.  Use 'cfg' to get at the 'php_path' configury.
  (markup_stream_php): Update call to MarkupPHP().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1421 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-03 21:39:46 +00:00
cmpilato f64490de1c Finish issue #245 by making the generated RSS feed URL match
scheme-wise with the URL used to access ViewVC.  Patch by Troels Arvin
<tarvin@tigris.org>, tweaked by cmpilato.

* 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.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1417 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 18:12:30 +00:00
cmpilato 491e02f504 * 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.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1416 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 17:07:07 +00:00
cmpilato 60991a4743 Finish issue #208 (Annotate aborts on #include "./filename"). Patch
more or less by Russell Yanofsky.

* 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).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1414 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 16:45:35 +00:00
cmpilato 528d4aec3d Cleanup ViewVC's configuration and use of external utilities by
creating a new section of the configuration file strictly for defining
the locations of these helper applications.

This closes issue #229 (configurable path to sed) and issue #62
(configurable path to diff), and perhaps others I failed to find.

* viewvc.conf.dist
  Add a new "utilities" section for corraling all the various
  tool-location configurations, and relocate (with some tweaks) a
  bunch of options:
     general.rcs_path => utilities.rcs_dir
     general.cvsnt_ext_path = utilities.cvsnt
     general.svn_path => utilities.svn
     options.enscript_path => utilities.enscript
     options.highlight_path => utilities.highlight
     options.py2html_path => utilities.py2html_dir
     options.php_exe => utilities.php
     options.cvsgraph_path => utilities.cvsgraph
     utilities.diff (new)
     utilities.gzip (new)
     utilities.sed (new)
     options.use_py2html (new)

* lib/config.py
  (_sections): Add 'utilities' section.
  (Config.set_defaults): Reflect options tweaks made to
    viewvc.conf.dist in the code here.

* lib/viewvc.py
  (Request.run_viewvc): Track renamed utilities.svn option.  Now pass
    cfg.utilities into BinCVSRepository(), CCVSRepository(), and
    SubversionRepository().  Collapse now-identical
    SubversionRepository() calls.
  (markup_stream_python): Return immediately if options.use_py2html
    isn't set.  Track renamed utilities.py2html_dir option.
  (view_cvsgraph_image, view_cvsgraph): Track renamed
    utilities.cvsgraph option.
  (MarkupPHP.__init__): Track renamed utilities.php option, and allow
    for 'php' as a fallback value.
  (MarkupHighlight.__init__): Track renamed utilities.highlight option.
  (MarkupEnscript.__init__): Track renamed utilities.enscript option,
    and honor new utilities.sed option.
  (download_tarball): Use new utilities.gzip option.

* lib/vclib/__init__.py
  (_diff_fp.__init__): Add 'diff_cmd' parameter.

* lib/vclib/svn/__init__.py
  (SubversionRepository.__init__): Drop 'svn_path' parameter, and now
    accept 'utilities'.
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/svn_ra/__init__.py
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff): Pass self.utilities.diff or 'diff' to _diff_fp().

* lib/vclib/bincvs/__init__.py
  (CVSRepository.__init__): Add 'utilities' parameter.
  (BinCVSRepository.__init__): Lose as no-longer-necessary.
  (BinCVSRepository.rcs_popen): Track renamed options, and renamed
    member variable that hold those options.

* docs/upgrading-howto.html
  Note these options changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1407 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-28 11:04:12 +00:00
cmpilato 8612acd3c2 * lib/viewvc.py
(common_template_data): Populate tarball_href data dictionary member here,
    instead of ...
  (view_directory): ... here.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1399 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-24 14:52:39 +00:00
cmpilato 3d98a33ce7 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/trunk@1396 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-21 09:47:19 +00:00
cmpilato 323f09f7af Finish issue #250 -- Tarballs from Subversion repositories don't
preserve empty directories.

* 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).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1384 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 20:03:15 +00:00
cmpilato b12a220928 Finish issue #249.
* lib/query.py
  (main): Add 'rss_href' to the data dictionary so the template
    doesn't freak out.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1382 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 18:32:42 +00:00
cmpilato bb4204af9a Finish issue #241.
* 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.
   


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1377 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 15:47:18 +00:00
cmpilato 2fcd41ded0 Finish issue #237.
Patch by: Russell Yanofsky <russ@yanofsky.org>
Verified by: Oliver Koltermann <ok1@tigris.org>

* lib/vclib/bincvs/__init__.py
  (_tag_tuple): Return () instead of raising a ValueError for
    single-component revisions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1375 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 15:29:25 +00:00
maxb 87bbbba821 * lib/vclib/ccvs/rcsparse/texttools.py: Document what the texttools tag table
actually means, in terms of logical control flow.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1373 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-06-02 18:10:52 +00:00
maxb b9102d4649 Resolve some inconsistency in the rcsparse library, concerning the parsing of
colons, which has an impact on symbols and locks.

Fixes a bug where the texttools backend would fail to parse RCS files
containing locks.

Fixes inelegance in the default backend, which no longer needs to override a
rather large chunk of the common code.

* lib/vclib/ccvs/rcsparse/default.py
  (_TokenStream.token_term): Add colon to set.
  (_TokenStream.get): Handle colon as a discrete token, just like semicolon.
  (Parser.parse_rcs_admin): Remove override definition entirely.

* lib/vclib/ccvs/rcsparse/common.py
  (_Parser.parse_rcs_admin): Fix "locks" clause to be consistent with colon
    being a token.

Lastly, the tparse backend: the changes made here are roughly congruent to
those made to the default backend, however they are completely untested, since
the current tparse in the repository seems broken - it dies due to memory
corruption.

* tparse/tparse.cpp (Token_term): Add colon to set.
  (TokenParser::get): Handle colon as a discrete token, just like semicolon.
  (tparseParser::parse_rcs_admin): Remove bizarre code which attempted to
    handle both the case of being, and not being, a discrete token via runtime
    detection.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1371 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-26 23:18:46 +00:00
cmpilato 464cf13729 * lib/viewvc.py
(DiffSource.__init__, DiffSource._get_row, DiffSource._flush_row):
    Add support for tracking the left-hand line numbers, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1366 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-20 07:19:32 +00:00
cmpilato f70e9fdc4e * lib/viewvc.py
(view_diff): Fix call to common_template_data(), and avoid a path-from-parts
    reconstruction that's already been performed.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1365 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-20 07:08:53 +00:00
cmpilato 0e750439f8 Merge the commonize-navdata branch into the trunk. For change log
information, see these revisions:

r1348 | cmpilato | 2006-04-25 10:01:17 -0400 (Tue, 25 Apr 2006) | 17 lines
r1343 | cmpilato | 2006-04-20 04:00:21 -0400 (Thu, 20 Apr 2006) | 23 lines


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1364 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-19 15:40:24 +00:00
rey4 3fdfabc8ee 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/trunk@1357 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-05-15 22:21:15 +00:00
rey4 669ea3162b Implement support for full diffs. Change based on a patch from
Jacob Nevins (sourceforge user "jtn") in issue 153.

* lib/vclib/__init__.py
  (_diff_args): perform full diff when "context" option is None
  
* lib/viewvc.py
  (view_diff): add logic for full diffs
  
* templates/diff.ezt
* templates/include/diff_form.ezt
    add option for full diffs

* viewvc.org/template-authoring-guide.html
* viewvc.org/url-reference.html
    update documentation for "diff_format" template variable and url param
  
    


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1346 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-23 21:53:00 +00:00
rey4 eb5ccaf906 Fix bug intepreting EZT substitution patterns
* lib/ezt.py
  (_write_value): fix logic error from wrong indentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1344 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-21 13:27:20 +00:00
cmpilato e0d1a728a5 Fix a bug in the revision view URL generation and auto-upgrade.
* lib/viewvc.py
  (Request.run_viewvc): Translate 'rev' parameter to 'revision'
    (instead of to 'pathrev') in the revision view.

* templates/revision.ezt
  Use "revision" instead of "rev" for the jump_rev form input box.
  Patch by fengxj <fengxiangjun@neusoft.com>.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1339 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-20 06:53:42 +00:00
cmpilato 4c96e86027 Make the dir_new template able to show as much of the log message as
can fix on the screen, and have a fixed layout (which promotes rapid
navigation).

* lib/viewvc.py
  (view_directory): Don't truncate rows.log any more, but provide a
    new member rows.short_log that is truncate.

* viewvc.org/upgrading.html
  Note rename of directory entries' "log" variable to "short_log".

* viewvc.org/template-authoring-guide.html
  Describe entries.log and (new) entries.short_log.

* templates/docroot/styles.css
  (table.fixed, table.fixed td): New fixed table styles, for use with
    the dir_new template.

* templates/dir_new.ezt
  Use new fixed table styles, and display as much of the log messages
  as screen-real-estate-ily possible (with ellipsis for truncation on
  IE, even).

* templates/directory.ezt
  Use entries.short_log now instead of entries.log.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1335 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-14 04:58:33 +00:00
rey4 9bc2a1e1f2 Make rlog parsing compatible with output from Debian's 5.7-18
RCS package, which outputs CVS commit ids when present. Change
based on patch Olivier 'zer0' MATZ <zer0@droids-corp.org>
sent to the issues list.

* lib/vclib/bincvs/__init__.py
  (_re_log_info): update to match lines with commit ids


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1333 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-14 03:45:31 +00:00
cmpilato 3c55e5eaf8 * lib/viewvc.py
(__version__): Bump to 1.1-dev.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1328 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-06 19:54:29 +00:00
rey4 c195eb1e46 Restore ViewCVS 0.9.x behavior when "checkout_magic" option is disabled
so disabling it doesn't break compatibility with old log URLs.

Add new "default_file_view" option so people who won't miss the old log
URLs can view static HTML sites in ViewVC without using checkout_magic.

Also, deprecate the "checkout_magic" option and make it disabled by
default. Don't want that last part to get lost, so I'll repeat:

  =================================================================
   WARNING: This commit changes the default "checkout_magic" value
  =================================================================

Reasons for disabling "checkout_magic" by default include the security
hole it leaves for people trying to do URL authorization and its general
ugliness. People who actually use "checkout_magic" for the static HTML
browsing should prefer the "default_file_view" syntax now that it
is available. And people who really need "checkout_magic" for the
compatibility with ViewCVS 0.9.x log URLs can easily enable it.

* lib/viewvc.py
  (Request.run_viewvc, Request.get_link):
     handle "checkout_magic" and "default_file_view" options

* lib/config.py
* viewvc.conf.dist
    add "default_file_view" option and disable "checkout_magic" by default

* CHANGES
* viewvc.org/upgrading.html
* viewvc.org/url-reference.html
    update documentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1311 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-04 03:11:02 +00:00
cmpilato a889e3280a * lib/viewvc.py
(Request.run_viewvc): Don't overwrite good parameters 'pathrev' and
    'revision' with old 'rev' values.  And revert a little change from r1299
    which caused some of the redirect logic to be skipped in we're already
    done the 'rev'-to-something-else translation.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1308 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-03 14:50:32 +00:00
rey4 9d9092cb08 Fix ambiguities in URL handling for tarballs. These ambiguites didn't
lead to problems that anyone was likely to encounter, but should be fixed
now that we're trying to come up with a solid URL specification.

Problem #1 is that the .tar.gz suffix was not always being stripped from
the URL path, instead it was only stripped when the path did not exist in
the repository. This meant that a tarball URL like 
"/viewvc.cgi/my/path.tar.gz?view=tarball" would stop working if a
real file or directory called "my/path.tar.gz" were ever added to the
repository. The new code just strips the ".tar.gz" suffix unconditionally.

Problem #2 is a little hairier. It is the topic of issue 210 that was
partially addressed in r1256. The issue after that change was that a URL
like "/viewvc.cgi/REPOS-root.tar.gz?view=tarball&root=REPOS" would stop
working correctly if a directory called "REPOS-root" was ever added to
to repository. Before the directory was added, the URL would download a tarball
of the whole repository. After, the tarball would contain the only the
directory. When "root_as_path_component" mode is enabled, the fix for this
is simple, we just change the syntax for a whole-repository tarball to look
like "/viewvc.cgi/REPOS.tar.gz", which leaves no ambiguity. When
root_as_path_component is disabled, the ambiguity has to be resolved in an
ugly way, by having ViewVC tack on an extra parameter ("parent=1") to root
tarball URLs to distinguish them from directory tarball URLs.

Old tarball URLs that worked before this change should continue to work,
though some of them will redirect to URLs using the "parent" parameter
and other newness.

* lib/viewvc.py
  (Request.run_viewcvs):
     add tarball suffix handling that doesn't depend on what paths exist in
     the repository. Keep the old tarball suffix code around, but only for
     the sake of handling old-style URLs and issuing redirects

  (Request.get_link):
     change the preferred links to root tarballs

  (_legal_params): add "parent" parameter

* viewvc.org/url-reference.html
    mention new "parent" parameter


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1303 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-02 20:43:11 +00:00
rey4 95ad462037 * lib/viewvc.py
(view_log): don't add unused parameter to "select for diff" links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1302 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-02 18:39:40 +00:00
cmpilato 11127db6f6 * lib/viewvc.py
(_orig_path): Update comment which include 'rev=' examples.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1300 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-31 00:16:16 +00:00
cmpilato da94713852 * lib/viewvc.py
(Request.run_viewvc): Move the 'rev' param auto-translation up a bit,
    and don't perform pathtype checks if we're already in need-to-redirect
    mode.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1299 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-31 00:05:45 +00:00
cmpilato db3e7c3e00 Rename the 'rev' CGI parameter to 'revision' so that ViewVC can detect
URLs that predate the new 'pathrev' stuff, and graciously upgrade
those to the new format.  

NOTE: URLs created between the introduction of 'pathrev' and now might
break, but this was deemed an acceptable cost.

Suggested by:  Russell Yanofsky

* lib/viewvc.py
  (_legal_params): Add 'revision' as a copy of 'rev'.
  (Request.run_viewvc): Redirect URLs that have an old-style 'rev'
    parameter.  (For Subversion, those become 'pathrev' params; for
    CVS they become 'revision' params.)
  (): Generate URLs using the new 'revision' param instead of 'rev'.

* viewvc.org/url-reference.html
  Track the new URL syntax.  I did *not* do the work of documenting the
  old syntax and how it maps to the new.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1298 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-30 23:48:12 +00:00
rey4 fe995627d3 Get rid of Highlight line number workaround. Highlight 2.4.5 came out
yesterday and fixes all the issues we had with line numbering. This change
also allows ViewVC to work with old versions of Highlight all the way back
to 2.2.10.

Also, remove "highlight_style" configuration option as suggested by
Andreas Amann (aamann) in issue 126.

* INSTALL
    document new version requirements
    
* lib/viewvc.py
  (MarkupHighlight.__init__):
    stop passing --style and --line-number-start options to highlight

* lib/config.py
* viewvc.conf.dist
* viewvc.org/upgrading.html
    remove "highlight_style" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1292 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-21 22:47:11 +00:00
rey4 176ede2fef Get rid of the "derived from cvsweb" notice at the top of viewvc.py
as Greg Stein suggested in issue 167.

* lib/viewvc.py


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1291 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-20 03:39:54 +00:00
rey4 72459917f7 Restore copyright statements for Curt Hagenlocher accidentally
deleted in r1288

* lib/blame.py
* lib/vclib/ccvs/blame.py


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1290 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-20 03:27:02 +00:00