Commit Graph

1053 Commits (2c0181d6253def8584edbd7cbd04d5c3ec81e011)

Author SHA1 Message Date
rey4 19866deb18 Update windows README file
* windows/README
    add link for downloading subversion python bindings binaries

    remove mention of cvsnt bugs. they've all been either fixed or
    worked around, and the cvsnt bugzilla database is now deleted

    fix a spelling


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@867 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-01 23:51:45 +00:00
cmpilato 1b68297aff Makin' things purtier. Patch by James Henstridge <james@jamesh.id.au>.
* viewcvs/templates/log_table.ezt
  Set the HTML class attribute to vc_header_sort for the header of the
  sort column.  Change the tags around the log message from
  <i><pre>...</pre></i> to <pre><i>...</i></pre>.  Since <pre> is a
  block level element and <i> is an inline element, the old nesting
  results in an extra block after the message in the table cell.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@866 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-01 20:56:38 +00:00
cmpilato 289c3b25bc Make Etag support optional (in a first-class fashion).
* viewcvs/lib/viewcvs.py
  (check_freshness): Check the new configuration option for etag
    support.  Also, cfg.general.http_expiration_time is now
    cfg.options.http_expiration_time.

* viewcvs/lib/debug.py
  (DISABLE_ETAGS): Remove.

* viewcvs/lib/config.py
  (Config.set_defaults): Set new 'generate_etags' option default to 1,
    and move 'http_expiration_time' to the [options] section (from the
    [general] one).

* viewcvs/viewcvs.conf.dist
  (cfg.options.generate_etags): New.
  (cfg.options.http_expiration_time): Was cfg.general.http_expiration_time.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@865 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-23 20:57:16 +00:00
cmpilato 7b8eb7639e Instead of sending colored diffs to the diff.ezt template, and raw
diffs to their own text/plain output, templatize all diffs.  By
default now, all diffs will go through diff.ezt (which has been
updated to handle it).  Only if the new 'makepatch' boolean CGI flag
is set will diffs be sent directly as text/plain, non-templatized
output.

* viewcvs/lib/viewcvs.py
  (_legal_params): Add new 'makepatch' boolean parameter.
  (check_freshness): Fix a speeling eror.
  (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it.
  (human_readable_diff): Lose the 'request', 'sym1', and 'sym2'
    parameters.  Now return the parsed dates and DiffSource object
    instead of populating a data dictionary and completely generating
    the page.
  (spaced_html_text): Use an intermediate variable for readability.
  (raw_diff): New.
  (view_diff): Honor the new 'makepatch'.  Update calls to
    human_readable_diff(), and make use of raw_diff().  Do all page
    generation for diffs here now.  Adds a new 'raw_diff' data
    dictionary item, useful for testing raw vs. colored, as well as
    for positioning that raw diff output in the template.

* templates/diff.ezt
  Use the new 'raw_diff' data dictionary item to position raw diff
  output in the template.  Update the diff form to allow for the
  generation of traditional "patch-ish" raw diff output.

* templates/include/diff_form.ezt
  Allow for the generation of traditional "patch-ish" raw diff output.

* website/styles.css
  (vc_raw_diff): New style class.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 14:37:11 +00:00
cmpilato 3e73713c17 Add a debug setting which promises to restore my sanity in the face of
Etags and browser caching.  And use it.

* lib/debug.py
  (DISABLE_ETAGS):  New.

* lib/viewcvs.py
  (check_freshness): If DISABLE_ETAGS is set, never report that the
    page is fresh.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@863 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 14:12:23 +00:00
cmpilato e8dc91b483 Fix the description of http_expiration_time.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@862 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-21 19:34:38 +00:00
cmpilato 4d8b46e2c8 Bang out a 'revision' view for the svn_ra module. Soooo incomplete,
sooo hard a problem to solve efficiently.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (_rev2optrev): Fix use of 'if foo' when I mean 'if foo is not None'.
  (ChangedPath): New class.
  (LastHistoryCollector.__init__): Remove uninteresting 'pass'.
  (LastHistoryCollector.add_history): Add 'paths' and 'pool'
    arguments, and now at least do some semblance of support for
    dealing with those paths.
  (LastHistoryCollector.get_history):
  (_get_rev_details): Was _get_revision_info().  Now uses the
    LastHistoryCollector.add_history callback directly.  Callers changed.
  (get_revision_info): New.
  (SubversionRepository.get_dirents): Fix a dirent caching bug.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@861 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-14 16:14:45 +00:00
cmpilato ac8c9d303c Add cache expiry support to ViewCVS. Patch by James Henstridge
<james@daa.com.au>.

* standalone.py
  (StandaloneServer.header): Fix some status handling stuff.

* viewcvs.conf.dist
  Add default value for new http_expiration_time option.

* lib/config.py
  (Config.set_defaults): Set default value for new
  http_expiration_time

* lib/viewcvs.py
  (check_freshness): Add cache control headers using the configured
    expiration times.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@860 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-14 15:52:41 +00:00
rey4 8b85373685 Remove workaround for CVSNT bug 188, which was fixed in version 2.0.12
* lib/vclib/bincvs/__init__.py:
  (_get_logs):
    simplify filename checking

  (_path_ends_in):
    removed


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@859 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-06 03:08:16 +00:00
rey4 ea73dfb7a3 Fix bugs #911437 and #922679 caused by newer versions of cvsnt using forward
slashes instead of backslashes in outputted paths.

(_parse_log_header, _parse_co_header):
  deal with forward slashes in paths outputted by cvsnt rcs utilities

(BinCVSRepository.openfile):
  fix uninitialized variable error in raise statement


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@858 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-06 02:46:49 +00:00
cmpilato 8f9c8de036 Make ViewCVS more cache-friendly. Patch by James Henstridge
<james@daa.com.au>.

* lib/viewcvs.py
  (check_freshness): New.
  (MarkupBuffer.close): New.
  (MarkupPipeWrapper.close): New.
  (MarkupPipeWrapper.__del__): Call own close() function now.
  (MarkupEnscript.close): New.
  (MarkupEnscript.__del__): Call own close() function now.
  (view_markup, view_log, view_diff): Call new check_freshness() function.
  (view_doc): Gut caching code and use check_freshness() instead.

* lib/sapi.py
  (CgiServer): Fix handling of 304's in IIS.

* standalone.py
  Now purge the environment of HTTP_* variables before setting our
  own.  Also, perhaps set the 'HTTP_IF_MODIFIED_SINCE' and
  'HTTP_IF_NONE_MATCH' variables.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@857 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-03 15:42:04 +00:00
cmpilato f0b96a1617 Fix a bunch of pool usage problems with ViewCVS/Subversion.
* viewcvs/lib/vclib/svn/__init__.py
  (_fetch_log): Now accept a 'pool' parameter.
  (FileContentsPipe): Was StreamPipe().
  (FileContentsPipe.__init__): Instead of taking a stream, accept the
    root, path, and a pool.  Use a subpool of the pool for the stream
    creation.
  (FileContentsPipe.__del__): New.
  (SubversionRepository.__init__): Make a scratch subpool that
    operations can safely use and clear.
  (SubversionRepository._scratch_clear): New convenience function.
  (SubversionRepository.itemtype, SubversionRepository.listdir): Use
    and clear the scratch pool.
  (SubversionRepository.filelog): Update call to _fetch_logs().  Use
    and clear the scratch pool.
  (SubversionRepository.openfile): Update call to FileContentsPipe().
    Use and clear the scratch pool for the call to _get_last_history_rev().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@856 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-01 19:43:51 +00:00
cmpilato da2822ecf0 Sending caching headers back to the browser for static content to
reduce roundtrips.  Patch by James Henstridge <james@daa.com.au>.

* viewcvs/lib/viewcvs.py
  (copy_stream): Use a slightly different mechanism for falling back
    to sys.stdout (for standalone.py).
  (view_doc): Send Last-modified headers for static content.

* viewcvs/standalone.py
  Calculate the modification time of the Apache icons module.
  (StandaloneServer.do_GET): Send that modification time.
  (StandaloneServer.header): Send custom headers.

* viewcvs/lib/sapi.py
  (CgiServer.addheader, AspServer.addheader, ModPythonServer.addheader): New.
  (CgiServer.header): Fix the way statuses are returned.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@855 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-24 22:57:30 +00:00
cmpilato 0ccadb2681 Fix a typ-o in yon copyright block.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@854 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-18 20:15:30 +00:00
cmpilato 6e6c604a94 Update the upgrade docs.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@853 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-14 15:32:49 +00:00
cmpilato 6af773b46b * viewcvs/lib/viewcvs.py
(view_directory): Do mime_type detection of files.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@852 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-14 15:21:10 +00:00
cmpilato db610d9a21 * viewcvs/lib/viewcvs.py
(view_directory): Expose file sizes (when available) in the
    directory view.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@851 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-13 04:29:08 +00:00
cmpilato 9d63323c24 Oops. Forgot to actually add the stylesheet.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@850 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-12 14:58:57 +00:00
cmpilato 71b16e1321 *** empty log message ***
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@849 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-12 01:46:43 +00:00
cmpilato af1f78ba83 * viewcvs/templates/include/dir_footer.ezt
Use <optgroup> tags to group branches and tags.  Patch by James
  Henstridge <james@daa.com.au>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@848 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-11 06:53:52 +00:00
cmpilato a0bc4d071b * viewcvs/lib/viewcvs.py
(common_template_data): Expose request.pathtype as a generally
    available template variable.  (Have I mentioned today how much I
    dislike per-template data dictionary items?)

* viewcvs/templates/log_table.ezt
* viewcvs/templates/log.ezt
  Use the pathtype variable to determine whether or not to show
  file-only stuff like diff and download options.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@847 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-10 15:37:11 +00:00
cmpilato cfe3d1ea29 Fix a brain-O. "filter_path" is the *opposite* of "show_all_logs".
Duh.  Stop using filter_path and (failing at) translating between the
senses here.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (LogCollector.__init__): Drop the 'options', take explicit 'show_all_logs'.
  (LogCollector.add_log): Update for new variables.  Also, fix some
    logic so this works when we aren't showing all logs, too.
  (SubversionRepository.filelog): Parse the options here, and pass to
    the LogCollector().

* viewcvs/lib/vclib/svn/__init__.py
  (NodeHistory.__init__, NodeHistory.add_history, _get_history): Stop
    using 'filter_path'; use 'show_all_logs' instead.

* viewcvs/lib/viewcvs.py
  (view_log): Make showing all directory logs default to 0.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@846 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-10 14:56:09 +00:00
cmpilato e075e20fa7 More directory log view fixes.
* viewcvs/lib/vclib/svn/__init__.py
  (NodeHistory.add_history): Use subpools in this loop.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (LogCollector.add_log): Fix an off-by-one error.  The path for this
    revision is self.path *before* we find the previous path.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@845 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-10 14:08:50 +00:00
cmpilato bcd7a406aa * viewcvs/lib/vclib/svn/__init__.py
(NodeHistory.add_history): Fixes for support for directory log
    filtering.  Don't filter out copy revisions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@844 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-10 14:01:12 +00:00
cmpilato d2a8e86357 Fix the root-change mechanism I broke recently.
* viewcvs/lib/viewcvs.py
  (Request.get_link): Allow where == '' as a way to indicate that you
    want to see the root directory (since None means "use self.where").
  (common_template_data): Generate the right URL for changing roots.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@843 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-07 15:40:22 +00:00
cmpilato 242b41d9c1 Fix Bug #949445 (premature <pre> tags in large files)
* viewcvs/lib/viewcvs.py
  (MarkupPipeWrapper): Rewrite this class so that it actually works.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@842 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-07 15:23:23 +00:00
cmpilato 459675943c Close Bug #847437.
* viewcvs/website/index.html
  Say that we require 1.5.2, not 1.5 (which eliminates the need to
  point out the MySQL dependency).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@841 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-06 21:38:35 +00:00
cmpilato 97d9b20adf Get support for the 'show_all_dir_logs' option (specifically, the
"don't show all dir logs") working the svn_ra layer.  In fact, this
sucker is now more accurate as far as revision choices go than the
'svn' module.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (LogCollector.__init__): Deal with None paths, and ensure leading slashes.
  (LogCollector.add_log): Uncomment and fix path filtering code.
  (_fetch_log): Remove.
  (SubversionRepository.filelog): Move contents of _fetch_log into
    here, and then do something that in unheard of -- CALL
    SVN_CLIENT_LOG WITH THE PARAMS IN THE RIGHT ORDER!


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@840 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-06 17:00:28 +00:00
cmpilato c20560b1fc Add basic support for Subversion directory log viewing in ViewCVS.
NOTE: This work is not yet finished for the 'svn_ra' vclib module.

* viewcvs/lib/vclib/svn/__init__.py
  (NodeHistory.__init__): Add fs_ptr and filter_path arguments.
  (NodeHistory.add_history): If filtering, only add the history item
    if the path truly change in that revision.
  (_get_history): Add 'options' argument, and use it to decide if we
    need to filter out bubble-up-only directory logs, as well as
    whether or not to cross copies.
  (_fetch_log): Was fetch_log.  Add 'options' argument, passed to
    _get_history.
  (SubversionRepository.filelog): Update call to _fetch_log.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (_compare_paths): New path comparison function (ported from
    Subversion's C-composed svn_path_compare_paths)
  (LogCollector): New class for doing what the old inline _log_cb
    function did.
  (_fetch_log): Was fetch_log.  Add 'options' argument.  Now use the
    new LogCollector class.
  (SubversionRepository.filelog): Update call to _fetch_log.

* viewcvs/lib/viewcvs.py
  (Request.run_viewcvs): Don't set 'cross_copies' as an attribute of
    the repository any more.  We use the vclib interface options
    params.
  (view_log): Re-work this sucker to handle requests for directory
    logs in Subversion.  Also, pass the cross_copy option here.
  (view_directory): Set the rev_href for Subversion directories to the
    log view href.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@839 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-28 16:21:51 +00:00
cmpilato d0a62c7520 Try to get the query.cgi script working again. Unfortunately, I'm not
setup to test it at all. :-(

* viewcvs/lib/query.py
  (main): Populate the 'docroot' data dictionary item.

* viewcvs/templates/query.ezt
  Stop trying (and failing) to use the common header include ... I
  don't have the energy to make this thing work with that right now.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@838 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-28 15:53:39 +00:00
cmpilato 1d6743ab98 * viewcvs/templates/revision.ezt
Re-add the "previous" and "next" buttons on the revision view.
  Patch (mostly) by Guy Maor <guy@extreme-da.com>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@837 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-28 14:53:22 +00:00
cmpilato 5995f83c4c Some more ViewCVS fixes and tweaks.
* viewcvs/templates/diff.ezt
  Setup template defines before include header.ezt.

* viewcvs/lib/viewcvs.py
  (view_revision_svn): Add 'rev' to the diff_href.

* viewcvs/templates/dir_alternate.ezt
  Fix the filename links to go to the log view again (apparently I
  accidentally clobbered these recently, though I must say, the
  navigation seems entirely unintuitive to me this way...).

* viewcvs/templates/revision.ezt
  Tweak the display of the log message a little big.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@836 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-24 17:38:31 +00:00
cmpilato da21434ef0 Some bug fixes as suggested (in great detail, just short of a patch)
by Dirk Lemstra <dirk.lemstra@atosorigin.com>.  Also, add some stuff
to the generally-available-to-all-templates dataset.  And finally,
re-work all the templates for consistent look and feel.

I can die now.

* viewcvs/lib/viewcvs.py
  (common_template_data): Expose the 'where', 'roottype', and
    'rootname' Request members, and the 'nav_path', to all views.
    Also, do the root selection stuffs ('roots', 'change_root_action',
    'change_root_hidden_values').
  (nav_header_data): No longer explicitly add 'nav_path' to the data
    dictionary.
  (_dir_url): For Subversion, supply the revision number to the
    generated links.
  (view_directory): Include the revision when generating log view
    URLs.  Also, expose a 'tree_rev_href' data item for linking to the
    revision view.  No longer explicitly add 'roottype', 'where', and
    'current_root' to the data dictionary.  No longer do the root
    selection stuff here, either.
  (view_log): No longer explicitly add 'roottype', 'where', and
    'current_root' to the data dictionary.
  (human_readable_diff): No longer explicitly add 'where' to the data
    dictionary.
  (view_markup, view_revision): No longer explicitly add 'roottype' to
    the data dictionary.

* viewcvs/website/upgrading.html
  Document the changes.

* viewcvs/website/help_rootview.html
  Add a missing "<br>".

* viewcvs/templates/annotate.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
  Beat the heck outta these templates until they all reference
  header.ezt and footer.ezt (except for error.ezt), and they all
  present a basically consistent interface across all views.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@835 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-22 15:40:01 +00:00
cmpilato c94bb1347f * viewcvs/tparse/tparsemodule.cpp
Fix all instances of "if(!rv) { Py_DECREF(rv); }" mishap.  We should
  decrement the reference count for the value only if it is *not*
  NULL.  Erik Huelsmann oopsed.  I oopsed more for not reviewing the
  patch before application.  James Henstridge <james@daa.com.au> wins
  for paying attention.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@834 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 15:48:48 +00:00
cmpilato 0f09f6c241 Templatize the annotate view!
* viewcvs/lib/viewcvs.py
  (view_annotate): Now use blame.BlameSource() class for doing annotations.

* viewcvs/lib/blame.py
  (BlameSource, BlameSequencingError): New classes.
  (make_html): Re-work to use the use BlameSource code.

* viewcvs/lib/config.py
  (Config.set_defaults): No longer set self.templates.footer.

* viewcvs/viewcvs.conf.dist
  (templates.footer): Removed.

* viewcvs/templates/annotate.ezt
  Re-work this template to make use of the newly exposed blame data,
  and the fabulous new EZT assignment commands!

* viewcvs/website/upgrading.html
  Document this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@833 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 05:08:12 +00:00
cmpilato 9c5c43b625 Implement an assignment mechanism in EZT, a new [define variable][end]
construct.  Patch by James Henstridge <james@daa.com.au>, tweaked to
conform with Greg Stein's review, and stripped of the template changes
that made use of the new functionality by C. Michael Pilato (that's me).

* viewcvs/lib/ezt.py
  import cStringIO, and failing that, import StringIO.
  (_block_cmd_specs): Add 'define' to the list of block specs.
  (Template.generate): Init defines member.
  (Template._parse): Don't prepare references for 'define' commands.
  (Template._cmd_define): New.
  (_get_value): Look for items in the defines dictionary before
    falling back to the data dictionary.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@832 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 03:41:34 +00:00
cmpilato 5bd3435a05 Fix the default value for the footer template location. Patch by James
Henstridge <james@daa.com.au>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@831 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 03:11:03 +00:00
cmpilato a8c5db6248 Templatize the markup view.
* viewcvs/lib/viewcvs.py
  (html_footer): Remove.
  (view_annotate): Generate the footer data -- the only remaining
    place where template usage is impure...
  (retry_read): New.
  (copy_stream): Rename 'fp' to 'src', and add an optional 'dst'
    parameter.  Move reading code into retry_read().
  (markup_stream_default, markup_stream_enscript): Remove.
  (markup_stream_python): Return a MarkupBuffer instance.
  (markup_stream_python): Return a MarkupPHP instance.
  (MarkupBuffer, MarkupPipeWrapper, MarkupEnscript, MarkupPHP): New
    classes for implementing file-like markup objects.
  (view_markup): Use new Markup classes.
  (generate_tarball): Don't trap an unused status code.

* viewcvs/templates/markup.ezt
  Reference the new [markup] dictionary object, and include the footer.ezt.

* viewcvs/templates/include/header.ezt
  White background, please.

* viewcvs/website/upgrading.html
  Note the new [markup] variable.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@830 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-20 16:40:12 +00:00
cmpilato d103342f27 * viewcvs/viewcvs.conf.dist
(options.cross_copies): Make this default to 1 now.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@829 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-20 14:41:35 +00:00
cmpilato fed9fcc893 Extend Sink and parsers to pass more of rcs admin data. Patch by
Erik Huelsmann <e.huelsmann@gmx.net>.

* viewcvs/lib/vclib/ccvs/rcsparse/common.py
  (Sink.set_expansion): New member function. Called to pass
   default expansion mode.
  (Sink.set_locking): New member function. Function is called
   to signal strict locking.
  (Sink.set_locker): New member function. Set locker for a given revision.
  (_Parser.parse_rcs_admin): parse 'access', 'expand', 'locks' and
   'strict' token values passing the result(s) into the sink.

* viewcvs/lib/vclib/ccvs/rcsparse/default.py
  (Parser.parse_rcs_admin): parse 'access', 'expand', 'locks' and
   'strict' token values passing the result(s) into the sink.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@828 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-20 14:32:54 +00:00
cmpilato a1aa2423d3 Stop potential memory leak by DECREF-ing the return value from
PyObject_CallMethod.  Patch by Erik Huelsmann <wiskid@gmx.net>.

* viewcvs/tparse/tparsemodule.cpp
  Catch return value from PyObject_CallMethod and DECREF when appropriate.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@827 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-20 14:28:15 +00:00
cmpilato f2c4a87740 * viewcvs/viewcvs.conf.dist
(footer): Update the default location for footer.ezt (now in the
    include/ subdir).

* viewcvs/website/upgrading.html
  Add a note about rearranged template locations.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@826 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-15 21:23:02 +00:00
cmpilato cf04879462 Oops! Missed an update of a relocated template.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@825 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-15 20:37:59 +00:00
cmpilato ba43e61754 Re-arrange the templates directory a bit.
* viewcvs/templates/dir_footer.ezt
* viewcvs/templates/dir_header.ezt
* viewcvs/templates/footer.ezt
* viewcvs/templates/header.ezt
  Move all of these...

* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
  ...to here.

* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
  And then update the [include] items in these files to note the new
  locations of the aforementioned relocated templates.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@824 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-15 05:57:57 +00:00
cmpilato 1b8e7c9aa5 Do some work to expose Subversion directory commit info (logs,
revision, authors), cleanup some unnecessary data dictionary cruft,
and rework the default directory templates a bit.

* viewcvs/lib/viewcvs.py
  (view_directory): Do the Right Thing for Subversion directory log
    messages.  Merge the 'cvs' and 'state' data fields for CVS.
    Populate rev_href for Subversion directories.

* viewcvs/templates/directory.ezt
* viewcvs/templates/dir_alternate.ezt
  Track data dictionary changes, and tweak the templates to always
  show name, rev, author, date -- now only log is conditional on
  show_logs (go figure).  Also, core the common header and footer
  parts of these files into...

* viewcvs/templates/dir_header.ezt
* viewcvs/templates/dir_footer.ezt
  ...these new include files.

* viewcvs/website/upgrading.html
  Update with notations about these changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@823 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-15 05:27:55 +00:00
cmpilato f9b6bd3f05 Some tarball-generation fixes. Thanks to Ulrich Goertz <debian@g0ertz.de>
for whipping me into action.

* viewcvs/lib/viewcvs.py
  (_strip_suffix): If the "suffix" is the whole last path component,
    remove that component altogether (rather than leaving an
    empty-string component after the strip)
  (generate_tarball): Include timestamps for directories now.  For
    CVS, directory timestamps will be the youngest of the dates for
    files in that directory.  For Subversion, same routine except that
    files and subdirs datestamps count.
  (download_tarball): Don't include in a tarball all the empty
    directories between the root of the repository at the directory
    being tarballed.  Just stick the tarballed directory into the top
    of the tarball, either by its own name (if we know it) or by the
    configured name of that repository root (if the top-most directory
    is the to-be-tarballed directory).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@822 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-13 21:59:52 +00:00
cmpilato f0ae4c61f9 Fix some line-length > 80 columnsness.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@821 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-13 21:59:24 +00:00
cmpilato 04426fdf30 * viewcvs/tparse/tparse.cpp
* viewcvs/tparse/tparse.h
* viewcvs/tparse/tparsemodule.cpp
* viewcvs/tparse/tparsemodule.h
  Massive tparse reindenting, reformatting, and spacing /
  capitalization fixes in messages.  Patch by Max Bowsher
  <maxb@ukf.net> (tweaked a little by cmpilato to ensure lines < 80
  characters).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@820 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-06 02:52:08 +00:00
cmpilato aa65061e43 * viewcvs/lib/viewcvs.py
(Request.run_viewcvs): Look in the Attic/ for files in CVS URLs, and
    redirect on a 'hit'.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@819 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-03-31 21:56:22 +00:00
cmpilato 8b230d035a Patch by Max Bowsher <maxb@ukf.net> and Erik Huelsmann <e.huelsmann@gmx.net>.
* tparse/tparse.cpp
  (TokenParser::get): Write one less byte in case of
    @-sign-is-last-byte-in-buffer: the byte will be transferred to the
    start of the newly filled buffer.
  (tparseParser::parse_rcs_tree): Use correct pointer when
    constructing linked list.

* tparse/tparsemodule.cpp
  (PythonSink::define_revision): Don't leak PyString objects.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@818 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-03-30 14:21:25 +00:00