Commit Graph

938 Commits (8916fe396952405f7fa9f837159fd6f14f6882f3)

Author SHA1 Message Date
cmpilato 8254d2d876 I think I'm finished messing around with source-highlight integration
now.  No, really!

* INSTALL
  Okay, no more messing around with lesser version.  source-highlight
  2.5 it is.

* lib/viewvc.py
  (MarkupSourceHighlight.__init__): Use 'sed' to strip unnecessary
    leading and close tags generated by source-highlight.  Also, pass
    a value of "l_" for the line number reference prefix, which makes
    this consistent with highlight's line IDs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1529 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 22:16:44 +00:00
cmpilato 85f7720267 Miscellaneous cleanups around the source-highlight integration.
* templates/docroot/styles.css
  Remove source-highlight styles.  We can't reliably get that program
  to generate real style names.

* viewvc.conf.dist
  (source_highlight): Fix the sample path.

* lib/viewvc.py
  (MarkupSourceHighlight): Rework this to pipe the file contents into
    source-highlight on stdin, and don't try to enable CSS output or
    anything fancy, because source-highlight has too many bugs in this
    area.  Use --failsafe mode.

* INSTALL
  Change the recommendation for the version of source-highlight.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1528 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 21:52:30 +00:00
cmpilato 473b853a5b Add optional integration with GNU source-highlight. Patch against
ViewVC 1.0.3 by Dirk Jagdmann <doj@tigris.org>, tweaked to adhere to
ViewVC 1.1-dev code and conventions by myself.

* viewvc.conf.dist
  (utilities.source_highlight, options.use_source_highlight,
   options.source_highlight_line_numbers): New.

* templates/docroot/styles.css
  Add new default styles for source-highlight output mode.

* lib/viewvc.py
  (MarkupSourceHighlight): New.

* lib/config.py
  (set_defaults): Set default values for utilities.source_highlight,
    options.use_source_highlight, and options.source_highlight_line_numbers.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1526 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 16:42:48 +00:00
cmpilato 77446e313a * lib/vclib/svn_ra/__init__.py
(created_rev): Because the way ra.svn_ra_get_dir() seems to work
    differently across versions of the Subversion Python bindings,
    build in some fault tolerance.  
    Tested by Eric Hanchrow <offby1@blarg.net>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1525 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-31 21:08:45 +00:00
cmpilato 310db99e62 * lib/vclib/svn_ra/__init__.py
(created_rev): Update use of ra.svn_ra_get_dir().

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1524 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-31 19:39:13 +00:00
cmpilato b597b6a485 Minor comment tweaks.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1523 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-26 20:03:03 +00:00
cmpilato 8f5e381f21 Fix issue #284 - Regression: "Modify query" link no longer functions.
* lib/viewvc.py
  (view_query): Restore a queryform_href calculation incorrect
    abstracted out (probably by me).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1520 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 20:56:28 +00:00
cmpilato 9e07c413fa Improve the error display when trying to view annotations on a binary file.
* lib/vclib/__init__.py
  (NonTextualFileContents): New Exception.

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): Translate the Subversion error
    SVN_ERR_CLIENT_IS_BINARY_FILE in the new vclib.NonTextualFileContents 
    exception.

* lib/viewvc.py
  (view_annotate): Catch the new vclib.NonTextualFileContents exception.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1514 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:47:37 +00:00
cmpilato 4750fd345c Finish issue #221 - Annotate confused by long author names
* lib/vclib/svn/__init__.py
  (_rootpath2url): New helper, cored from BlameSource.__init__().
  (BlameSource): Rework this class to use the Subversion client Python
    bindings, specifically a call to svn_client_blame2().
  (SubversionRepository.annotate): Use new _rootpath2url(), and
    update the called to BlameSource().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1512 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:31:02 +00:00
cmpilato 4f1259d64d * lib/vclib/svn/__init__.py
(_rev2optrev): Moved here from the svn_ra module.

* lib/vclib/svn_ra/__init__.py
  (_rev2optrev): Moved to the svn module (now pulled in indirectly).
  (SubversionRepository.__init__): Fix a leftover instance of a pool.
    Also, add a comment about svn_cmdline_setup_auth_baton().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1511 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:22:17 +00:00
cmpilato 79fe3a2919 Finish issue #22 - Query on Log Messages.
Add the ability to query the commit database by log message comment in
addition to the existing query parameters.

Patch by: David Skyba <davidskyba@users.sourceforge.net>

* lib/cvsdb.py
  (CheckinDatabase.CreateSQLQueryString): Add support for filtering
    query results by log message.
  (CheckinDatabaseQuery.__init__): Add new comment_list member.
  (CheckinDatabaseQuery.SetComment): New.

* lib/viewvc.py
  (_legal_params): Add 'comment' and 'comment_match' as valid query
    parameters.
  (view_queryform): Populate new 'comment' and 'comment_match' data
    dictionary items.
  (english_query, view_query): Handle the new 'comment' and
    'comment_match' query items.

* templates/query_form.ezt
  Add UI for filtering queries by log message.

* docs/url-reference.html
  (Query View): Note new comment= and comment_match= URL parameters.

* docs/template-authoring-guide.html
  (variables-query_form): Note new comment and comment_match data
    dictionary items.





git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1509 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 16:22:40 +00:00
cmpilato c3aabd8b7c 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.

  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1507 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 15:35:44 +00:00
cmpilato 5977b3c4fe * lib/compat.py
(mkdtemp): Fix the compatibility implementation's use of mktemp(),
    which prior to Python 2.3 (the same release that mkdtemp() shows
    up) only supported a single "suffix" argument.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1506 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-22 17:25:07 +00:00
cmpilato 59ecb71c51 * lib/viewvc.py
(view_directory): Initialize file.size, too.  A follow-up to r1504.
  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1505 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-22 17:15:24 +00:00
cmpilato ed664972cb Optimize directory displays where paging is enabled and sorting by
filename by first sorting, then only fetching the extended revision
metadata information for the items that would survive the page
filtering.

Patch by: Gustavo De Nardin <gustavodn@mandriva.com>
          (Tweaked by me.)

* lib/viewvc.py
  (view_directory): Only fetch dirlogs for directory entries that will be 
    on "this page".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1504 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-18 20:38:03 +00:00
cmpilato 04cb1cd74d Finish issue #262 - svndbadmin doesn't commit data to MySQL InnoDB tables
* 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".

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1500 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-05 23:05:14 +00:00
cmpilato cf862e4e68 * lib/cvsdb.py
(CheckinDatabase.AddCommit): Add some newlines, to purty up the
    Exception string.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1499 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-05 16:07:05 +00:00
cmpilato 497cc24bbe * lib/cvsdb.py
(CheckinDatabase.AddCommit): Add some more information to any Exceptions
    received while adding commits to the database.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1498 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-04 23:05:39 +00:00
cmpilato 39eab459b4 * lib/viewvc.py
(MarkupHighlight.__call__): Minor indentation fix.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1497 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-04 19:22:35 +00:00
cmpilato 6a03c7a4dd Add a new "uri" format to EZT.
NOTE: This is not currently used in ViewVC.  I needed it in another
piece of software, but wanted the tweaks to be publicly available
somewhere.

* lib/ezt.py
  (FORMAT_URI, _uri_printer): New.
  (_printers): Add mapping for new URI-formatting code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1495 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-02 15:39:51 +00:00
cmpilato a1c093ca2c For Issue #271, implement 'purge' commands for both cvsdbadmin and
svndbadmin.  Teach the 'rebuild' commands to first purge existing data
and then crawl the repository.  Also, drop support for the 'rev'
parameter to 'svndbadmin rebuild', adding instead a '--force' option
to 'svndbadmin update'.

Suggested, and SQL commands offered, by Mark <mark@mitsein.net>.

* lib/cvsdb.py
  (CheckinDatabase.sql_delete, CheckinDatabase.PurgeRepository): New.

* bin/svndbadmin
  (handle_revision): Add 'force' parameter, used to force update of
    commits already recorded in the database.
  (main): Add 'force' parameter, passed on to handle_revision().
    Handle the new 'purge' command, and teach 'rebuild' to also purge.
  (usage): Update usage info.
  (__main__): Add support for 'update --force' and 'purge', and drop
    support for 'rebuild rev'.  Add a KeyboardInterrupt handler.

* bin/cvsdbadmin
  (usage): Add 'purge' usage info.
  (__main__): Rework command-line parameter handling.  Add support for
    'purge' command, and make 'rebuild' first do a purge.

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1493 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-21 20:51:24 +00:00
cmpilato 1d2b2d9c35 Allow highlight to choose the syntax language based on the file's
extension and contents.

Patch by: Christophe Delmon <cdelmon@tigris.org>

(Now, if only we could make highlight stop telling us via Apache's
error_log every time it doesn't recognize a filetype...)

* lib/viewvc.py
  (MarkupHighlight.__init__): No longer calculate the file extension,
    and drop the --syntax argument to highlight.
  (MarkupHighlight.__call__): New.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1491 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-21 16:26:03 +00:00
rey4 bc295fb361 Interpret relative paths in viewvc.conf as being relative to the
directory where that file resides, instead of being relative to the
grandparent directory of viewvc.py. 

This change lets you set up multiple installations of ViewVC that 
share a common library directory, but are otherwise independent. It
also allows ViewVC to work more nicely with Gentoo's webapp-config.

Warning: This change may break ViewVC installations that use
VIEWVC_CONF_PATHNAME settings pointing at configuration files outside
the ViewVC install directory.

* lib/config.py
  (Config.path): new method returning paths relative to config file

* lib/viewvc.py
  (_install_path): removed function
  (get_view_template, view_cvsgraph_image, view_cvsgraph, view_doc):
    call cfg.path instead of _install_path
  (load_config): replace call to _install_path with equivalent inline
    code

* viewvc.conf.dist
    update comments referring to ViewVC install directory

* CHANGES
    document this change


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1487 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-20 16:37:34 +00:00
cmpilato 87fb74e580 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/trunk@1486 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-19 18:41:56 +00:00
cmpilato 01e10dd1bb Minor improvements to some exception strings and their handling.
* lib/viewvc.py
  (view_doc): Lose newline characters in exception messages.
  (Request.run_viewvc): Rewrite the unfound root exception messages to
    be a little less cryptic.

* templates/error.ezt
  No longer wrap exception messages in <pre> tags.  Also, pad error
  output with a bunch of space characters to IE's "Friend Error
  Messages" don't show up.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1485 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-18 20:40:00 +00:00
cmpilato 40c37a55f8 Fix a bug that prevented the population of 'rev' for annotate views.
* lib/viewvc.py
  (common_template_data): Accept the 'annotate' parameter as a valid source
    for the 'rev' data item.

Noticed by:  Marco Colombo <marcol@tigris.org>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1480 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-04 19:04:16 +00:00
cmpilato 5fcdcd8b8a * lib/vclib/svn_ra/__init__.py
Purge the svn_ra module of unnecessary pools.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1476 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-09 21:09:05 +00:00
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
rey4 3efd3fa040 Clean for file headers and copyright notices for issue 167
* bin/asp/query.asp
* bin/asp/viewvc.asp
* bin/cgi/query.cgi
* bin/cgi/viewvc.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/make-database
* bin/mod_python/handler.py
* bin/mod_python/query.py
* bin/mod_python/viewvc.py
* bin/standalone.py
* bin/svndbadmin
* lib/accept.py
* lib/blame.py
* lib/compat.py
* lib/config.py
* lib/cvsdb.py
* lib/dbi.py
* lib/debug.py
* lib/idiff.py
* lib/popen.py
* lib/query.py
* lib/sapi.py
* lib/vclib/__init__.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/viewvc.py
* lib/win32popen.py
* tools/make-release
* tparse/tparse.cpp
* tparse/tparse.h
* tparse/tparsemodule.cpp
* tparse/tparsemodule.h
* viewcvs-install


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1288 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 02:07:36 +00:00
rey4 f74711446f Finish issue 168, the project rename. Change is mostly based on the patch
from Gerard Gerritsen (sigcafe), with some other stuff thrown in.

* bin/asp/viewcvs.asp
* bin/asp/viewvc.asp
* bin/cgi/viewcvs-strace.sh
* bin/cgi/viewvc-strace.sh
* bin/cgi/viewcvs.cgi
* bin/cgi/viewvc.cgi
* bin/mod_python/viewcvs.py
* bin/mod_python/viewvc.py
* lib/viewcvs.py
* lib/viewvc.py
* viewcvs.conf.dist
* viewvc.conf.dist
    the file renames

* bin/cvsdbadmin
* bin/loginfo-handler
* bin/svndbadmin
* bin/asp/query.asp
* bin/cgi/query.cgi
* bin/mod_python/query.py
* bin/make-database
* bin/standalone.py
* lib/debug.py
* lib/compat.py
* lib/blame.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/bincvs/__init__.py
* lib/query.py
* lib/config.py
* lib/dbi.py
* lib/sapi.py
* INSTALL
* TODO
* cvsgraph.conf.dist
* tests/timelog.py
* tools/make-release
* tparse/tparsemodule.h
* tparse/Setup.py
* tparse/INSTALL
* tparse/tparsemodule.cpp
* tparse/tparse.h
* tparse/tparse.cpp
* windows/README
* viewcvs-install
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* viewvc.org/license-1.html
    the other changes



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1287 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 00:33:54 +00:00
rey4 41296bf318 Avoid potential problem with pipe_cmds
* lib/popen.py
  (_pipe.close): use os.waitpid instead of os.wait to avoid messing with
    processes that dont belong us


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1286 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 20:25:34 +00:00
rey4 49d332a996 Fix error messages when a path string is passed to vclib.ItemNotFound
instead of a list of path parts. We seem to do that a few places in
the svn module.

* vclib/__init__.py
  (ItemNotFound.__init__): accept path strings as arguments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1284 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 16:39:17 +00:00
cmpilato 66923a4982 * lib/viewcvs.py
(MarkupEnscript.__init__): Revert a change made in r1255 which
    tweaked the sed expression.  The goal was to try to also strip out
    the <PRE> and </PRE> tags from the output, but the expression I
    used also had the undesired effect of dropping the whole last line
    of a non-newline-terminated file.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1283 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-16 04:13:19 +00:00
cmpilato 34d32b394e Some improvements to the py2html integration. Thanks (I think...) to
David Martínez Moreno (Ender) for sending me down this path.

* lib/py2html.py
  Update to version 0.8.  Patch by David Martínez Moreno <ender@debian.org>.

* lib/viewcvs.py
  (markup_stream_python):  Call PrettyPrint.set_mode_rawhtml_color().

* lib/PyFontify.py
  Rework this file to use spaces instead of tabs.  Use the 're' module
  instead of 'regex'.  Fix a bug which caused "raise" to not be
  noticed as a keyword (though "rais" would be).  Add "assert" and
  "exec" to the keywords list.

* templates/docroot/styles.css
  Reformat the highlight styles, and made the .kwd style have a little color.
  Also, add the styles that py2html uses.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1282 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-13 19:56:31 +00:00
cmpilato 5912f400e6 Make py2html.py executable (it has a shell script mode).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1280 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-13 15:31:48 +00:00
cmpilato a2db8718cf Make some fixes to the pipe handling code to avoid zombie processes.
Patch by Paul Sokolovsky <psokolovsky@vasoftware.com>.

* lib/popen.py
  (pipe_cmds): Instead of storing only the process ID of the last
    child process in a multi-process pipe, keep them all, and wait on
    them all to finish.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1278 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-07 14:57:27 +00:00
cmpilato 7aaf4dc8b7 Finish issue #215.
* lib/viewcvs.py
  (view_markup): Ensure initialization of variables when show_log_in_markup
    is disabled.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1270 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-27 14:07:07 +00:00
rey4 10ff60245b Fix bug from r1266 in integrated query view reported by
Larry Silverman <cerulean47@gmail.com> on the users
list.

* lib/viewcvs.py
  (build_commit): handle the case where dir_strip is ""


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1267 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-25 16:52:24 +00:00
rey4 d8224da3c4 Make the integrated query page work when the repository directory
entered in cvs_roots is a subdirectory of a cvs root rather than a
top-level root directory.

Also, raise an exception when a repository being queried doesn't
exist in the database instead of returning 0 matches.

* lib/cvsdb.py
  (FindRepository): new
  (CleanRepository): add docstring

* lib/viewcvs.py
  (build_commit): strip off top-level directory paths from query results
    when the configured root is a subdirectory of the database root
  (view_query): call cvsdb.FindRepository and use information returned
    to convert paths relative to configured root to database paths



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1266 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-22 04:26:54 +00:00
rey4 f062872f9a Fix crippling bug in query.cgi reported by John L. Villalovos
<john@linux.intel.com> on the users list.

* lib/query.py
  (build_commit): set 'commits.log' template var instead of 'commits.desc'


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1265 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-18 15:38:28 +00:00
rey4 757e115829 Restore highlight "line-number-start" option. Quoth Andreas Amann
(aamann) in issue 126:

  "the --line-number-start is needed as of 2.4.2 (latest is 2.4.3)
  otherwise line numbers will start at 0 instead of 1"

* lib/viewcvs.py
  (MarkupHighlight.__init__):
    update highlight command line


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1264 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-16 18:24:11 +00:00
cmpilato 9803cd5958 Finish issue #178 -- remove references to symbolic revisions in
instructions for Subversion diffs.

* lib/viewcvs.py
  (setup_diff): Call repos._getrev() on the diff input revisions so
    'HEAD' gets resolved to a number.

* templates/include/diff_form.ezt
  Use tag-existence-aware instructions on the diff-form.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1260 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 22:09:54 +00:00
cmpilato 2134d1f657 Finish issue #174 -- markup view of HEAD shows HEAD metadata, but
uses last-changed-rev for other display markings.

* lib/viewcvs.py
  (view_markup): Use the resolved revision instead of the input
    revision when fetching metadata.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1257 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 21:28:34 +00:00
cmpilato c2434be105 Finish issue #210. Patch by Gerard Gerritsen <sigcafe@tigris.org>,
tweaked by me.

* lib/viewcvs.py
  (Request.run_viewcvs): Handle requests for [rootname]-root.tar.gz
    specially as tarball download views of the root of the repository.
  (Request.get_link): If we are prepping a URL for tarball generation
    on the root of a repository, use the filename [rootname]-root.tar.gz
    instead of just root.tar.gz.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1256 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 20:39:15 +00:00
cmpilato 59d97089e1 Finish issue #212 -- XHTMLify the highlight integration.
* lib/viewcvs.py
  (MarkupEnscript.__init__): Have sed strip the <PRE> wrappers around
    enscript output, too.
  (MarkupHighlight.__init__): Drop the --line-number-start and
    --include-style options to highlight; add --xhtml and --fragment.
    Lose the 'sed' invocation too, as it is no longer necessary.
  (view_markup): No longer pass '<pre>' and '</pre>' to the
    MarkupPipeWrapper() call -- the template will handle that.

* templates/markup.ezt
  Add <pre>...</pre> wrappers around the markup stream.  Also, name
  that whole <div> "vc_markup".

* template/docroot/styles.css
  Embed the highlight stylesheet.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1255 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 20:13:00 +00:00
cmpilato 09bddb189a Require Subversion 1.2.0 or better for the 'svn' module.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1253 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-13 22:26:39 +00:00
rey4 1f416a919f Fix EZT callback implementation so along with being able to write raw data
to the output, callbacks can also write formatted output (controlled by
[format] directives.) EZT now passes Context object arguments to callbacks
instead of file pointers, so more functionality can be exposed to Callbacks
in the future without loss of backwards compatibility.

Also make improvements to implementation of [format] so directives will
take effect in files included through variable references ([include path])
just like files included through string constants ([include "path"]).
And make it possible to specify custom format types (beyond "raw" "html"
"xml") with callbacks and without the need to modify ezt.py.

* lib/ezt.py
  (__doc__): update documentation
  (Template._printers, Template._cmd_print_html, Template._cmd_print_xml):
    remove
  (Template._parse, Template._cmd_format, Template._cmd_end_format, 
   _raw_printer, _html_printer, _printers): update [format] implementation
  (Template.parse): update call to _parse
  (Template.execute): update call to _execute
  (Template.generate, Template._execute, Template._cmd_print,
   Template._cmd_format, Template._cmd_include, Template._cmd_if_any,
   Template._cmd_if_index, Template._cmd_is, Template._do_if,
   Template._cmd_for, Template._cmd_define):
    move file pointer into Context object
  (_write_value): handle callbacks as printers and callbacks that use printers
  (_context, Context): rename _context class to Context and fill out methods
    since object is now exposed outside EZT as an interface for accessing EZT
    functionality from callback functions

* lib/viewcvs.py
  (MarkupPipeWrapper.__call__, MarkupShell.__call__):
    update for new (futureproofed) callback implementation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1252 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-10 04:24:12 +00:00
cmpilato 4a85813c24 * viewvc/lib/vclib/svn/__init__.py
(BlameSourceKludge): Remove.
  (SubversionRepository.annotate): Go back to using BlameSource --
    Russell fixed it in r1236.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1251 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-09 18:41:34 +00:00
cmpilato d28ec94d3c * viewvc/lib/idiff.py
(_item.__init__): Call update() with the proper argument.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1249 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-06 18:30:10 +00:00
rey4 a6391ce319 Fix HTML escaping in new unified diff view
* lib/idiff.py (_differ_split)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1247 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-05 18:26:46 +00:00
rey4 1700dcd3c8 Implement trac-style unified diffs (with line numbers along the side
and intraline changes highlighted). This feature requires Python 2.2
and is disabled by default.

* templates/diff.ezt
    add table for highlighted unified diffs

* lib/idiff.py
  (unified, _trim_context, _differ_split): new

* lib/viewcvs.py
  (view_diffs): set new "unified" template var on diff page


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1246 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-05 17:32:44 +00:00
rey4 52b8b89883 Add rudimentary support for intraline diffs. Implementation is pretty
clean, but it doesn't provide all the bells and whistles of our normal
diff interface. It's disabled by default and requires python 2.4 to
run.

* templates/docroot/styles.css: 
    add new styles

* templates/diff.ezt:
    add table for intraline diffs

* lib/config.py:
* viewcvs.conf.dist
    add new "hr_intraline" option

* lib/vclib/svn/__init__.py
  (FileContentsPipe.readline): prevent from returning "" before eof and
    from stripping out newlines
  (FileContentsPipe.readlines): new
  
* lib/idiff.py
    new

* lib/viewcvs.py
  (view_diff): set new "sidebyside" template variable



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1244 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 22:48:00 +00:00
rey4 ddaebb0f26 Make EZT library support python iterators so you can pass in things like
like generator functions. This patch was attached to issue 201. I am the
author, but credit goes to Greg Stein for valuable feedback which allowed
me to simplify the initial implementation.

* lib/ezt.py
  (Template.generate, Template._cmd_if_index, Template._cmd_for,
   _get_value): replace ctx.for_index member with ctx.for_iterators
  (_Iterator, OldIterator, _iter): new


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1243 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 22:21:47 +00:00
rey4 f24f6e5119 Fix issue 204, 'Invalid "Repository Listing" location' reported by
Erik C. Thauvin (ethauvin)

* lib/viewcvs.py
  (Request.get_link):
    return "/" instead of "" when generating top level links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1242 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 19:54:34 +00:00
rey4 c4edb250aa Rename ndiff.py and difflib.py modules, which are only provided for
python 1.5 compatibility.

* lib/difflib.py
* lib/ndiff.py
* lib/compat_ndiff.py
* lib/compat_difflib.py
    rename 

* viewcvs-install
    update ndiff invocation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1241 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-03 05:16:29 +00:00
rey4 68673daba3 Allow CVS roots to be specified as root_parent directories, that way
ViewVC can list CVS modules alongside Subversion repositories.

* lib/viewcvs.py
  (load_config): include modules in CVS root_parent directories (not just
    roots) in repository list


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1239 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-01 00:34:24 +00:00
rey4 8afaca5f75 Fix mismatch between config.py and config file
* lib/config.py
  (Config.set_defaults): set "php_exe_path" instead of "php_path"


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1238 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-31 19:15:52 +00:00
rey4 42b55eb5f9 Improve error reporting when svn blame fails. Also fix some bugs in
BlameSource. Maybe now we don't need BlameSourceKludge anymore...

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): add missing first_rev parameter
  (BlameSource.__getitem__): remove check for fp.eof() which may
    return true when the process has finished executing but data
    can still be read from the pipe
  (BlameSource.__getitem__, BlameSourceKludge.__getitem__):
    use regex to parse blame info so we can show a detailed error
    message instead of just an exception when split() or int() fail

* lib/popen.py
  (_pipe.eof): add note about implementation problem


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1236 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-22 17:01:02 +00:00
cmpilato f88451caaa Finish issue #34 by making annotation lines bookmarkable, and linking
to them from the diff page.

* viewvc/templates/annotate.ezt
  Make each row bookmarkable.

* viewvc/templates/diff.ezt
  Make line numbers into links to the annotate page.

* viewvc/lib/viewcvs.py
  (view_diff): Add an annotate_href to the data dictionary.

* viewvc/viewvc.org/template-authoring-guide.html
  (variables-diff): Document new annotate_href and changes.line_number
    variables.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1235 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 13:08:54 +00:00
cmpilato 695dd93b47 Implement support for line numbers in the diff view.
* viewvc/lib/viewcvs.py
  (DiffSource.__init__): Initialize a new line_number member.
  (DiffSource._get_row, DiffSource._flush_row): Calculate line number
    information from the diff output.

* viewvc/templates/diff.ezt
  Show line numbers with the diff, and make those line numbers
  bookmarkable (for sub-page granularity).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1234 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 12:44:34 +00:00
cmpilato d3358ad705 Really finish issue #177. Fix a little bug with the bugfix done in r1232.
* viewvc/lib/vclib/svn/__init__.py
  (SubversionRepository.annotate): Always cross copies when looking
    for the first and last revisions in the file's history.  Duh.  



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1233 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 09:26:19 +00:00
cmpilato d1d1b73cde Finish issue #177.
Fix a bug with Subversion annotate views which allowed the first
revision of a file's life to be a link to a diff against a
non-existent path/rev location.

NOTE: This doesn't fix the problem for remote repositories (accessed
      via the svn_ra module).

* viewvc/lib/vclib/svn/__init__.py
  (_get_history):  Make 'options' optional.
  (BlameSource.__init__, BlameSourceKludge.__init__):  Accept new
    first_rev parameter which is the first revision in the history of
    the file.
  (BlameSource.__getitem__, BlameSourceKludge.__getitem__):  Don't
    store a 'prev' revision that's older than the first revision of
    the file.
  (SubversionRepository.annotate): Instead of using _get_last_history_rev(), 
    call_get_history() to find both the first and the last revision in
    the file's history.  Update call to BlameSourceKludge().



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1232 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 06:54:04 +00:00
rey4 11174518d5 Fix mod_python issue, #188 reported by Andreas Amann (aamann).
* lib/viewcvs.py
  (generate_page): pass file object associated with current request
   to EZT instead of sys.stdout, which under mod_python is a proxy
   that tries to figure out the current request based on the current
   thread id. It can't be used in worker threads spawned by
   popen.pipe_cmds


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1229 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-18 01:34:11 +00:00
cmpilato 1f40fe9094 * viewvc/viewcvs.conf.dist (enscript_path),
* viewvc/lib/config.py (Config.set_defaults)
  Set use_highlight to 0 by default, so that the default configuration
  has a mildly higher chance of not being broken out of the box.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1228 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-17 01:43:12 +00:00
rey4 ed6a269934 Resolve issue 147 "patch for aix co." Patch by sourceforge user
coshx.

* lib/vclib/bincvs/__init__.py
  (_re_co_filename): broaden regex


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1225 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-30 07:30:45 +00:00
rey4 0a889562f3 Use built in enscript file detection. This is an updated implementation
of an patch from Andreas Amann (sf user ahndee) in issue 156.

* lib/viewcvs.py
  (MarkupShell.__call__): make input file pointer optional
  (MarkupEnscript.__init__, MarkupEnscript.__call__): write input to
    temporary file so enscript can decide what kind of highlighting to do
    based on the file name
  (enscript_extensions, enscript_filenames): removed
  (view_markup): update call to MarkupEnscript

* lib/compat.py
  (mkdtemp): new function

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


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1224 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-30 07:29:22 +00:00
rey4 0467a8e1d1 Fix exception in tarball view for CVS repositories when
use_rcsparse is enabled.

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs): set DirEntry.path member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1221 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 15:08:27 +00:00
rey4 360c5d9e66 Make popen.pipe_cmds() accept an "out" argument that controls where
output from last command goes. For now only the unix implementation
respects it, windows implementation always writes to standard output
as before.

* lib/popen.py
  (pipe_cmds): add "out" argument

* lib/viewcvs.py
  (MarkupShell.__call__): update call to pipe_cmds()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1220 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 14:49:42 +00:00
rey4 2d808ae415 Add limit_changes configuration option to limit the number of changed
paths shown in the subversion revision view and in query results.

* lib/config.py
* viewcvs.conf.dist
    add "limit_changes" option

* lib/cvsdb.py
  (LazyCommit): new class
  (CheckinDatabase.LazyCommit): return LazyCommit objects instead of
    fetching all properties of all commits

* lib/viewcvs.py
  (_sticky_vars, _legal_params): add "limit_changes" query parameter
  (view_revision): handle "limit_changes" and add links to manipulate it
  (view_queryform, build_commit, view_query): same

* templates/query_form.ezt
    add field to set "limit_changes"

* templates/query_results.ezt
    wherever changed files are being hidden, add link to show all files

* templates/revision.ezt
    same, and if that link is clicked, show another link to restore
    the default limit_changes so you can toggle back and forth

* viewvc.org/template-authoring-guide.html
* upgrading.html
    document new template variables and configuration option
  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1218 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-23 13:24:26 +00:00
rey4 1c87fc7fa7 Fix issue 104 "ViewCVS Broken on WinNT" with patch provided by
sourceforge user "tomy"

* lib/win32popen.py
    don't import win32security, not needed and doesn't work on NT4


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1215 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 17:04:44 +00:00
rey4 5e595215ec Documentation updates & template cleanups for recent changes.
* lib/viewcvs.py
  (common_template_date):
    only set "rss_href" when it will be valid URL

  (build_commit):
    only set commits.rev for subversion queries

    rename some of the new RSS template variables
      commits.title -> commits.short_log
      commits.url -> commits.rss_url
      commits.date -> commits.rss_date
  
* templates/include/header.ezt
* templates/rss.ezt
    update for changed template variables

* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* CHANGES
    update documentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1214 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 16:55:26 +00:00
rey4 dabb055603 Add RSS capability to ViewVC using patch from Paul Koning (pkoning)
in issue 179. (All changes are his except for a fix in standalone.py,
and a line initializing "commits.url" template variable to None
in build_commit).

* lib/config.py
* viewcvs.conf.dist
    add [cvsdb] rss_row_limit config option

* lib/cvsdb.py:
  (CheckinDatabase.CreateSQLQueryString): make "LIMIT" value customizable
  (CheckinDatabaseQuery.__init__): set new "limit" member
  (CheckinDatabaseQuery.SetLimit): new

* lib/viewcvs.py:
  (_legal_params): add "limit" parameter
  (common_template_data): add "rss_href" variable
  (make_rss_time_string): new
  (build_commit): add commits.title, commits.rev, commits.author,
    commits.date, commits.url template variables
  (view_query): handle "limit" parameter and new "rss" format

* templates/include/header.ezt
    use new rss_href variable

* templates/rss.ezt
    new

* bin/standalone.py
  (run_viewcvs): set HTTP_HOST environment variable
 


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1212 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 05:16:23 +00:00
rey4 9aef5f5ad6 Add "port" option to connect to specified mysql port.
Patch written by sunjammerx in issue 106.

* lib/config.py
  (Config.set_defaults):
    set default port

* lib/cvsdb.py
  (CheckinDatabase.__init__, ConnectDatabaseReadOnly, ConnectDatabase):
     handle port value

* lib/dbi.py
  (connect):
    same

* INSTALL
* viewcvs.conf.dist
    update


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1211 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 03:07:31 +00:00
rey4 053658384c Make "Revision Log" links on markup, annotate and diff pages
jump to the current revision on the log page, like they used
to in 0.9.x. This patch by Jordan Russell <jr-list-2005@quo.to>
from issue 109.

* lib/viewcvs.py
  (common_template_data):
    set "log_rev_href" template variable

* templates/include/file_header.ezt
    use "log_rev_href" template variable

* viewvc.org/template-authoring-guide.html
    update


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1210 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-21 20:45:11 +00:00
rey4 93c239a2af Fix issue 181, query results groups subversion commits from different
revision numbers. Patch by Paul Koning (pkoning)

* lib/viewcvs.py
  (view_query):
    when roottype != cvs, only group commits from same revision


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1209 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-21 15:18:45 +00:00
rey4 9b5c4db217 Add support for colorizing using highlight. This is a stripped down version
of a patch by Andreas Amann (aamann) from issue 126.

* lib/viewcvs.py
  (MarkupHighlight):
    new EZT callback for invoking highlight

  (view_markup):
    use MarkupHighlight class when "use_highlight" option enabled

* lib/config.py
* viewcvs.conf.dist
    add new configuration options for highlight

* templates/docroot/styles.css
    add ".line" style to make highlight line number stand out
    
* INSTALL
    mention highlight required version and home page


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1208 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-20 18:42:32 +00:00
rey4 5c7258464e Simplify enscript and php colorizing using EZT callbacks
* lib/viewcvs.py
  (MarkupShell):
    base class for colorizing callbacks that use shell tools

  (MarkupEnscript, MarkupPHP):
    make these into callbacks instead of pseudo-file pointers, eliminate
    the need for temporary files since with callbacks these tools can
    run in the middle of template execution and send their output to 
    straight to stdout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1207 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-20 17:11:01 +00:00
cmpilato fbd59621cf * lib/viewcvs.py
(parse_date): Use compat.timegm() instead of time.mktime().  This closes
    issue #5, and comes with rey4's money back guarantee.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1203 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-19 16:14:34 +00:00
cmpilato 72146c0875 Revert the changes made in r1196. They were wrong. Actually, cmpilato
was wrong -- the changes merely followed his lead.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1201 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-19 14:58:20 +00:00
rey4 b91146fee0 Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to
ViewCVS in comments, strings, and documentation. References to ViewCVS
in filenames and urls still need to be fixed. Also, logo.png (the blimp)
needs to be updated or replaced.

This patch is by Gerard Gerritsen (sigcafe), the only change I've made is
to restore a reference to ViewCVS in a comment about backwards compatibility.

* windows/README
* viewcvs-install
* README
* templates/include/footer.ezt
* templates/include/header.ezt
* templates/error.ezt
* templates/query.ezt
* templates/docroot/help.css
* templates/docroot/help_query.html
* templates/docroot/help_dirview.html
* templates/docroot/help_rootview.html
* templates/docroot/styles.css
* templates/docroot/help_log.html
* templates/diff.ezt
* tools/make-release
* lib/sapi.py
* lib/dbi.py
* lib/accept.py
* lib/cvsdb.py
* lib/config.py
* lib/query.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/svn/__init__.py
* lib/vclib/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/blame.py
* lib/popen.py
* lib/compat.py
* lib/viewcvs.py
* lib/debug.py
* INSTALL
* bin/standalone.py
* bin/make-database
* bin/mod_python/query.py
* bin/mod_python/viewcvs.py
* bin/cgi/query.cgi
* bin/cgi/viewcvs.cgi
* bin/asp/query.asp
* bin/asp/viewcvs.asp
* bin/svndbadmin
* bin/loginfo-handler
* bin/cvsdbadmin
* viewcvs.conf.dist


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 17:19:28 +00:00
rey4 cd05e5c22b Fix issue 173, cvsdb references MySqlDb connection escape() method not
present in old versions of mysql-python.

escape() has been a method of the _mysql.Connection objects since the very
beginning, but didn't get exposed in the python objects until 0.9.2
when they made the python class inherit from the C one. Python connections
have had an equivalent literal() method since 0.9.0.

* lib/cvsdb.py
    call conn.literal() method instead of conn.escape()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1198 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 15:40:52 +00:00
rey4 752c3b05d4 Fix issue 166 "empty diff generates an exception" reported by
Yoshinori Okuji (yo). This is also issue 184 

* lib/viewcvs.py
  (rcsdiff_date_reformat):
    avoid an exception when date is None


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1197 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 15:37:22 +00:00
cmpilato 5cb9ec78ac Finish Issue #5.
* lib/viewcvs.py
  (parse_date): Use time.altzone when DST is in effect.  Fix suggested
    by SourceForge user "johmart".

NOTE:  This change was reverted in r2001.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1196 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-16 17:46:39 +00:00
cmpilato 08efb7ca46 Finish issue #165 - Can't get valid log display for directories (subversion)
* lib/viewcvs.py
  (view_log): Pass '1' for the 'svn_show_all_dir_logs' option in calls to
    repos.itemlog().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1187 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-13 20:21:10 +00:00
cmpilato 2a96f56114 Fix issue #176 - Subversion annotate doesn't honor rev number.
* lib/vclib/svn/__init__.py
  (BlameSource.__init__, BlameSourceKludge.__init__):  Use both the @-syntax
    and the -r parameter to 'svn' to get the right blame information.
    Patch by Paul Koning <pkoning@tigris.org>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1186 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-13 20:10:44 +00:00
rey4 27db52403e Fix exception caused by r1173 when kv files are used. This is issue 170
reported by cmpilato.

* lib/viewcvs.py:
  (Config.load_config):
    re-add line from before r1173 that assigns "base" member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1185 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-13 06:01:19 +00:00
rey4 3154c3a102 Simplify pathrev/lastrev code, removing cruft left over from
previous iterations. This change shouldn't affect any
user-visible ViewVC behavior.

* lib/viewcvs.py
  (_last_rev):
    removed

  (view_directory):
    update call to pathrev_form

  (pathrev_form):
    find lastrev inside here instead of taking lastrev parameter
    call svn.last_rev instead of _last_rev
    make some other simplifications

  (redirect_pathrev):
    call svn.last_rev instead of _last_rev


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1181 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-10 19:03:24 +00:00
rey4 311d9ec761 Fix HEAD links on log page broken in r1150
* lib/viewcvs.py
  (Request.get_link):
    don't hide view parameters when other parameters are None. This
    fixes the HEAD annotate link

  (get_file_view_info):
    add pathrev argument

  (view_log):
    pass None as pathrev argument to get_file_view_info, that way the links
    point to HEAD instead of the current sticky tag


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1180 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-10 19:01:59 +00:00
rey4 9cb702c219 Prevent exception when jumping to a pathrev earlier than the revision
where the current path was added. This was the behavior in r1146 which
was changed in r1159

* lib/vclib/svn/__init__.py
  (last_rev):
    use alternate implemention when peg_revision > limit_revision


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1179 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-10 18:59:38 +00:00
rey4 2a6beda68b Fix bincvs co bug.
* lib/vclib/bincvs/__init__.py:
  (_re_co_side_branches):
    handle "no side branches present" error which seems to occur sometimes
    when you check out a branch tag.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1178 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-10 18:58:51 +00:00
rey4 f2d2d530f1 Revert portion of r1176 that stopped exposing the "prefer_markup" value
(formerly "viewable") to all templates. Even though the default templates
don't use these values, people might want to use them in custom templates.

* lib/viewcvs.py
  (get_file_view_info):
    add prefer_markup return value

  (nav_header_data):
    add "prefer_markup" template variable

  (view_directory):
     update call to get_file_view_info()

  (view_log):
     set "entry.prefer_markup" template variable
     set "prefer_markup" template variable
     set "tag_prefer_markup" template variable

* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
    update docs


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1177 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-09 08:17:27 +00:00
rey4 754e9dbc30 Update template authoring guide and make template cleanups.
* lib/viewcvs.py
  (get_file_view_info):
    get rid of viewable return value

  (nav_header_data):
    get rid of "viewable" template variable

  (view_directory):
    rename "entries.viewable" variable to "entries.prefer_markup"
    rename "selection_form" variable to "search_re_form"
    rename "search_tag_action" variable to "search_action"
    rename "search_tag_hidden_values" variable to "search_re_hidden_values"

  (view_log):
    rename "entries.html_log" variable to "entries.log"
    restore value of "entries.next_main" variable to what it was in ViewCVS
      0.9.x
    get rid of "entries.viewable" template variable
    get rid of "viewable" template variable
    get rid of "tag_viewable" template variable

  (view_revision):
    rename "changes.filename" variable to "changes.path"
    rename "changes.base_path" variable to "changes.copy_path"
    rename "changes.base_rev" variable to "changes.copy_rev"

  (build_commit)
    rename "commits.desc" variable to "commits.log"
    get rid of "commits.rev_href" variable and replace with
      "commits.view_href", "commits.download_href", and
      "commits.prefer_markup"

* templates/include/dir_footer.ezt
* templates/include/file_header.ezt
* templates/dir_new.ezt
* templates/directory.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/query.ezt
* templates/query_results.ezt
* templates/revision.ezt
    update templates for changed variables

* CHANGES
    fix blurb about paging

* viewvc.org/upgrading.html
    update information about 0.9.x variables

* viewvc.org/template-authoring-guide.html
    fill it out


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1176 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-08 18:18:08 +00:00
rey4 baafc550a9 Check in another directory listing template following discussion that
started at

  http://mailman.lyra.org/pipermail/viewcvs-dev/2005-November/002139.html

The major differences from directory.ezt are:

  - there is a new column of icons providing links to most other views

  - revision, date, author, and log message columns are merged into a
    single "Last Change" column which is more compact and easier to
    decipher when reading from left to right. The fact that you can't
    do things like sort by log message or read down the author column
    shouldn't be a problem because in the most cases, doing these things
    doesn't make any sense.

Ideally everybody will fall in love with this template, and we'll be able
to make it the default, release ViewVC 1.0, and put these old UI issues to
rest. Otherwise we can tweak and butcher this template until we agree that
its good enough to be the default, and move on from there.

* templates/dir_new.ezt
    new template file

* lib/viewcvs.py
   (sort_file_data):
     when sorting in reverse, leave directories at the top and files
     with no revision information at the bottom. Also make sorting by
     revision number the same as sorting by date in cvs.

   (view_directory):
     add "row.revision_href" links for directory entries

* templates/docroot/images/annotate.png
    new icon for annotate view. image is "stock_people.png" from gnome

* templates/docroot/images/download.png
    new icon for download view. image is
    http://www.gentoo-portage.com/img/download.png

* templates/docroot/images/list.png
    new icon for directory listings. image is "stock_view-details.png"
    from gnome

* templates/docroot/images/log.png
    new icon for log view. image is "stock_list_enum.png" from gnome

* templates/docroot/images/view.png
    new icon for markup view. image is "stock_show-all.png" from gnome

* templates/dir_alternate.ezt
    removed, nobody seems to like it


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1174 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-06 19:22:41 +00:00
rey4 72672b458c Tweak logic used to find installed paths ("lib" directory, configuration
file, templates, etc). Specifically, make the following changes:

- Get rid of hardcoded paths in module files ("lib" directory) and
  configuration files (viewcvs.conf and mod_python's .htaccess)

- Allow stub scripts (for asp, cgi, and mod_python) to specify
  configuration files so it's possible to have multiple configurations of
  viewcvs running off a single installation.

- Be more consistent about resolving paths when they aren't hardcoded
  (when ViewCVS is running from a source directory). In particular, try
  not to depend on the working directory. That way it's legal to run
  ./standalone.py instead of bin/standalone.py without getting an
  ImportError.

- Get rid of global cfg variables in viewcvs.py and cvsdb.py. They led to
  all sorts of hacks in other files to pilfer and reset them. They were
  also possible sources of races in multithreaded environments like
  mod_python and asp.

- Rewrite mod_python handler so library paths can be specified inside the
  stub files.

* lib/apache.py
    removed, contained old mod_python handler

* lib/config.py
  (Config.load_config):
    remove sys.argv voodoo, just load the configuration path specified in
    the pathname argument

  (Config.set_defaults):
    use relative path for cvsgraph_conf setting instead of hardcoded
    <VIEWCVS_INSTALL_DIRECTORY> literal

* lib/cvsdb.py
  (CONF_PATHNAME, config, cfg):
    removed, configuration stuff

  (CheckinDatabase.__init__, CheckinDatabase.CreateSQLQueryString):
    add "_row_limit" member instead of using cfg object

  (CreateCheckinDatabase):
    removed, a do-nothing function

  (ConnectDatabaseReadOnly, ConnectDatabase):
    add cfg arguments

  (GetUnrecordedCommitList):
    add db argument

* lib/query.py
  (CONF_PATHAME):
    removed

  (build_commit, run_query, main):
    add cfg arguments, use new viewcvs.get_template function

* lib/viewcvs.py
  (CONF_PATHNAME, cfg, g_install_dir):
    removed

  (Request.__init__):
    add cfg member

  (Request.run_viewcvs, Request.get_link, check_freshness,
   get_view_template, generate_page, default_view, get_file_view_info,
   format_log, common_template_data, MarkupEnscript.__init__,
   markup_stream_python, markup_stream_php, make_time_string, view_markup,
   sort_file_data, view_directory, paging, view_log, view_annotate,
   view_cvsgraph_image, view_cvsgraph, view_doc, rcsdiff_date_reformat,
   spaced_html_text, DiffSource.__init__, DiffSource._get_row, view_patch,
   view_diff, generate_tarball, download_tarball, view_revision,
   is_query_supported, english_query, build_commit, view_query,
   view_error, main):
    stop using global config, use cfg arguments or request member instead

  (_install_path):
    new, use __file__ to locate template and configuation paths

  (get_view_template):
    use _install_path and return compiled template instead of path

  (is_viewable, default_view):
    rename is_viewable to default_view and return view instead of boolean

  (handle_config, load_config):
    rename handle_config to load_config and return config object instead
    of setting cfg global

* bin/cgi/viewcvs.cgi
* bin/cgi/query.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/standalone.py
* bin/svndbadmin
    look for library relative to sys.argv[0] when no hardcoded library
    path is available. Also add configuration loading code.

* bin/asp/viewcvs.asp
* bin/asp/query.asp
    add configuration loading code

* bin/mod_python/.htaccess
    specify new mod_python handler, remove reference to
    <VIEWCVS_APACHE_LIBRARY_DIRECTORY>

* bin/mod_python/handler.py
    added, holds new mod_python handler

* bin/mod_python/viewcvs.py
* bin/mod_python/query.py
    rewrite for new handler, add hardcoded library and configuration paths

* viewcvs.conf.dist
    remove references to <VIEWCVS_INSTALL_DIRECTORY>

* viewcvs-install
  (FILE_INFO_LIST):
    stop hardcoding paths in config files

  (SetPythonPaths,):
    get rid of <VIEWCVS_INSTALL_DIRECTORY> and
    <VIEWCVS_APACHE_LIBRARY_DIRECTORY> substitutions

  (ApacheEscape, _re_apache):
    removed

  (InstallTree):
    stop hardcoding paths in lib directory


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1173 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-06 04:04:14 +00:00
cmpilato 80436a855c * lib/viewcvs.py
(_get_diff_paths_parts): Was _get_location.  This is a reversion of
    a changed accidentally committed in r1171.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1172 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-05 14:35:35 +00:00
cmpilato 74090cdc09 * viewvc/lib/viewcvs.py
(view_directory, redirect_pathrev, view_log): Only call _last_rev()
    when viewing a Subversion repository (per the assert in the
    function).
  (_get_location): Was _get_diff_paths_parts.  *** THIS CHANGE WAS A 
    MISTAKE, REVERTED IN r1172 ***

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1171 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-02 20:46:24 +00:00
cmpilato 3f03d0923e Some diff-related fixes.
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rawdiff): Stop being so picky about the diff
    header sanity.  Start looser, and we'll tighten up as we need to.

* lib/vclib/__init__.py
  (_diff_fp.close): Add 'self' to the parameter list.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1170 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-22 16:32:59 +00:00
cmpilato 4896268450 Re-add Russ Yanofsky's "last_rev" support, fine-tuned for performance
by myself.

NOTE: There are still some pool usage fixes to be made here.  Boy am I
looking forward to Subversion 1.3.0's (almost-)pool-free bindings...

* viewcvs/website/template-authoring-guide.html
  Restore definition of lastrev template item.

* viewcvs/templates/include/pathrev_form.ezt
  Expose the lastrev dictionary item.

* viewcvs/lib/vclib/svn/__init__.py
  (last_rev): New.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (last_rev): New.

* viewcvs/lib/viewcvs.py
  (_last_rev): New wrapper around the svn provider's last_rev() functions.
  (pathrev_form, redirect_pathrev, view_log, view_directory): Use _last_rev().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1159 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-10 22:08:48 +00:00
cmpilato 6d792a94a9 * viewcvs/lib/vclib/svn/__init__.py
(get_revision_info): Pull the revision props directly instead of using
    the (buggy) ChangeCollector.get_root_props() interface.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1158 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-10 16:01:15 +00:00
rey4 8bba165888 Get diffs to work in the ccvs module (used when use_rcsparse is enabled),
using the system "diff" command like the svn and svn_ra modules. Factor
the diff code out of the svn and svn_ra modules so they can share
functionality with each other and ccvs. Thanks to C. Mike for getting me
to work on this.

* lib/vclib/__init__.py:
  (_diff_fp):
    new class, based on svn_ra.FileDiff, used by ccvs, svn, and svn_ra
    modules

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff):
    implement in terms of openfile, itemlog, and _diff_fp

* lib/vclib/svn_ra/__init__.py
  (FileDiff, do_diff, _escape_msvcrt_shell_command, _escape_msvcrt_shell_arg):
    removed

  (temp_checkout)
    new function

  (SubversionRepository.rawdiff):
    change implementation to use temp_checkout and _diff_fp

* lib/vclib/svn/__init__.py
  (do_diff):
    removed

  (temp_checkout):
    new function, based on code from subversion's fs.py

  (SubversionRepository.rawdiff
    change implementation to use temp_checkout and _diff_fp


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1154 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-09 15:29:56 +00:00
cmpilato 0eab479ca0 Make the various file-related views available from the directory and
log views on a per-entry/revision basis.  Template authors can choose
to ignore the 'viewable'-ness of an item if they choose.  In the
process, this makes the directory view always link to the markup view
for files (instead of sometimes doing markup, sometimes checkout).
Consistent, predictable UI, folks ...

* viewcvs/lib/viewcvs.py
  (get_file_view_info): New.
  (nav_header_data, view_directory, view_log): Use new get_file_view_info to
    populate file navigation links.

* viewcvs/templates/markup.ezt
  If a file isn't viewable, show a warning instead of the markup.

* viewcvs/website/upgrading.html
  Track changes in the data dictionary.

* viewcvs/website/template-authoring-guide.html
  Track changes in the data dictionary, and fill in a few blanks here
  and there.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1150 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-04 19:20:55 +00:00