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