* windows/README
add link for downloading subversion python bindings binaries
remove mention of cvsnt bugs. they've all been either fixed or
worked around, and the cvsnt bugzilla database is now deleted
fix a spelling
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@867 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/templates/log_table.ezt
Set the HTML class attribute to vc_header_sort for the header of the
sort column. Change the tags around the log message from
<i><pre>...</pre></i> to <pre><i>...</i></pre>. Since <pre> is a
block level element and <i> is an inline element, the old nesting
results in an extra block after the message in the table cell.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@866 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
diffs to their own text/plain output, templatize all diffs. By
default now, all diffs will go through diff.ezt (which has been
updated to handle it). Only if the new 'makepatch' boolean CGI flag
is set will diffs be sent directly as text/plain, non-templatized
output.
* viewcvs/lib/viewcvs.py
(_legal_params): Add new 'makepatch' boolean parameter.
(check_freshness): Fix a speeling eror.
(MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it.
(human_readable_diff): Lose the 'request', 'sym1', and 'sym2'
parameters. Now return the parsed dates and DiffSource object
instead of populating a data dictionary and completely generating
the page.
(spaced_html_text): Use an intermediate variable for readability.
(raw_diff): New.
(view_diff): Honor the new 'makepatch'. Update calls to
human_readable_diff(), and make use of raw_diff(). Do all page
generation for diffs here now. Adds a new 'raw_diff' data
dictionary item, useful for testing raw vs. colored, as well as
for positioning that raw diff output in the template.
* templates/diff.ezt
Use the new 'raw_diff' data dictionary item to position raw diff
output in the template. Update the diff form to allow for the
generation of traditional "patch-ish" raw diff output.
* templates/include/diff_form.ezt
Allow for the generation of traditional "patch-ish" raw diff output.
* website/styles.css
(vc_raw_diff): New style class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
Etags and browser caching. And use it.
* lib/debug.py
(DISABLE_ETAGS): New.
* lib/viewcvs.py
(check_freshness): If DISABLE_ETAGS is set, never report that the
page is fresh.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@863 8cb11bc2-c004-0410-86c3-e597b4017df7
sooo hard a problem to solve efficiently.
* viewcvs/lib/vclib/svn_ra/__init__.py
(_rev2optrev): Fix use of 'if foo' when I mean 'if foo is not None'.
(ChangedPath): New class.
(LastHistoryCollector.__init__): Remove uninteresting 'pass'.
(LastHistoryCollector.add_history): Add 'paths' and 'pool'
arguments, and now at least do some semblance of support for
dealing with those paths.
(LastHistoryCollector.get_history):
(_get_rev_details): Was _get_revision_info(). Now uses the
LastHistoryCollector.add_history callback directly. Callers changed.
(get_revision_info): New.
(SubversionRepository.get_dirents): Fix a dirent caching bug.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@861 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
<james@daa.com.au>.
* lib/viewcvs.py
(check_freshness): New.
(MarkupBuffer.close): New.
(MarkupPipeWrapper.close): New.
(MarkupPipeWrapper.__del__): Call own close() function now.
(MarkupEnscript.close): New.
(MarkupEnscript.__del__): Call own close() function now.
(view_markup, view_log, view_diff): Call new check_freshness() function.
(view_doc): Gut caching code and use check_freshness() instead.
* lib/sapi.py
(CgiServer): Fix handling of 304's in IIS.
* standalone.py
Now purge the environment of HTTP_* variables before setting our
own. Also, perhaps set the 'HTTP_IF_MODIFIED_SINCE' and
'HTTP_IF_NONE_MATCH' variables.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@857 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/vclib/svn/__init__.py
(_fetch_log): Now accept a 'pool' parameter.
(FileContentsPipe): Was StreamPipe().
(FileContentsPipe.__init__): Instead of taking a stream, accept the
root, path, and a pool. Use a subpool of the pool for the stream
creation.
(FileContentsPipe.__del__): New.
(SubversionRepository.__init__): Make a scratch subpool that
operations can safely use and clear.
(SubversionRepository._scratch_clear): New convenience function.
(SubversionRepository.itemtype, SubversionRepository.listdir): Use
and clear the scratch pool.
(SubversionRepository.filelog): Update call to _fetch_logs(). Use
and clear the scratch pool.
(SubversionRepository.openfile): Update call to FileContentsPipe().
Use and clear the scratch pool for the call to _get_last_history_rev().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@856 8cb11bc2-c004-0410-86c3-e597b4017df7
reduce roundtrips. Patch by James Henstridge <james@daa.com.au>.
* viewcvs/lib/viewcvs.py
(copy_stream): Use a slightly different mechanism for falling back
to sys.stdout (for standalone.py).
(view_doc): Send Last-modified headers for static content.
* viewcvs/standalone.py
Calculate the modification time of the Apache icons module.
(StandaloneServer.do_GET): Send that modification time.
(StandaloneServer.header): Send custom headers.
* viewcvs/lib/sapi.py
(CgiServer.addheader, AspServer.addheader, ModPythonServer.addheader): New.
(CgiServer.header): Fix the way statuses are returned.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@855 8cb11bc2-c004-0410-86c3-e597b4017df7
Use <optgroup> tags to group branches and tags. Patch by James
Henstridge <james@daa.com.au>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@848 8cb11bc2-c004-0410-86c3-e597b4017df7
(common_template_data): Expose request.pathtype as a generally
available template variable. (Have I mentioned today how much I
dislike per-template data dictionary items?)
* viewcvs/templates/log_table.ezt
* viewcvs/templates/log.ezt
Use the pathtype variable to determine whether or not to show
file-only stuff like diff and download options.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@847 8cb11bc2-c004-0410-86c3-e597b4017df7
Duh. Stop using filter_path and (failing at) translating between the
senses here.
* viewcvs/lib/vclib/svn_ra/__init__.py
(LogCollector.__init__): Drop the 'options', take explicit 'show_all_logs'.
(LogCollector.add_log): Update for new variables. Also, fix some
logic so this works when we aren't showing all logs, too.
(SubversionRepository.filelog): Parse the options here, and pass to
the LogCollector().
* viewcvs/lib/vclib/svn/__init__.py
(NodeHistory.__init__, NodeHistory.add_history, _get_history): Stop
using 'filter_path'; use 'show_all_logs' instead.
* viewcvs/lib/viewcvs.py
(view_log): Make showing all directory logs default to 0.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@846 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/vclib/svn/__init__.py
(NodeHistory.add_history): Use subpools in this loop.
* viewcvs/lib/vclib/svn_ra/__init__.py
(LogCollector.add_log): Fix an off-by-one error. The path for this
revision is self.path *before* we find the previous path.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@845 8cb11bc2-c004-0410-86c3-e597b4017df7
(NodeHistory.add_history): Fixes for support for directory log
filtering. Don't filter out copy revisions.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@844 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(Request.get_link): Allow where == '' as a way to indicate that you
want to see the root directory (since None means "use self.where").
(common_template_data): Generate the right URL for changing roots.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@843 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(MarkupPipeWrapper): Rewrite this class so that it actually works.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@842 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/website/index.html
Say that we require 1.5.2, not 1.5 (which eliminates the need to
point out the MySQL dependency).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@841 8cb11bc2-c004-0410-86c3-e597b4017df7
"don't show all dir logs") working the svn_ra layer. In fact, this
sucker is now more accurate as far as revision choices go than the
'svn' module.
* viewcvs/lib/vclib/svn_ra/__init__.py
(LogCollector.__init__): Deal with None paths, and ensure leading slashes.
(LogCollector.add_log): Uncomment and fix path filtering code.
(_fetch_log): Remove.
(SubversionRepository.filelog): Move contents of _fetch_log into
here, and then do something that in unheard of -- CALL
SVN_CLIENT_LOG WITH THE PARAMS IN THE RIGHT ORDER!
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@840 8cb11bc2-c004-0410-86c3-e597b4017df7
NOTE: This work is not yet finished for the 'svn_ra' vclib module.
* viewcvs/lib/vclib/svn/__init__.py
(NodeHistory.__init__): Add fs_ptr and filter_path arguments.
(NodeHistory.add_history): If filtering, only add the history item
if the path truly change in that revision.
(_get_history): Add 'options' argument, and use it to decide if we
need to filter out bubble-up-only directory logs, as well as
whether or not to cross copies.
(_fetch_log): Was fetch_log. Add 'options' argument, passed to
_get_history.
(SubversionRepository.filelog): Update call to _fetch_log.
* viewcvs/lib/vclib/svn_ra/__init__.py
(_compare_paths): New path comparison function (ported from
Subversion's C-composed svn_path_compare_paths)
(LogCollector): New class for doing what the old inline _log_cb
function did.
(_fetch_log): Was fetch_log. Add 'options' argument. Now use the
new LogCollector class.
(SubversionRepository.filelog): Update call to _fetch_log.
* viewcvs/lib/viewcvs.py
(Request.run_viewcvs): Don't set 'cross_copies' as an attribute of
the repository any more. We use the vclib interface options
params.
(view_log): Re-work this sucker to handle requests for directory
logs in Subversion. Also, pass the cross_copy option here.
(view_directory): Set the rev_href for Subversion directories to the
log view href.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@839 8cb11bc2-c004-0410-86c3-e597b4017df7
setup to test it at all. :-(
* viewcvs/lib/query.py
(main): Populate the 'docroot' data dictionary item.
* viewcvs/templates/query.ezt
Stop trying (and failing) to use the common header include ... I
don't have the energy to make this thing work with that right now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@838 8cb11bc2-c004-0410-86c3-e597b4017df7
Re-add the "previous" and "next" buttons on the revision view.
Patch (mostly) by Guy Maor <guy@extreme-da.com>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@837 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/templates/diff.ezt
Setup template defines before include header.ezt.
* viewcvs/lib/viewcvs.py
(view_revision_svn): Add 'rev' to the diff_href.
* viewcvs/templates/dir_alternate.ezt
Fix the filename links to go to the log view again (apparently I
accidentally clobbered these recently, though I must say, the
navigation seems entirely unintuitive to me this way...).
* viewcvs/templates/revision.ezt
Tweak the display of the log message a little big.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@836 8cb11bc2-c004-0410-86c3-e597b4017df7
by Dirk Lemstra <dirk.lemstra@atosorigin.com>. Also, add some stuff
to the generally-available-to-all-templates dataset. And finally,
re-work all the templates for consistent look and feel.
I can die now.
* viewcvs/lib/viewcvs.py
(common_template_data): Expose the 'where', 'roottype', and
'rootname' Request members, and the 'nav_path', to all views.
Also, do the root selection stuffs ('roots', 'change_root_action',
'change_root_hidden_values').
(nav_header_data): No longer explicitly add 'nav_path' to the data
dictionary.
(_dir_url): For Subversion, supply the revision number to the
generated links.
(view_directory): Include the revision when generating log view
URLs. Also, expose a 'tree_rev_href' data item for linking to the
revision view. No longer explicitly add 'roottype', 'where', and
'current_root' to the data dictionary. No longer do the root
selection stuff here, either.
(view_log): No longer explicitly add 'roottype', 'where', and
'current_root' to the data dictionary.
(human_readable_diff): No longer explicitly add 'where' to the data
dictionary.
(view_markup, view_revision): No longer explicitly add 'roottype' to
the data dictionary.
* viewcvs/website/upgrading.html
Document the changes.
* viewcvs/website/help_rootview.html
Add a missing "<br>".
* viewcvs/templates/annotate.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
Beat the heck outta these templates until they all reference
header.ezt and footer.ezt (except for error.ezt), and they all
present a basically consistent interface across all views.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@835 8cb11bc2-c004-0410-86c3-e597b4017df7
Fix all instances of "if(!rv) { Py_DECREF(rv); }" mishap. We should
decrement the reference count for the value only if it is *not*
NULL. Erik Huelsmann oopsed. I oopsed more for not reviewing the
patch before application. James Henstridge <james@daa.com.au> wins
for paying attention.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@834 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
construct. Patch by James Henstridge <james@daa.com.au>, tweaked to
conform with Greg Stein's review, and stripped of the template changes
that made use of the new functionality by C. Michael Pilato (that's me).
* viewcvs/lib/ezt.py
import cStringIO, and failing that, import StringIO.
(_block_cmd_specs): Add 'define' to the list of block specs.
(Template.generate): Init defines member.
(Template._parse): Don't prepare references for 'define' commands.
(Template._cmd_define): New.
(_get_value): Look for items in the defines dictionary before
falling back to the data dictionary.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@832 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(html_footer): Remove.
(view_annotate): Generate the footer data -- the only remaining
place where template usage is impure...
(retry_read): New.
(copy_stream): Rename 'fp' to 'src', and add an optional 'dst'
parameter. Move reading code into retry_read().
(markup_stream_default, markup_stream_enscript): Remove.
(markup_stream_python): Return a MarkupBuffer instance.
(markup_stream_python): Return a MarkupPHP instance.
(MarkupBuffer, MarkupPipeWrapper, MarkupEnscript, MarkupPHP): New
classes for implementing file-like markup objects.
(view_markup): Use new Markup classes.
(generate_tarball): Don't trap an unused status code.
* viewcvs/templates/markup.ezt
Reference the new [markup] dictionary object, and include the footer.ezt.
* viewcvs/templates/include/header.ezt
White background, please.
* viewcvs/website/upgrading.html
Note the new [markup] variable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@830 8cb11bc2-c004-0410-86c3-e597b4017df7
Erik Huelsmann <e.huelsmann@gmx.net>.
* viewcvs/lib/vclib/ccvs/rcsparse/common.py
(Sink.set_expansion): New member function. Called to pass
default expansion mode.
(Sink.set_locking): New member function. Function is called
to signal strict locking.
(Sink.set_locker): New member function. Set locker for a given revision.
(_Parser.parse_rcs_admin): parse 'access', 'expand', 'locks' and
'strict' token values passing the result(s) into the sink.
* viewcvs/lib/vclib/ccvs/rcsparse/default.py
(Parser.parse_rcs_admin): parse 'access', 'expand', 'locks' and
'strict' token values passing the result(s) into the sink.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@828 8cb11bc2-c004-0410-86c3-e597b4017df7
PyObject_CallMethod. Patch by Erik Huelsmann <wiskid@gmx.net>.
* viewcvs/tparse/tparsemodule.cpp
Catch return value from PyObject_CallMethod and DECREF when appropriate.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@827 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
revision, authors), cleanup some unnecessary data dictionary cruft,
and rework the default directory templates a bit.
* viewcvs/lib/viewcvs.py
(view_directory): Do the Right Thing for Subversion directory log
messages. Merge the 'cvs' and 'state' data fields for CVS.
Populate rev_href for Subversion directories.
* viewcvs/templates/directory.ezt
* viewcvs/templates/dir_alternate.ezt
Track data dictionary changes, and tweak the templates to always
show name, rev, author, date -- now only log is conditional on
show_logs (go figure). Also, core the common header and footer
parts of these files into...
* viewcvs/templates/dir_header.ezt
* viewcvs/templates/dir_footer.ezt
...these new include files.
* viewcvs/website/upgrading.html
Update with notations about these changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@823 8cb11bc2-c004-0410-86c3-e597b4017df7
for whipping me into action.
* viewcvs/lib/viewcvs.py
(_strip_suffix): If the "suffix" is the whole last path component,
remove that component altogether (rather than leaving an
empty-string component after the strip)
(generate_tarball): Include timestamps for directories now. For
CVS, directory timestamps will be the youngest of the dates for
files in that directory. For Subversion, same routine except that
files and subdirs datestamps count.
(download_tarball): Don't include in a tarball all the empty
directories between the root of the repository at the directory
being tarballed. Just stick the tarballed directory into the top
of the tarball, either by its own name (if we know it) or by the
configured name of that repository root (if the top-most directory
is the to-be-tarballed directory).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@822 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/tparse/tparse.h
* viewcvs/tparse/tparsemodule.cpp
* viewcvs/tparse/tparsemodule.h
Massive tparse reindenting, reformatting, and spacing /
capitalization fixes in messages. Patch by Max Bowsher
<maxb@ukf.net> (tweaked a little by cmpilato to ensure lines < 80
characters).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@820 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewcvs): Look in the Attic/ for files in CVS URLs, and
redirect on a 'hit'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@819 8cb11bc2-c004-0410-86c3-e597b4017df7
* tparse/tparse.cpp
(TokenParser::get): Write one less byte in case of
@-sign-is-last-byte-in-buffer: the byte will be transferred to the
start of the newly filled buffer.
(tparseParser::parse_rcs_tree): Use correct pointer when
constructing linked list.
* tparse/tparsemodule.cpp
(PythonSink::define_revision): Don't leak PyString objects.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@818 8cb11bc2-c004-0410-86c3-e597b4017df7