Commit Graph

1099 Commits (0be0bf1e9d1b35ce4b102c98338de0dfc6856c31)

Author SHA1 Message Date
cmpilato 0be0bf1e9d * viewcvs/lib/viewcvs.py
(view_revision_svn): Remove.
  (view_revision): Eat up view_revision_svn's little bit o' work.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1120 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-10 13:38:58 +00:00
cmpilato 2e9593eff0 * viewcvs/lib/vclib/bincvs/__init__.py
(BinCVSRepository.rawdiff): Ignore warnings from rcsdiff.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1119 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-05 12:51:50 +00:00
cmpilato 2e13e6fd4c Expose regular-expression-based search to Subversion repositories, too.
* viewcvs/lib/viewcvs.py
  (view_directory): Set 'selection_form' and friends for 'svn'
    roottypes, too.

* viewcvs/lib/vclib/svn/__init__.py
  (FileContentsPipe.readline): Fix usage of core.svn_stream_readline().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1118 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-04 15:05:39 +00:00
cmpilato 8bdfd374a2 Sticky variables are cool and all (despite being less elegant than a
cookies-based implementation...), but there are some that simply
should stick when switching to a view of a different repository root
(such as only_with_tag).

* viewcvs/lib/viewcvs.py
  (_sticky_vars): Convert to a dictionary, and let the values
    associated with the sticky variables indicate whether that
    stickiness spans repository roots.
  (Request.get_link): Pay attention to the spanrootsedness of the
    sticky variables.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1117 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-04 15:01:08 +00:00
cmpilato 0506513760 Expose "tip o' the branch" links from the log view.
* viewcvs/lib/viewcvs.py
  (view_log): Add new template variables: 'tag_view_href',
    'tag_download_href', 'tag_download_text_href', 'tag_annotate_href',

* viewcvs/templates/include/view_tag.ezt
  Expose links to the tip of a currently selected branch.

* viewcvs/website/upgrading.html
  Document new variables.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1116 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-03 22:23:35 +00:00
cmpilato 54c1b4f760 Finish Bug #1309545 ("tip of the branch" URLs don't work with 'bincvs' module)
* viewcvs/lib/vclib/bincvs/__init__.py
  (COMalformedOutput, COMissingRevision): New exception classes.
  (BinCVSRepository._get_tip_revision): New helper.
  (BinCVSRepository.openfile): If a COMissingRevision exception is
    raised, use rlog to try to resolve to a real (existing) revision.
  (_parse_co_header): Stop writing HTML error messages, and use the
    new exceptions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1115 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-03 20:57:12 +00:00
cmpilato 0881ded7c0 * templates/directory.ezt,
* templates/dir_alternate.ezt
  Lose unnecessary P tags which tend to oversize errorful rows.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1114 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-03 15:31:27 +00:00
cmpilato 73b347ee5d Finish Bug #1097695 - Exception on CVS revisions with 2-digit year
* viewcvs/lib/vclib/bincvs/__init__.py
  (_parse_log_entry): Ensure that revision years > 1970, as rlog seems
    only to assume they are > 1900.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1113 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-30 15:10:49 +00:00
cmpilato a16f40e0ac * viewcvs/templates/directory.ezt
Lose the alt-text on the row icons, and restore View/download distinction
  in title attributes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1112 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-29 13:42:32 +00:00
cmpilato 2a93244acb * viewcvs/lib/viewcvs.py
(view_query): Query on subdirectories of the request directories,
    too.  This is a followup to the changes made in revision 1.367.
    Thanks to Russell Yanofsky for noticing the mistake.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1111 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-29 13:28:38 +00:00
cmpilato c85732a907 * viewcvs/lib/viewcvs.py
(nav_header_data, view_log): Expose annotation links for Subversion
    in a couple more places.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1110 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-28 19:27:55 +00:00
cmpilato 97a07dc88e This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0
Strict.  Changes have been made in the EZT templates, the CSS files,
HTML code embedded in the Python files as well as in the help
files. The original code structure and design is the very same.  No
other improvements have been made to the browser code and it still
uses the old layout tables to create the page grid.

Apart from the XHTML/CSS code changes, the patch adds an argument (-x
x) for CVSGraph in viewcvs.py in the view_cvsgraph function to tell
CVSGraph to generate XHTML code. For Mozilla/Firefox to recognize the
id attribute in the image map generated, the content-type must be set
to application/xhtml+xml (see
https://bugzilla.mozilla.org/show_bug.cgi?id=109445).  This patch does
however not change the content-type, but uses an ugly hack to make the
CVSGraph output work in Mozilla with the current text/html
content-type: a name attribute is merged into the id attribute in the
map_name defined in the cvsgraph.conf.dist file.

The XHTML code does not contain the standard XML declaration, just the
XHTML 1.0 Strict Doctype. This is to keep ViewCVS as encoding agnostic
as before and let the browser decide which encoding to use. An XML
file without the encoding declared must be interpreted as UTF-8 (or
UTF-16 if the byte order mark is included).

* viewcvs/cvsgraph.conf.dist
  Add name="" hack to the 'map_name' variable so Mozilla/Firefox will work.

* viewcvs/lib/ezt.py
  XHTML-ize sample output.

* viewcvs/lib/viewcvs.py
  XHTML-ize hard-coded output.
  (view_cvsgraph): Pass "-x x" to cvsgraph to force XHTML production.

* viewcvs/lib/blame.py
* viewcvs/lib/debug.py
* viewcvs/lib/py2html.py
* viewcvs/lib/query.py
* viewcvs/lib/vclib/bincvs/__init__.py
* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/error.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/query_form.ezt
* viewcvs/templates/query_results.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/roots.ezt
* viewcvs/templates/docroot/help_dirview.html
* viewcvs/templates/docroot/help_log.html
* viewcvs/templates/docroot/help_logtable.html
* viewcvs/templates/docroot/help_query.html
* viewcvs/templates/docroot/help_rootview.html
* viewcvs/templates/docroot/styles.css
* viewcvs/templates/include/branch.ezt
* viewcvs/templates/include/branch_form.ezt
* viewcvs/templates/include/diff_form.ezt
* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/file_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
* viewcvs/templates/include/paging.ezt
* viewcvs/templates/include/sort.ezt
* viewcvs/templates/include/view_tag.ezt
  XHTML-ize hard-coded output and templatized data.

* viewcvs/CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1109 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-28 17:06:16 +00:00
cmpilato b629620cf6 Lose 'row.href' and 'row.rev_href' for the more meaningful
'row.log_href' and 'row.view_href'.

* viewcvs/lib/viewcvs.py
  (view_directory): For files, rename 'row.href' to 'row.log_href',
    and 'row.rev_href' to 'row.view_href'.  For directories, do the
    renames, but swap the mappings.

* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
  Track the changes to these data dictionary items.

* viewcvs/website/upgrading.html
  Note the changed variables.  Also, add svn_path as a configuration
  parameter recently added.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1108 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-27 18:08:47 +00:00
cmpilato 4a24ab0c36 * viewcvs/lib/viewcvs.py
(common_template_data): Show a non-empty root listing when there is
    a non-empty list of roots, regardless of the size of that list.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1107 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 19:34:41 +00:00
cmpilato 701452a3fb Fix Bug #1177407: CVS tags with a slash cause an exception
* viewcvs/lib/viewcvs.py
  (_re_validate_number): Allow '/' in tag names.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1106 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 18:57:32 +00:00
cmpilato 577728db86 Fix Bug 1271136: Query results wrong for directories with similar
names

* viewcvs/lib/viewcvs.py
  (view_query): Use "exact" matches for the query directory, instead
    of "like" ones.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1105 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 17:14:42 +00:00
cmpilato 1b967b1a09 * viewcvs/lib/vclib/__init__.py (Repository.rawdiff),
* viewcvs/lib/vclib/svn/__init__.py (SubversionRepository.rawdiff),
* viewcvs/lib/vclib/svn_ra/__init__.py (SubversionRepository.rawdiff),
* viewcvs/lib/vclib/ccvs/__init__.py (CCVSRepository.rawdiff),
* viewcvs/lib/vclib/bincvs/__init__.py (BinCVSRepository.rawdiff):
  For clarity, replace uses of the term 'path' with 'path_parts' in the
  Repository.rawdiff() stub and implementations.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1104 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 16:07:17 +00:00
cmpilato d7429e31ae Add Subversion blame support to the 'svn_ra' module, and re-enable the
'svn' module's blame support with a non-streamy kludge.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (SubversionRepository.annotate): Implement (for real).
  (_item): New, copied from one of a thousand places...

* viewcvs/lib/vclib/svn/__init__.py
  (BlameSourceKludge): New, non-streamy form of the Subversion blame factory.
  (SubversionRepository.annotate): Use BlameSourceKludge here.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1103 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 15:57:57 +00:00
cmpilato 30c3fbef04 * viewcvs/lib/vclib/svn/__init__.py
(BlameSource.__getitem__): Ensure initialization of prev_rev.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1102 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-24 20:05:30 +00:00
cmpilato edd45cb153 * viewcvs/lib/vclib/svn/__init__.py
(SubversionRepository.annotate): Re-disable temporarily.  Something's
    wrong.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1101 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 21:08:56 +00:00
cmpilato ac88e349ca Expose annotation support for local Subversion repositories. Patch
largely by Stefan Haller <haller@ableton.com>, at least in the
approach used.

* viewcvs/viewcvs.conf.dist
  (svn_path): New configuration variable.

* viewcvs/lib/config.py
  (Config.set_defaults): Populate a new svn_path config member.

* viewcvs/lib/viewcvs.py
  (Request.__init__): Tweak the way Subversion's vclib.Repository
    objects are opened to have different codepaths for the 'svn' and
    'svn_ra' modules, and pass the new cfg.general.svn_path option to
    the 'svn' module's SubversionRepository.

* viewcvs/lib/vclib/svn/__init__.py
  (BlameSource, BlameSequencingError, _item): New.
  (SubversionRepository.__init__): Add 'svn_path' parameter.
    Calculate and store a path for the 'svn' command-line client binary.
  (SubversionRepository.annotate): Really implement annotation.

* viewcvs/templates/log.ezt,
* viewcvs/templates/log_table.ezt
  Enable annotate links for Subversion, too!


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1100 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 20:15:08 +00:00
cmpilato a5ad1e5f41 * viewcvs/lib/blame
(link_includes): Use the more generic itemtype() interface instead of
    the rcsfile() one.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1099 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 19:40:29 +00:00
cmpilato 828ee07077 Abstract the annotate interface by moving core functionality down
into the vclib providers.

* viewcvs/lib/vclib/__init__.py
  (Repository.annotate): New interface.

* viewcvs/lib/vclib/ccvs/blame.py
  New file, with contents cored from viewcvs/lib/blame.py, and
  reworked a little bit to avoid data tainting, and to be independent
  of the vclib implementation.

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.annotate): Implement Repository.annotate() by returning
    a blame.BlameSource object.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.annotate) Implement by returning a
    vclib.ccvs.blame.BlameSource object.

* viewcvs/lib/vclib/svn/__init__.py
* viewcvs/lib/vclib/svn_ra/__init__.py
  (SubversionRepository.annotate): New.  Return NotImplementedError.

* viewcvs/lib/viewcvs.py
  (view_annotate): Use new blame.blame() function.

* viewcvs/lib/blame.py
  Gut this sucker, moving most of the heavy lifting into the ccvs module.
  (HTMLBlameSource): New wrapper for BlameSource objects to handle
    HTML-izing and such.
  (blame): New function, thin wrapper around
  (make_html): Remove unused 'sticky' param.  Tweak to use new
    abstracted interface, but at the cost of diff_url support.  I'll
    probably come back to this (by adding a --diff-url option), but
    does anyone really care?


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1098 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 18:51:35 +00:00
cmpilato 034a661704 * viewcvs/INSTALL
Rework the list the required software-n-stuff.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1097 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 13:48:36 +00:00
cmpilato dcf43ad7b8 Teach ViewCVS to obey the Subversion location tracing algorithm, which
identifies a line of history using a path and a "peg revision", and
then traces that line of history to figure out the object's current
path as of other revisions fed to the algorithm.

Previously, if I had a Subversion file that had been renamed a few
times (so, had multiple distinct paths over time), and I wanted to
diff between revisions at which the object's path was different, as
well as different from its path as of HEAD, the URL was this
monstrously long thing:

   http://.../viewcvs/path/to/file?p1=/old/path/of/file&r1=X&p2=/another/old/path/of/file&r2=Y

Now, it's simply:

   http://.../viewcvs/path/to/file?r1=X&r2=Y

Support for p1 and p2 are still present (so you can diff across
arbitrary paths in Subversion), but URLs generated by ViewCVS will no
longer use those query params.

* viewcvs/lib/viewcvs.py
  (view_log): Lose the use of p1 and p2 in diff URLs.
  (_get_diff_path_parts): New helper function.
  (view_diff): Teach ViewCVS to obey the Subversion location tracing
    algorithm by using the new _get_diff_path_parts() helper.

* viewcvs/lib/vclib/svn/__init__.py
  Require Subversion 1.1.0 or better.
  (_allow_all, get_location): New.

* viewcvs/lib/vclib/svn_ra/__init__.py
  Require Subversion 1.3.0 or better.
  (get_location): New.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1096 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 13:47:53 +00:00
cmpilato 70c4a29059 * viewcvs/lib/compat.py
Revert revision 1.18.  The Way of Russell is Enlightenment.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1095 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 11:22:30 +00:00
cmpilato 88ac9dd646 * viewcvs/lib/vclib/__init__.py
(InvalidRevision.__init__): Make the revision argument optional, and
    fix the exception strings up a bit.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1094 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-22 22:03:55 +00:00
cmpilato 0579698762 * viewcvs/lib/compat.py
(compare_versions): New.  (To be used in a future commit by
    Subversion vclib layers.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1093 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-22 20:37:23 +00:00
cmpilato d19322a7c5 * viewcvs/lib/vclib/svn_ra/__init__.py
(LogCollector.add_log): Fix a bug in the rename tracing algorithm which
    was triggered whenever a path's parent was copied, and the path's
    copied location was edited, in the same revision.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1092 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-21 19:53:29 +00:00
cmpilato 1b2dc4efa3 Consistify the output of the vclib diff engines, sticking with GNU
diff format.  This also has the effect of simplifying the wrapping
code (which wasn't working anyway) a little bit.  Also, restore
functionality lost in the last re-org of the diff functionality
(svn_ra).  Finally, make the vclib.ccvs module's lack of diff
functionality a little more apparent to those who attempt to use it.

* viewcvs/lib/vclib/__init__.py
  (Repository.rawdiff): Specify that returned diffs are expected to be
    in GNU diff format.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rawdiff): Eat up the rcsdiff header lines, not
    exposing them to the caller.  The goal is to expose consistent
    diff output across vclib providers, so we'll shoot for GNU diff
    compliance.

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff): Implement this interface, though only to
    raise an exception about how the functionality isn't implemented.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (do_diff): Sync with vclib.svn.do_diff().
  (SubversionRepository.rawdiff): Implement this interface.

* viewcvs/lib/viewcvs.py
  (diff_parse_headers): Lose the 'rootpath' argument.  We've tuned the
    vclib providers to stop exposing that stuff.
  (view_diff): Update calls to diff_parse_headers().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1091 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-20 15:06:52 +00:00
pefu adbaa3d909 Fixed SF-Bug # 1192503: Updated broken link to competing project cvsweb
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1090 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-13 22:04:24 +00:00
rey4 42955196e8 Pass strings and callbacks to EZT instead of so many pseudo file objects.
* lib/viewcvs.py
  (MarkupBuffer):
    remove, not used anymore and StringIO is always there if we need it

  (MarkupPipeWrapper):
    make into a one-shot callback instead of going though contortions to
    support repeated read() calls

  (MarkupEnscript.__init__):
    add unrelated comment

  (markup_stream_python, view_markup):
    no need to wrap strings in MarkupBuffers, ezt supports strings too


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1089 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-24 05:22:59 +00:00
rey4 f236e63a43 Various improvements to EZT
- make substitution pattern implementation to use current format instead
    of writing directly to output

  - make it possible to pass python functions to ezt templates as simple
    callbacks

  - update documentation with information about callbacks, file pointers,
    and the [format] directive

* lib/ezt.py
  (__doc__):
    update documentation

  (_write_value):
    add code to implement callbacks and substitution patterns

  (Template._parse, Template._cmd_print, Templte._cmd_print_html):
    update to work with changed _write_value function

  (Template._cmd_subst):
    removed, functionality moved into _write_value


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1088 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-24 05:10:45 +00:00
rey4 883e9a98bb Simplify diff code somewhat
* lib/viewcvs.py
  (diff_parse_headers, human_readable_diff, raw_diff):
    merge raw_diff and human_readable_diff into new
    diff_parse_headers function

  (view_diff):
    call diff_parse_headers


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1087 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-24 05:01:56 +00:00
rey4 7cdebbaf24 Move some diff functionality into vclib
* lib/vclib/__init__.py
  (Repository.rawdiff, UNIFIED, CONTEXT, SIDE_BY_SIDE, _diff_args):
    new

* lib/vclib/bincvs/__init__.py
  (Repository.rawdiff):
    new

* lib/vclib/svn/__init__.py
  (Repository.rawdiff):
    new

  (do_diff):
    move code that fixes diff headers here

* lib/viewcvs.py
  (_path_parts):
    new function to break a repository path into parts

  (Request.run_viewcvs):
    use _path_parts function

  (view_diff):
    use new Repository.rawdiff methods and _path_parts


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1086 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 20:07:02 +00:00
rey4 cbc95d7617 Fix check for forbidden paths on tarball download and simplify
generate_tarball function.

* lib/viewcvs.py
  (download_tarball):
    get rid of overly broad check for forbidden paths which would 404 on
    tarballs of all directories with forbidden names instead of just top
    level directories with forbidden names.

  (generate_tarball):
    get rid of tar_top and rep_top arguments

    get rid of default value for stack argument, which is likely to cause
    problems in multithreaded environments like mod_python

    reorganize and add comments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1085 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 19:33:18 +00:00
cmpilato 12d28a5509 Sooth pain felt by Daniel Berlin <dberlin@dberlin.org>, who complained
that navigation to a Subversion resource no longer in HEAD (or in a
directory no longer in HEAD) caused generated parent directory links
which 404'ed.

* viewcvs/lib/viewcvs.py
  (nav_path, common_template_data): When generating navigational links
    for Subversion repositories, if the current page was a request
    with an associated explicit revision number, use that revision
    number in references to parent directory views and "other" views
    of the file.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1084 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 18:52:06 +00:00
rey4 c2c60e243d Fix exception when cvsdbadmin is passed only one argument
* tools/cvsdbadmin
  (global code)
    make sure script has 2 arguments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1083 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 18:51:54 +00:00
rey4 6c90233f4e Tighten up some logic in cvs revision number functions. I think the first
change might fix an rare exeception someplace, but these changes been sitting
in my working copy for a couple of months and I don't remember.

* lib/vclib/bincvs/__init__.py
  (_match_revs_tags):
    when iterating over trunk revisions, don't assume that a non-empty history
    array means there is a valid previous revision, always check the "prev"
    value explicity. It could be None now that _match_revs_tags accepts
    incomplete lists of revisions (as of rev 1.47)

  (_add_tag):
    remove redundant check for None revisions


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1082 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 18:49:47 +00:00
rey4 5d0396e4c7 Restore viewcvs's ability to run under python 1.5
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rcs_popen):
    convert tuples to lists before passing to list.extend

* lib/compat.py
  (formatdate):
    cut n' paste of rfc822.formatdate()

* lib/popen.py
  (popen):
    don't use string "find" method

* lib/viewcvs.py
  (Request.get_link):
    don't use dictionary "setdefault" method

  (check_freshness):
    don't use rfc822.formatdate()

* lib/win32popen.py
  (CommandLine, MakePrivateHandle, MakeInheritedHandle):
    don't use +=, |= operators

  (File2FileObject):
    don't use string "find" methods

  (SpoolWorker):
    don't use print >> syntax


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1081 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 18:41:59 +00:00
cmpilato 11769e1b29 Miscellaneous fixes around the forbiddenness support, mostly bugs
where too much data was being hidden that I think I caused myself, but
also a security fix where not enough data was being hidden.  At any
rate, this should bring us to consistent support for forbidden modules
(directories, not files) across the various views.

* viewcvs/lib/viewcvs.py
  (Request.run_viewcvs): Move the forbidden check until later, after
    we know the path type, because forbiddenness only applies to
    top-level directories (modules), not files.
  (view_directory): Only do forbidden checks on directories, not files.
  (view_query): Strip forbidden/hidden paths from the query results.
    Noticed by Jon Stritar (jstritar) in Bug #1249974.

* viewcvs/lib/query.py
  (build_commit): Strip forbidden/hidden paths from query results.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1080 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-17 21:45:35 +00:00
cmpilato 26d6fdb439 * viewcvs/CHANGES
Forward port entries from the 0.9.x branch.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1079 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-17 21:20:51 +00:00
cmpilato bf4e37d54e * viewcvs/website/download.html
Update links to downloadable versions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1078 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-17 21:17:14 +00:00
cmpilato 5df9a282b0 Make svndbadmin run to completion on the Subversion source code
repository, which it previously failed to do because of poor change
handling.  Also, stop it from Aborting at the end of every run due to
double-freeing of memory.

* viewcvs/tools/svndbadmin
  (SvnRepo.__init__): No longer keep self.pool around, and certainly
    don't close it on __del__() -- that's what the svn.core.run_app()
    wrapper framework is for.
  (_get_diff_counts): Just accept a diff file pointer object as input,
    and let the caller generate such a thing and pass it in.
  (SvnRev.__init__): Make use of the change item's base_path and
    base_rev to get accurate locations against which to diff.  Update
    calls to _get_diff_counts(), and make use of a new revision root
    cache.
  (SvnRev._get_root_for_rev): New revision root caching helper.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1074 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-09 03:22:50 +00:00
cmpilato d1b71817d7 * viewcvs/lib/viewcvs.py
(generate_tarball, Request.run_viewcvs): Use '404 Not Found' instead
    of '403 Forbidden' for forbidden paths.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1073 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 16:08:34 +00:00
cmpilato f1657e2c34 Fix copy-n-pasto in CHANGES file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1071 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 07:58:52 +00:00
cmpilato 2c0181d625 Merge in CHANGES from 0.9.3 release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1070 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 07:28:32 +00:00
cmpilato 2a75e75d23 Tweak website to point to new 0.9.3 release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1069 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 07:12:53 +00:00
cmpilato 27ad9a4f9d * lib/viewcvs.py
(download_tarball): Throw a 403 Forbidden area if a tarball request
    is for a forbidden module.  Patch by Olaf Hering <olh@suse.de>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1065 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 05:30:27 +00:00
cmpilato 6eeaf2be2b * lib/vclib/svn/__init__.py
(SubversionRepository.__init__): Catch (and ignore) a ValueError
    exception thrown by signal.signal.  It's probably the situation
    described in this email:
    http://mailman.lyra.org/pipermail/viewcvs/2005q1/003357.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1064 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-08 04:46:58 +00:00