this is the suffix many unix editors use for backups (and there aren't
any files with that suffix in viewcvs).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@900 8cb11bc2-c004-0410-86c3-e597b4017df7
change that moved generation of human readable diff URLs from the
templates to the Python code.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@899 8cb11bc2-c004-0410-86c3-e597b4017df7
The bincvs module doesn't take kindly to paths with alternate directory
seperators or trailing slashes.
* lib/config.py
(_parse_roots):
call os.path.normpath for cvs_roots and svn_roots paths
* lib/viewcvs.py
(handle_config):
call os.path.normpath for root_parents paths
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@898 8cb11bc2-c004-0410-86c3-e597b4017df7
the log pages.
* templates/include/diff_form.ezt: if no tags exist for the file, don't
show the drop down tag selection box. This gets rid of some unneeded
UI when browsing Subversion repositories.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@897 8cb11bc2-c004-0410-86c3-e597b4017df7
view. For Subversion repositories, these URLs are usually shorter
(only include p1/p2 when paths differ) and handle a few corner
cases w.r.t. moves that the old code didn't.
* log.ezt, log_table.ezt: use the diff URLs passed in from viewcvs.py
rather than constructing them in the template.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@896 8cb11bc2-c004-0410-86c3-e597b4017df7
loading. Wrap the column headers in a <thead> tag, and the rest of
the elements in a <tbody> tag.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@894 8cb11bc2-c004-0410-86c3-e597b4017df7
get mixed up with the directory view sort (similar to how the log view
uses logsort as a parameter name).
Don't display the branch column in results for a subversion repo query.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@889 8cb11bc2-c004-0410-86c3-e597b4017df7
repositories (sets rev to the same value as r2).
Update run_viewcvs() so that if no view is selected, handle requests
that specify r1,r2,rev as diffs rather than checkouts, and requests
that specify r1,rev as logs.
Update log.ezt and log_table.ezt to set the rev parameter in the diff
links when browsing subversion repositories.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@888 8cb11bc2-c004-0410-86c3-e597b4017df7
reverses the sort order, while clicking on other headers sorts by
that column in ascending order. This matches how most GUIs handle
sorting in columned lists.
Also port the sort handling from dir_alternate.ezt to directory.ezt
to reduce differences between the two templates.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@886 8cb11bc2-c004-0410-86c3-e597b4017df7
pathname and revision links for directories).
Previously dir_alternate.ezt was broken for CVS repositories, resulting
in a traceback since it was trying to show the log href which doesn't
exist.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@885 8cb11bc2-c004-0410-86c3-e597b4017df7
ends the comment. Mentioned in a Debian bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245550
Add a <meta name="generator"> tag to the top listing the version of
viewcvs used to generate the page. This is less likely to be removed
from custom templates, and should be helpful when tracking bugs.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@884 8cb11bc2-c004-0410-86c3-e597b4017df7
was more common for rendering log messages.
Before, non-italic was used in the markup, log and query templates,
while italic was used in log_template and query_results (which I copied
off of log_template).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@883 8cb11bc2-c004-0410-86c3-e597b4017df7
Add CSS for vc_log to set it italic (as it was already shown in most places),
and set some proprietary properties to turn on word wrapping for Mozilla,
Opera and IE, and the equivalent standard CSS3 property (for when browsers
support it).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@882 8cb11bc2-c004-0410-86c3-e597b4017df7
Loosen some of the parameter validation to _validate_regex for
branch, file and who query parameters.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@880 8cb11bc2-c004-0410-86c3-e597b4017df7
implemented using fnmatch to translate it into a regular expression.
Refactor CreateSQLQueryString a little bit to split out join conditions.
Previously if you wanted to query files names A or B, it would generate
SQL like this:
((checkins.fileid=files.id AND files.file='A') OR
(checkins.fileid.files.id AND files.file='B'))
Now it generates the shorter (and hopefully easier to optimise):
(checkins.fileid=files.id) AND (files.file='A' OR files.file='B')
I'd change it to do INNER JOIN's, but apparently MySQL 3.22 doesn't
support them fully.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@879 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
information into the query database.
2) Update query.cgi to set [docroot] correctly. This allows it to find
the stylesheet, and corrects the help link in the footer.
3) Results could point at subversion repositories, so check if the
repository is in svn_roots too.
4) Only display repository names rather than paths in the results.
This matches what viewcvs.cgi shows the user.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@875 8cb11bc2-c004-0410-86c3-e597b4017df7
(list_roots): Make the roots hash values into tuples, adding the roottype.
(common_template_data): Make the 'roots' list items into hashes that
carry the root names and types.
* viewcvs/templates/include/header.ezt
Split the list of repositories up into CVS ones and Subversion ones
using optgroups. Note the super-cool single pass over the roots,
appending options to variables created on-the-fly. Have I mentioned
how much I love James Henstridge today?
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@871 8cb11bc2-c004-0410-86c3-e597b4017df7
information to the Bonsai checkin database.
- Get viewcvs-install to install the new script.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@868 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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