markup/annotate views.
* templates/file.ezt
Add some customizable template logic to hide the contents of file's with
non-human-readable file formats. Were Greg Stein dead, he'd be rolling
over in his grave right now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2228 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_error): Settle for simple HTML-escaping of error messages
rather than full htmlification.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2225 8cb11bc2-c004-0410-86c3-e597b4017df7
files.
* lib/viewvc.py
(markup_stream_pygments): Pass stripnl=False to Pygments lexers so
they won't strip out leading blank lines from the files they are
colorizing.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2223 8cb11bc2-c004-0410-86c3-e597b4017df7
like this:
http://localhost/viewvc/subversion/?view=foo%22)%20was%20passed\
%20as%20a%20parameter.20%20Visit%20http://www.baddy.com%20to%20\
figure%20out%20why%20(%22foo
Would result in an error page that read as follows:
An illegal value ("foo") was passed as a parameter. Visit
http://www.baddy.com to figure out why ("foo") was passed as a
parameter.
(where "http://www.baddy.com" was linkified, and could potentially
point to a malicious website.)
With this change, we will avoid printing unknown parameter names, and
will show the parameter name rather its value when a bogus value is
detected. Yes, there's admittedly some information loss here that
might be useful to the well-meaning but fat-fingered user, but the
security aspect is more important.
* lib/viewvc.py
(_validate_param): Don't print illegal parameter names, and show the
(legal) parameter name rather than its value when that value is
illegal.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2217 8cb11bc2-c004-0410-86c3-e597b4017df7
tightening up some other bits.
* lib/viewvc.py
(_validate_view, _validate_mimetype): New validation functions.
(_re_validate_mimetype): Removed as unused.
(_legal_params): Tweak the validation routines for 'view' and
'content-type' to point to _validate_view() and _validate_mimetype(),
respectively.
(_validate_param): Now check for non-zero result from validation
functions as the "valid" indicator, rather than requiring each of
them to raise an exception in troubled times.
(Request.run_viewvc): Lose now-unnecessary validation of
'content-type' parameter -- the normal parameter validation stuff
should catch problems there.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2213 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewvc): Move the logic that maps view=rev to
view=revision into the parameter validation loop.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2212 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewvc): Use an intermediate variable to simplify some
logic around input parameter validation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2211 8cb11bc2-c004-0410-86c3-e597b4017df7
Comment out all the options here, forcing folks to uncomment the
stuff they want to modify. This allows the parsing of this file to
be optimized toward doing less work, while maintaining a consistent
initial presentation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2207 8cb11bc2-c004-0410-86c3-e597b4017df7
(This doesn't really fix anything, and hopefully doesn't break anything
either, but is merely a "good programming practice" cleanup item.)
* lib/viewvc.py
(Request.run_viewvc): Ensure that server.redirect() is the last
thing this function does (when it does it).
* lib/sapi.py
(CgiServer.redirect): Avoid calling sys.exit(). Also, fix a use of
print() that should be sys.stdout.write() (for consistency).
(AspServer.redirect, ModPythonServer.redirect): Avoid calling sys.exit().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2205 8cb11bc2-c004-0410-86c3-e597b4017df7
* conf/viewvc.conf.dist
(allowed_cvsgraph_useropts): New option.
* lib/config.py
(Config.set_defaults): Set default value for new
'allowed_cvsgraph_useropts' option.
* lib/viewvc.py
(_legal_params): Add new legal parameters: 'gflip', 'gbbox',
'gshow', 'gleft', and 'gmaxtag'.
(cvsgraph_make_reqopt, cvsgraph_normalize_gshow, cvsgraph_extraopts):
New helper functions.
(view_cvsgraph_image): Now pass the -O option set to the cvsgraph
binary.
(view_cvsgraph): Now pass the -O option set to the cvsgraph binary.
Also, add new template data stuff for generating a user-configurable
graph display options form.
* templates/graph.ezt,
* templates/docroot/styles.css
Add template stuff for generating a user-configurable graph display
options form.
* docs/url-reference.html,
* docs/template-authoring-guide.html
Update documentation.
* CHANGES
Note this change.
Patch by: Bertho Stultiens <bertho{_AT_}j.auh.dk> (originally),
Jene Jasper <tigris{_AT_}shadowland.demon.nl> (port to 1.1.x),
me (tweaks for official ViewVC inclusion)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2204 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(_re_validate_boolint): New.
(_legal_params): Switch the validation function to _re_validate_boolint
for the following: 'hideattic', 'makeimage', 'parent', 'tarball',
and 'hidecvsroot'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2199 8cb11bc2-c004-0410-86c3-e597b4017df7
complain about unknown repositories.
* bin/svndbadmin
(main): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
* bin/cvsdbadmin
(__main__): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2195 8cb11bc2-c004-0410-86c3-e597b4017df7
case-handling semantics.
* conf/viewvc.conf.dist
(force_username_case): New option.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Find and handle new force_username_case
authorizer option.
(ViewVCAuthorizer._get_paths_for_root): Replace ConfigParser.optionxform()
(which does normalization of option names) with an identity function
of sorts.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2192 8cb11bc2-c004-0410-86c3-e597b4017df7
Use "Contents of /path/to/file" instead of "Annotate of /path/to/file" as
the page title.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2181 8cb11bc2-c004-0410-86c3-e597b4017df7
commit/repository info.
* lib/cvsdb.py
(CheckinDatabase.PurgeRepository): Clear all the ID caches after
running a purge operation so that, if the purge is actually part
of a rebuild, the subsequent update doesn't merely pull IDs from
the cache (with the side-effect of not readding them to the database).
Reported by: Naran Babhu <naranbabhu{_AT_}tigris.org
Martin Dessureault <martin{_AT_}austin.rr.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2178 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_queryform): Add 'query_action' and 'query_hidden_values' back
to the data dictionary, as they were accidentally dropped in r2123.
Reported by: Naran Babhu <naranbabhu{_AT_}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2175 8cb11bc2-c004-0410-86c3-e597b4017df7
into two: 'log_pagesize' and 'dir_pagesize', individually controlling
the size of pages used (if at all) for the revision log and directory
views, respectively.
* conf/viewvc.conf.dist
(use_pagesize): Removed, in favor of...
(dir_pagesize, log_pagesize): ...these.
* lib/viewvc.py,
* lib/config.py,
* bin/standalone.py
Replace the use and tooling around 'use_pagesize' with
'dir_pagesize' and 'log_pagesize' as appropriate.
* templates/include/paging.ezt,
* templates/include/dir_header.ezt
Stop using the option value to determine whether or not to show
pagination UI. Use the presence of some pages instead.
* docs/upgrading-howto.html
Note the changes in options.
Patch by: Lei Zhang <thestig{_AT_}google.com>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2142 8cb11bc2-c004-0410-86c3-e597b4017df7
correctly, and we don't need a toggle for 'enscript' any more.
* bin/standalone.py
(GUI.__init__): Pass the configuration file to handle_config().
Lose 'enscript'-related stuff.
(GUI.toggle_use_enscript): Remove.
(cli): Fix call to gui(), dropping bogus parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2140 8cb11bc2-c004-0410-86c3-e597b4017df7
remote Subversion directory view.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.dirlogs): Store the entry's revision as
a string, for consistency with other vclib modules.
Reported by: Wojciech Wróblewski <wojtek{_AT_}elmi.pl>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2137 8cb11bc2-c004-0410-86c3-e597b4017df7
Make this able to build any branch, not just trunk and tag names.
* notes/releases.txt
Update example of using make-release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2128 8cb11bc2-c004-0410-86c3-e597b4017df7