* lib/vclib/svn/__init__.py
(_datestr_to_date): Make this function more robust in the face of
bogus datestamps.
* lib/viewvc.py
(htmlify, format_log, make_time_string, make_rss_time_string,
build_commit, view_directory): Make this functions more gracefully
handle "None" revision metadata, and not generate data like
"Unknown date" or " ".
* templates/log.ezt,
* templates/markup.ezt,
* templates/rss.ezt,
* templates/revision.ezt,
* templates/log_table.ezt
Handle empty revision metadata more gracefully.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1533 8cb11bc2-c004-0410-86c3-e597b4017df7
the output stream.
* lib/viewvc.py
(copy_stream): Don't supply a default value for 'dst', and don't
special-case a value of None for it, either.
(view_checkout, view_cvsgraph_image, view_doc): Pass
request.server.file() as the 'dst' parameter to copy_stream().
(view_patch): Pass request.server.file() as the 'dst' parameter to
copy_stream(). Also, use request.server.file() instead of
sys.stdout.
(download_tarball): Use request.server.flush() instead of
sys.stdout.flush().
(view_error): Use server.file() instead of sys.stdout.
* lib/query.py
(main): Use server.file() instead of sys.stdout.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1532 8cb11bc2-c004-0410-86c3-e597b4017df7
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
Add some more debugging, and consume stdin so CVS's pipe doesn't
back up (which causes an abort()).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1518 8cb11bc2-c004-0410-86c3-e597b4017df7
Fix the loginfo-handler's argument handling so that it works with
single-file commits in CVS 1.12.x.
Patch by: Cristian Tibirna <ctibirna@giref.ulaval.ca>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1517 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
Drop a skeletal FAQ page into place, but don't hook it into the rest
of the site, seein' as how there's no real content here yet.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1503 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
svndbadmin usage.
* INSTALL
(SQL CHECKIN DATABASE): Recommend the use of 'svndbadmin update REV'
in post-commit hooks, and 'svndbadmin update --force REV' in
post-revprop-change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1496 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
* bin/make-database
Up the length of the people table's 'who' column to 128 characters.
Suggested by: Ted Mielczarek <luserspaz@tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1492 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
of requiring that you run it while sitting in its containing directory).
* viewvc-install
(_actual_src_path): New helper function.
(replace_file): Move this functionality into...
(install_file): ...here. Also, normalize some variable names for
consistency with...
(install_tree): ...this.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1488 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
(install_file, install_tree): Replace '/' with the OS-specific
directory separator character in the destination path before processing.
This is follow-up to r1458.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1483 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
(SUBVERSION INTEGRATION): Tweak the example for testing Subversion
Python bindings installation to be useful, showing how to find the
installed version of those bindings.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1479 8cb11bc2-c004-0410-86c3-e597b4017df7