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
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
we can get rid of the alternative icons we provided for the standalone web
server and IIS. We can also get rid of the "icons" configuration option.
* lib/apache_icons.py
* tools/bin2inline_py.py
removed, icons for the standalone server
* windows/icons/apache_pb.gif
* windows/icons/small/back.gif
* windows/icons/small/dir.gif
* windows/icons/small/text.gif
removed, icons for IIS
* templates/include/footer.ezt
point "Powered by Apache" image at /icons/apache_pb.gif instead of
[icons]/apache_pb.gif
* standalone.py
(apache_icons, icons_last_modified):
removed
(ViewCVS_Handler.do_GET):
remove handling of /icons/ paths
(serve):
stop setting options.icons config value
* viewcvs.conf.dist
(icons):
removed
* lib/config.py
(Config.set_defaults):
stop setting default options.icons config value
* lib/viewcvs.py
(common_template_data):
don't set "icons" template variable
* windows/README
(ICONS FOR IIS):
removed
(DOCROOT OPTIMIZATION):
new section about the docroot parameter
* website/upgrading.html
remove documentation for "icons" template variable, update
documentation for "docroot"
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@923 8cb11bc2-c004-0410-86c3-e597b4017df7
templates/docroot/
* templates/docroot/help_*.html, templates/docroot/styles.css: copied
from website/
* templates/docroot/images/*: copied from website/images/ or from Apache.
fix up the transparency on some of the PNGs (just 1-bit transparency
though, so they work with IE).
* lib/viewcvs.py (view_doc): update to the new location for documentation.
We can use the same location in the "installed" and "uninstalled" modes.
* viewcvs.conf.dist: update the comment about the docroot config value.
* templates/*.ezt: update for new icon locations.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@921 8cb11bc2-c004-0410-86c3-e597b4017df7
closer to the Bonsai query interface, and provides better integration
with the rest of viewcvs.
Fixed two bugs in cvsdb.py:
- when loading up query results, set the checkin type on the Commit object
- When sorting on file name or author, order by the name rather than ID.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@877 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(check_freshness): Check the new configuration option for etag
support. Also, cfg.general.http_expiration_time is now
cfg.options.http_expiration_time.
* viewcvs/lib/debug.py
(DISABLE_ETAGS): Remove.
* viewcvs/lib/config.py
(Config.set_defaults): Set new 'generate_etags' option default to 1,
and move 'http_expiration_time' to the [options] section (from the
[general] one).
* viewcvs/viewcvs.conf.dist
(cfg.options.generate_etags): New.
(cfg.options.http_expiration_time): Was cfg.general.http_expiration_time.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@865 8cb11bc2-c004-0410-86c3-e597b4017df7
<james@daa.com.au>.
* standalone.py
(StandaloneServer.header): Fix some status handling stuff.
* viewcvs.conf.dist
Add default value for new http_expiration_time option.
* lib/config.py
(Config.set_defaults): Set default value for new
http_expiration_time
* lib/viewcvs.py
(check_freshness): Add cache control headers using the configured
expiration times.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@860 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(view_annotate): Now use blame.BlameSource() class for doing annotations.
* viewcvs/lib/blame.py
(BlameSource, BlameSequencingError): New classes.
(make_html): Re-work to use the use BlameSource code.
* viewcvs/lib/config.py
(Config.set_defaults): No longer set self.templates.footer.
* viewcvs/viewcvs.conf.dist
(templates.footer): Removed.
* viewcvs/templates/annotate.ezt
Re-work this template to make use of the newly exposed blame data,
and the fabulous new EZT assignment commands!
* viewcvs/website/upgrading.html
Document this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@833 8cb11bc2-c004-0410-86c3-e597b4017df7
(footer): Update the default location for footer.ezt (now in the
include/ subdir).
* viewcvs/website/upgrading.html
Add a note about rearranged template locations.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@826 8cb11bc2-c004-0410-86c3-e597b4017df7
it instead of bincvs. It works for log pages, directory pages, markup
pages, checkouts, and tarball downloads, but not for diffs because vclib
doesn't currently have an interface for diffing.
* viewcvs.conf.dist
(use_rcsparse):
new option
* lib/config.py
(Config.set_defaults):
make use_rcsparse off by default
* lib/viewcvs.py
(Request.run_viewcvs)
import ccvs module instead of bincvs if use_rcsparse is enabled
(markup_stream_enscript):
check for eof() method on file objects before calling
* lib/vclib/bincvs/__init__.py
(CVSRepository, BinCVSRepository):
separate new base class CVSRepository out of BinCVSRepository.
The new base class is shared with the ccvs module
(BinCVSRepository.filelog, _file_log):
move calls to rcs utilities out of _file_log() function and into the
filelog() method. This way _file_log() can be shared with the ccvs
module
(Revision.__init__):
add default argument values to simplify some calls in the ccvs module
(_get_logs, _log_path):
move some functionality out of _get_logs() into new _log_path()
function, which is shared with ccvs
* lib/vclib/ccvs/__init__.py
Lots of kludges added to this module to get it running again and taking
advantage of functionality already implemented in bincvs. It's not
pretty, but at least it works and is no longer out of date.
(CCVSRepository, CVSRepository):
delete old CVSRepository class, create new CCVSRepository class
implementing the current vclib api
(MatchingSink):
new sink superclass
(InfoSink):
updated to work with tags and default branches instead of always
finding latest trunk revisions. Also changed to work with DirEntry
objects
(TreeSink):
updated to work with Revision objects
(StreamText.next_revision, StreamText):
remove "next_revision" debugging method and all references to it
(COSink):
reimplement with a simpler algorithm
* lib/vclib/ccvs/rcsparse/common.py
(Sink.admin_completed):
new callback
(_Parser.parse):
call new callback
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@798 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs.conf.dist
(use_php, php_exe_path):
new options for php highlighting
* lib/config.py
(Config.set_defaults):
set defaults for new options
* lib/viewcvs.py
(markup_stream_php):
use new php option, and colorize using php's -s argument instead
of invoking the php interpreter, building a big string and
calling highlight_string()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@768 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(Request.get_link): Add code to generate the new revision info links.
(view_revision): New.
(_views): Alphabetically sort the views here, and add the new 'rev' view.
* viewcvs/viewcvs.conf.dist
(templates.revision): New.
* viewcvs/templates/revision.ezt
New.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@737 8cb11bc2-c004-0410-86c3-e597b4017df7
to disable a buggy and inefficient subversion feature. But it's no
longer neccessary with C. Mike's recent improvements to the subversion
module.
* viewcvs.conf.dist
(show_changed_paths):
removed option
* lib/config.py
(Config.set_defaults)
removed default assignment
* lib/viewcvs.py
(run_viewcvs):
stop passing option value to repository object
* lib/vclib/svn/__init__.py
(log_helper, fetch_log):
stop passing option value to log_helper function
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@726 8cb11bc2-c004-0410-86c3-e597b4017df7
(optionally, turned off by default). No diffs across paths yet, but
that's coming soon(ish)!
* viewcvs/lib/vclib/svn/__init__.py
(LogReceiver): Buh-bye.
(get_history): New.
(fetch_log): Use get_history() instead of the svn_repos_get_logs interface.
* viewcvs/lib/config.py
(Config.set_defaults): Add default for 'cross_copies' option.
* viewcvs/lib/viewcvs.py
(Request.run_viewcvs): Set the 'cross_copies' SubversionRepository
attribute based on the config option of the same name.
* viewcvs/viewcvs.conf.dist
(cross_copies): New.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@709 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/viewcvs.conf.dist
Make the 'show_changed_paths' option default to 0. We should
generally avoid a policy of checking in code that, by default,
SEGFAULTs. Further, showing changed paths in Subversion is a large
deviation of the manner in which CVS behaves, and I'd like to keep
the two displaying as similarly as possible in the default setup.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@684 8cb11bc2-c004-0410-86c3-e597b4017df7
download/view/markup links for old revisions of copied files.
The new fields are "Other changed files" which is a list of links to other
files changed in the same revision, "Copied from" which is displayed for
file revisions that are the result of a copy operations, and "Filename"
which is displayed for older file revisions which precede a copy operation.
* viewcvs.conf.dist
* lib/config.py (set_defaults): added "show_changed_paths" option to determine
whether or not to retrieve and display the new information
* lib/viewcvs.py (run_viewcvs): now passes show_changed_paths option to
newly created subversion repository objects
(view_log_svn): changed the way download/view/markup links are generated
and added code to generate links for new fields
* templates/log.ezt: template additions
* lib/vclib/svn/__init__.py (LogEntry.__init__): added extra arguments for new
fields
(ChangedPathEntry): new class to hold information about the changed paths
associated with a revision
(LogReceiver.__init__): added some new members to hold more state for the
callback function
(LogReceiver.receive): added some code to crawl through the "paths" hash
and save useful information
(get_logs): changed to work with new LogReciever constructor
(fetch_log): changed call to repos.svn_repos_get_logs() to pass true for the
"discover_changed_paths" argument. moved fs.file_length() call into
LogReceiver.__init__
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@675 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs.conf.dist: removed comment about CVSNT handling UTF-16 text
better than the RCS utilities. This is irrelevant since CVSNT
converts text to UTF-8 before storing it in the repository file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@674 8cb11bc2-c004-0410-86c3-e597b4017df7
get information from CVS repositories
* viewcvs.conf.dist
* lib/config.py (Config.set_defaults): new "cvsnt_exe_path" option
that can be set to the path of the cvsnt executable. If it is
set, cvsnt gets invoked instead of the rcs utilities
* lib/vclib/bincvs/__init__.py (rcs_popen): new wrapper for popen that decides
what program to execute based on the "rcs_paths" and "cvsnt_exe_path"
options.
(get_logs, fetch_logs): changed to use rcs_popen function instead of
popen.popen
* lib/viewcvs.py (process_checkout, view_diff, generate_tarball_cvs): changed
to use bincvs.rcs_popen instead of popen.popen
(view_directory_cvs, generate_tarball_cvs): updated call to bincvs.get_logs
(read_log): updated call to bincvs.fetch_log
* lib/rlog.py (GetRLogData): updated call to bincvs.fetch_log
general.cvsnt_exe_path
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@669 8cb11bc2-c004-0410-86c3-e597b4017df7
<rey4@columbia.edu> for bringing sanity to my morning with his fix of
the "isinstance()" usage.
* viewcvs/lib/config.py
(set_defaults): Add new default value for self.templates.error.
* viewcvs/viewcvs.conf.dist
(error): New configuration variable for specifying the error template.
* viewcvs/templates/error.ezt
New default error template.
* viewcvs/lib/debug.py
(ViewCVSException.__init__): Lose the 'description' member.
(PrintException): Now prints exception data passed in (doesn't do
the sys.exc_info() call itself any more).
(GetExceptionData): New generic exception data harvester for use
with templatized output.
* viewcvs/lib/viewcvs.py
(view_error): New error printer that tries to use the error template
before falling back to direct output.
* viewcvs/lib/query.py
Update calls to debug.PrintException() to get the exception data
from debug.GetExceptionData()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@664 8cb11bc2-c004-0410-86c3-e597b4017df7
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7