supports logs on directories, too, ya know). And make some other
little documentation changes.
* viewcvs/lib/vclib/__init__.py
(Repository.itemlog): Was Repository.filelog().
(Revision.__init__): Document the input parameters.
* viewcvs/lib/vclib/bincvs/__init__.py
(BinCVSRepository.itemlog): Was BinCVSRepository.filelog().
* viewcvs/lib/vclib/ccvs/__init__.py
(CCVSRepository.itemlog): Was CCVSRepository.filelog().
* viewcvs/lib/vclib/svn/__init__.py
(SubversionRepository.itemlog): Was SubversionRepository.filelog().
* viewcvs/lib/vclib/svn_ra/__init__.py
(SubversionRepository.itemlog): Was SubversionRepository.filelog().
* viewcvs/lib/viewcvs.py
(view_markup, view_log): Update calls to Repository.itemlog() (from
Repository.filelog()).
* viewcvs/lib/cvsdb.py
(GetCommitListFromRCSFile): Update calls to Repository.itemlog()
(from Repository.filelog()).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1050 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/blame.py
(CVSParser.is_branch): Tighten up regular expression with '^'/'$'.
Revisions like "11.0.2.2.0.1" were matching not with groups
"11.0.2.2" and "1", but with "11" and "2.2.0.1".
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1049 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_log): Fix a bug where use of the diff form via branch
selection resulted in a log view instead of a diff view. Reported
by Amy Langenhorst <arl@noaa.gov>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1048 8cb11bc2-c004-0410-86c3-e597b4017df7
grouping directories in the directory view. Now, make that behavior
optional (though, the default), but also fix it so that the directory
group itself is internally sorted by the current sort key. This more
accurately mimics the likes of the Windows Explorer.
* viewcvs/viewcvs.conf.dist
(sort_group_dirs): New option.
* viewcvs/lib/config.py
(Config.set_defaults): Set default value for sort_group_dirs.
* viewcvs/lib/viewcvs.py
(file_sort_cmp): If grouping directories, sorts dirs higher than
files. Otherwise, use normal sorting rules.
* viewcvs/website/upgrading.html
Note the new option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1047 8cb11bc2-c004-0410-86c3-e597b4017df7
directory view. This is pretty common request, the most recent by
Sergio Rua <srua@plus.net>.
* viewcvs/lib/vclib/svn_ra/__init__.py
(get_youngest_revision): New.
* viewcvs/lib/vclib/svn/__init__.py
(get_youngest_revision): New.
* viewcvs/lib/viewcvs.py
(view_directory): Re-organize some data dictionary stuffing (I
really wish that *all* data dictionary parameters were initialized
at the head of each view function so we can see a canonical list
of those params, but maybe another day...). Also, for 'svn'
roottypes, populate a new 'youngest_rev' and 'youngest_rev_href'
dictionary items.
* viewcvs/website/upgrading.html
Document the new 'youngest_rev' and 'youngest_rev_href' template keys.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1044 8cb11bc2-c004-0410-86c3-e597b4017df7
(enscript_extensions): Add '.cs', '.bas', and '.cls' extensions,
mapping to 'csharp', 'vba', and 'vba', respectivelyly, at the
request of Bo Berglund <bo.berglund@telia.com> and Hern��n Mart��nez
Foffani <hernan@orgmf.com.ar>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1042 8cb11bc2-c004-0410-86c3-e597b4017df7
vtable structure), update the ViewCVS 'svn_ra' module to use it. This
module now almost has total functional parity with the 'svn' module.
* viewcvs/lib/vclib/svn_ra/__init__.py
Import the svn.ra module.
(date_from_rev, created_rev): Actually flesh out these functions
using the new RA capabilities.
(LastHistoryCollector.add_history): Remove leading slashes from
paths used to make ChangedPath items.
(either_binary): Leave a TODO, with some optimization ideas.
(SubversionRepository.__init__): Use the RA interface to fetch the
youngest revision instead of a really kludgy (and more expensive)
algorithm based on dirents.
(FileDiff.get_files, SubversionRepository.openfile): Fixup the use
of streams.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1038 8cb11bc2-c004-0410-86c3-e597b4017df7
checkout_magic is disabled by changing the default view for file URLs from
"log" to "checkout"
This causes some URL compatibility to be lost when checkout_magic is disabled.
Bookmarks which pointed to log pages but don't have explicit view=log
parameters will point to checkout pages instead.
* lib/viewcvs.py
(Request.run_viewcvs):
change default view for files from "log" to "checkout" when checkout_magic
is disabled
(Request.get_link):
don't add explicit view=checkout parameters for checkout links when
checkout_magic is disabled
don't drop explicit view=log parameters for log links
* website/upgrading.html
add note about URL compatibility
* INSTALL
update section on access control
* viewcvs.conf.dist
update documentation for "root_as_url_component" and "checkout_magic"
move "checkout_magic" option directly underneath "root_as_url" component
because the two options are related
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1037 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py
(view_directory):
add new row.viewable attribute so it is possible to tell whether a file
link goes to a checkout or markup page
* templates/directory.ezt:
add title attributes
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1036 8cb11bc2-c004-0410-86c3-e597b4017df7
(enscript_extensions): Add '.f90' as an extension mapping to
'fortran'. Suggestion by Ed Zaron <ezaron@coas.oregonstate.edu>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1032 8cb11bc2-c004-0410-86c3-e597b4017df7
of "template sets."
I'm introducing a new configuration variable ('template_dir') which is
the parent directory of all ViewCVS templates. Those templates have
names which match the views they describe (directory.ezt,
revision.ezt, graph.ezt, etc.). The 'docroot' variable will now
default to "<template_dir>/docroot". Finally, the [templates] section
will continue to work as before, save that all configuration therein
(and templates not configured will fallback to
"<template_dir>/<view_name>.ezt").
The beauty of this is that folks can start whipping up (and
maintaining themselves) ViewCVS template sets which can be traded and
shared, like themes for Mozilla or Windows XP. EZT is super-powerful,
and there are some really fun things you can do with it to serve up
interesting and unique ViewCVS views. But while we want to encourage
creativity and innovation, we don't want the ViewCVS project itself
having to maintain everyone's fun little themes. Anyway, so now
installing a new template set is just a matter of dropping that set
directory somewhere (anywhere, really) on your system and pointing
'template_dir' to that directory tree. No (very annoying) template
modification conflicts to deal with every time you update ViewCVS on
your system.
And the best part is that existing ViewCVS configurations should all
continue to work compatibly.
* viewcvs/viewcvs.conf.dist
Add a new option, "template_dir". Tweak documentation on the
"docroot" option. And make the whole [templates] section work a
little differently.
* viewcvs/lib/config.py
(Config.set_defaults): Use 'None' as the default value for the
self.templates.directory, self.templates.log,
self.templates.query, self.templates.diff, self.templates.graph,
self.templates.annotate, self.templates.markup,
self.templates.error, self.templates.query_form,
self.templates.query_results, and self.templates.roots options.
Add a new default value for self.options.template_dir.
* viewcvs/lib/viewcvs.py
(get_view_template): New.
(generate_page): Instead of taking a template name, take a view
name. Also, call get_view_template() to generate the full
template path.
(view_markup, view_roots, view_directory, view_log, view_annotate,
view_cvsgraph, view_diff, view_revision_svn, view_queryform,
view_queryform, view_error): Update calls to generate_page().
* viewcvs/lib/query.py
(main): Use viewcvs.get_view_template().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1029 8cb11bc2-c004-0410-86c3-e597b4017df7
easier to change the default view.
* lib/viewcvs.py
(Request.run_viewcvs):
move code that handles the magic markup mimetype.
remove unneccessary special case code for log pages with revisions
selected for diffs
(Request.get_link):
consolidate code that determines whether to skip sticky variables
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1028 8cb11bc2-c004-0410-86c3-e597b4017df7
view because I'm not really sure where they would fit best in the UI.
So for now, the view is only visible when viewcvs.cgi is loaded
with no trailing path in the URL and either root_as_url mode is
enabled or default_root is not set.
* lib/viewcvs.py
(Request.run_viewcvs, Request.get_link, nav_path, common_template_data,
_views):
add support for new view
(view_roots):
new function
* lib/config.py
(Config.set_defaults):
set default templates.roots option
* templates/roots.ezt
new template
* viewcvs.conf.dist
(templates/roots):
new option
(general/default_root, options/root_as_url_component):
update documentation
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1023 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/blame.py
(BlameSource.__init__):
set "revision" member to revision being annotated
* lib/viewcvs.py
(view_annotate):
use "revision" member
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1021 8cb11bc2-c004-0410-86c3-e597b4017df7
server on linux.
* lib/viewcvs.py
(copy_stream):
when copying to the sys.stdout, make sure to use the current
sys.stdout file object instead of the file object cached by
python as a default argument
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1017 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(generate_tarball): rep_top is a list, so stop testing it against strings.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1013 8cb11bc2-c004-0410-86c3-e597b4017df7
(_sigterm_handler): Make self available for compatibility with older
Python versions. (Thanks for catching this, Greg Stein.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1012 8cb11bc2-c004-0410-86c3-e597b4017df7
SIGTERM is sent to the process by registering a handler for that
signal which gracefully shuts down APR.
* viewcvs/lib/vclib/svn/__init__.py
(SubversionRepository.__init__): Register a handler for SIGTERM that
cleanly closes up shop.
(SubversionRepository._close): New (with code copied and modified
from __del__).
(SubversionRepository.__del__): Cored out (see _close).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1011 8cb11bc2-c004-0410-86c3-e597b4017df7
(_sticky_vars): Remove 'dir_pagestart' and 'log_pagestart' from the
set of sticky parameters. I simply can't see any utility in
keeping those things around, as they muck up more URLs than they help.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1007 8cb11bc2-c004-0410-86c3-e597b4017df7
with ViewCVS 0.9.2
* lib/viewcvs.py
(Request.run_viewcvs)
look for tarball parameter on directory paths, not file paths
----------------------------------------------------------------------
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1006 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py
(view_markup):
set annotate_href value
----------------------------------------------------------------------
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1005 8cb11bc2-c004-0410-86c3-e597b4017df7
markup links.
* lib/viewcvs.py
(is_viewable):
new function
(view_auto):
removed
(view_directory, view_cvsgraph, build_commit):
change auto links into direct links
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1004 8cb11bc2-c004-0410-86c3-e597b4017df7
were present in ViewCVS 0.9.2, but seem to have been inadvertently
removed since then.
* lib/viewcvs.py
(common_template_data):
set "up_href, "log_href," and "graph_href" template variables
for files
(view_markup):
set "annotate_href"
(view_directory):
stop setting "up_href" here
(view_log):
stop setting "graph_href" and "back_url" here
set "annotate_href" here
(view_queryform):
set "dir_href" here
* templates/annotate.ezt
* templates/diff.ezt
* templates/graph.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
* templates/query_form.ezt
* templates/include/branch.ezt
add links
* website/upgrading.html
document changed variables
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1003 8cb11bc2-c004-0410-86c3-e597b4017df7
C. Michael Pilato <cmpilato@collab.net> first reported this bug
on the dev list.
* lib/viewcvs.py
(Request.get_link):
add trailing slashes on revision view links
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@998 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewcvs): If there is no rootname, set a default one so
that further attempts to use it don't choke.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@996 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py
(view_markup):
don't set 'nav_file' template variable
* templates/markup.ezt
remove the clickable path right before the revision information
* templates/include/dir_header.ezt
remove clickable path in "Current Directory" row of summary table
* website/upgrading.html
add documentation on 'nav_file' template variable
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@994 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py
(Request.run_viewcvs):
add trailing slash to all directory paths, not just paths
for directory listing pages
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@991 8cb11bc2-c004-0410-86c3-e597b4017df7
the repository in apache based on the URL.
Thanks to Jonathan <voigtjr@gmail.com> for bringing this issue to my
attention on the users' list.
* lib/viewcvs.py
(Request.run_viewcvs):
add redirects for weird urls
(view_directory):
don't redirect here when there's no trailing slash; it's taken
care of in run_viewcvs
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@988 8cb11bc2-c004-0410-86c3-e597b4017df7
(PrintException): Escape the error message so it doesn't goof up
HTML display.
* viewcvs/lib/viewcvs.py
(Request.run_viewcvs, _validate_param): Don't escape params in
strings of raised exceptions, as that's the exception-handling
code's job.
(nav_header_data, common_template_data, clickable_path, view_log,
view_directory): Escape template data that needs escapin'.
(view_markup): Use un-escaped filename instead of the one in the
data dictionary.
(view_checkout): Re-org a little bit so that fp is always explicitly
closed.
(copy_stream): Instead of defaulting the output stream to None, and
letting None mean "gimme sys.stdout", just make the default output
sys.stdout.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@986 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_doc): Refer to "static files" instead of "help files", and to
try to get all the exceptionful states to occur before we fire up
the output process.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@985 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py
(view_revision_svn): Convert 'text_mods' and 'prop_mods' members of
each changed path item into EZT booleans.
* templates/revision.ezt
Use if-any tests, instead of comparisons with "1", to determine if
each changed path item has text or property mods.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@984 8cb11bc2-c004-0410-86c3-e597b4017df7
links instead of cobbling them together in cvsgraph.conf. This way
cvsgraph.conf doesn't have to change if we add new url schemes and we can
handle sticky variables and root parameters without special case code.
* lib/viewcvs.py
(Request.get_url):
accept new "partial" argument to append trailing ? or & to generated
url
(view_cvsgraph):
pass get_url generated links to cvsgraph instead of url fragments
* cvsgraph.conf.dist
use the new links passed by ViewCVS
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@981 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/bincvs/__init__.py
(_log_path):
remove initialization of unused variable
(_check_path):
distinguish error messages that come from os.stat()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@979 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/__init__.py
(DirEntry.__init__):
set "errors" member instead of "verboten"
* lib/vclib/bincvs/__init__.py
(CVSRepository.listdir):
don't skip "Attic" and "CVS" entries if we're not sure if they are
directories
don't skip entries in Attic/ when we can't tell if they are files or
directories
(CVSDirEntry.__init__):
use "errors" argument instead of "verboten"
(_get_logs):
don't set "DirEntry.log_errors" member, use "errors"
(_log_path):
don't return file access errors here, they are returned by _check_path
(_check_path):
return error strings on file access errors instead of simple booleans
* lib/vclib/ccvs/__init__.py
(CCVSRepository.dirlogs):
don't set "DirEntry.log_errors" member, use "errors"
* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
(get_logs):
don't set "DirEntry.log_errors" member
* lib/viewcvs.py
(view_directory):
use "DirEntry.errors" member instead of "log_errors"
(generate_tarball):
use "DirEntry.errors" member instead of "verboten"
* tools/cvsdbadmin
(RecurseUpdate):
use "DirEntry.errors" member instead of "verboten"
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@978 8cb11bc2-c004-0410-86c3-e597b4017df7