(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
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
* 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
* 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
* 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
* 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
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
(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
(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
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
'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
(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
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
* 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
'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
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
(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
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
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
(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
(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
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
* 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
- 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
* 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
* 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
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
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
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
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
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
(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
(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