Also return some lost files back, document 4intra.net modifications
in CHANGES and README files, remove 'union' authorizer and rewritehtml
as the similar functionality is already provided by the core.
Also fix diffs for non-bash (sh/ash/dash) shells.
processed by markup and annotate views"). This introduces a new
'max_filesize_kbytes' configuration option for limiting markup and
annotate operations on really big files (whose contents unfortunately
must be read fully into memory sometimes). By default, a 512-kilobyte
limit will be in place.
* lib/vclib/__init__.py
(Repository.filesize): New.
* lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.filesize): New function.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.filesize): New function.
* lib/vclib/ccvs/bincvs.py
(BaseCVSRepository.filesize): New function (returns -1 aka "not
implemented")
* conf/viewvc.conf.dist
(max_filesize_kbytes): New configuration option.
* lib/config.py
(Config.set_defaults): Set default value for new
'max_filesize_kbytes' configuration option.
* lib/viewvc.py
(assert_viewable_filesize): New helper function.
(markup_or_annotate): Use assert_viewable_filesize() and the new
repos.filesize() API to honor the new 'max_filesize_kbytes'
configuration option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2866 8cb11bc2-c004-0410-86c3-e597b4017df7
diff stuff now if I recall correctly.
* conf/viewvc.conf.dist,
* lib/config.py
Use "templates/default" now for the default templates. Duh.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2815 8cb11bc2-c004-0410-86c3-e597b4017df7
Add a new configuration option 'binary_mime_types' which accepts a
comma-delimited list of MIME content type patterns ('text/plain', or
'image/*', etc.) against which versioned file MIME types are
compared for the purposes of deciding whether to allow their display
in the 'markup', 'annotate', 'diff' and 'patch' views.
* conf/viewvc.conf.dist
(binary_mime_types): Describe new option.
* lib/config.py
(_force_multi_value): Add 'binary_file_types' to the list of
multi-value options.
(Config.set_defaults): Initialize cfg.options.binary_mime_types.
* lib/viewvc.py
(is_binary_file_mime_type): New function.
(get_file_view_info): Use is_binary_file_mime_type() to determine
whether to return links to content-ful views of the input file.
(markup_or_annotate, view_diff): Use is_binary_file_mime_type() to
deny display of so-deemed binary files.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2784 8cb11bc2-c004-0410-86c3-e597b4017df7
viewer").
NOTE: There are some limitations here, most prominantly that commas
can't be used in the regular expressions which define replacements,
and that only match groupings 0-9 can be used in the replacement
format string.
* conf/viewvc.conf.dist
(custom_log_formatting): New configuration option.
* lib/config.py
(Config._force_multi_value, Config.set_defaults): Add handling of
new 'custom_log_formatting' option.
* lib/viewvc.py
(ViewVCHtmlFormatter.format_custom_url): New formatter callback.
(LogFormatter.get): Register the new formatter callback for rules
found in the 'custom_log_formatting' option value.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2746 8cb11bc2-c004-0410-86c3-e597b4017df7
* conf/viewvc.conf.dist
Use the "classic" templates until the "default" ones can be updated
to reflect recent improvements (such as the property-diff stuff).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2649 8cb11bc2-c004-0410-86c3-e597b4017df7
new default for ViewVC 1.2. We'll keep the old templates around as a
"classic" option.
* lib/config.py,
* conf/viewvc.conf.dist
(Config.set_defaults): Set cfg.options.template_dir to
"templates/default", and make the matching edit in the pristine
configuration file.
* templates/:
Now just a container for...
* templates/classic/,
* templates/classic/*:
...the old default templates (which were 'templates' and 'templates/*'.
* templates/default/,
templates/default/*:
...and the new default, copied from the 'templates-contrib/1.1' area.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2647 8cb11bc2-c004-0410-86c3-e597b4017df7
roots view").
* lib/viewvc.py
(view_roots): Include revision metadata in the data dictionary.
(list_roots): If configured to do so, calculate some last-modified
metadata for Subversion roots.
* lib/config.py
(Config.set_defaults): Set default value for new show_roots_lastmod
option.
* conf/viewvc.conf.dist
(show_roots_lastmod): New option.
* templates/roots.ezt
Show some roots metadata if configured to do so.
* docs/template-authoring-guide.html
Document new 'roots' view data dictionary items.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2517 8cb11bc2-c004-0410-86c3-e597b4017df7
Subversion client, as ViewVC no longer uses that information.
* lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.__init__): Don't look for svn client path
in the 'utilities' dictionary. We don't use it anyway.
* lib/config.py
(Config.set_defaults): Don't populate utilities.svn any more.
* conf/viewvc.conf.dist
(utilities/svn): Remove as unused.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2493 8cb11bc2-c004-0410-86c3-e597b4017df7
still generating the same defaults as before.
* conf/viewvc.conf.dist
(query, query.viewvc_base_url): New section and value.
* lib/config.py
(_base_sections): Add 'query'.
(Config.set_defaults): Set default value for cfg.query.viewvc_base_url.
* bin/asp/query.asp,
* bin/cgi/query.cgi,
* bin/mod_python/query.py,
* bin/wsgi/query.fcgi,
* bin/wsgi/query.wsgi,
Ask the configuration for the location of ViewVC before falling back
to old defaults.
* templates/query.ezt
Don't reference unset variables. Do test the log message for
empty-ness, dropping a non-breaking space in place where it is.
* templates/include/footer.ezt
Don't reference unset variables.
* lib/query.py
(build_commit): Allow ob.log to be empty. Don't generate ViewVC
links if we don't have a base URL for ViewVC.
(main): Calculate docroot in light of possible absent viewvc_link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2458 8cb11bc2-c004-0410-86c3-e597b4017df7
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.
* lib/compat.py
Remove as unused.
* bin/cvsdbadmin,
* bin/loginfo-handler,
* bin/make-database,
* bin/svndbadmin,
* lib/accept.py,
* lib/blame.py,
* lib/cvsdb.py,
* lib/popen.py,
* lib/query.py,
* lib/sapi.py,
* lib/vcauth/forbidden/__init__.py
* lib/vcauth/forbiddenre/__init__.py,
* lib/vcauth/svnauthz/__init__.py,
* lib/vclib/__init__.py,
* lib/vclib/ccvs/blame.py,
* lib/win32popen.py,
* tests/timelog.py
Replace explicit import and use of the 'string' module with newer constructs.
* bin/standalone.py,
* lib/viewvc.py
No longer use 'compat' module. Replace explicit import and use of
the 'string' module with newer constructs.
* lib/dbi.py
Use calender.timegm() instead of compat.timegm().
* lib/vcauth/__init__.py
Lose unused module imports.
* lib/config.py,
Replace explicit import and use of the 'string' module with newer
constructs where possible. Lose old ConfigParser patch-up code for
Python 1.5.1.
* lib/vclib/ccvs/ccvs.py
Replace explicit import and use of the 'string' module with newer
constructs where possible. Import _path_join() from bincvs, and use
it instead of a bunch of copy-and-pasted string join() statements
throughout.
* lib/vclib/ccvs/__init__.py
(cvs_strptime): Moved here from the 'compat' module.
* lib/vclib/ccvs/bincvs.py
(): No longer use 'compat' module. Replace explicit import and use
of the 'string' module with newer constructs.
(_path_join): New, used now instead of a bunch of copy-and-pasted
string join() statements throughout.
* viewvc-install
Don't use the 'compat' module any more.
Also, so some rearranging of non-critical bits.
* misc/: New directory.
* misc/py2html.py: Moved from 'lib/py2html.py'.
* misc/PyFontify.py: Moved from 'lib/PyFontify.py'.
* misc/elemx/: Moved from 'elemx/'.
* misc/tparse/: Moved from 'tparse/'.
* tools/make-release
Omit 'misc' directory from releases, too.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
only exception being the freeform [vhost] section values and key-value
file stuffs. In those places, user-defined case could be helpful, and
is certainly not documented as broken. So allow it, per issue #466.
* lib/config.py
(Config.load_config, Config.load_kv_files): Override
ConfigParser.optionxform() to avoid case normalization of option names.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2428 8cb11bc2-c004-0410-86c3-e597b4017df7
without a configuration file.
* lib/config.py
(Config.get_authorizer_and_params_hack): Make sure to always return
a 2-tuple. Callers will be expecting that, ya know?
Reported by: Daniel Shahaf <d.s{__AT__}daniel.shahaf.name>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2403 8cb11bc2-c004-0410-86c3-e597b4017df7
of ViewVC users -- for issue #445 (standalone.py throws exception on
root listing after visiting a root).
* conf/viewvc.conf.dist
Add warning about using per-root options with standalone.py.
* lib/config.py
(Config.overlay_root_options): Move the assertion/recording related
to the one-time-only overlay stuffs down to the point where
problems might occur. This gives standalone.py users who don't
use per-root configuration options the requisite mercy to let
their servers continue to function.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2316 8cb11bc2-c004-0410-86c3-e597b4017df7
Make per-root authorizer-related configuration work so that admins can
feel comfortable exposing their root listing views again.
Also, make the query interface require that queried roots be
configured (explicitly or implicitly) to use either the 'forbidden'
authorizer or none at all. This is a security fix, since
administrators might reasonably have thought that if they configured a
root to use another authorizer, the query interface would have honored
that configuration.
* lib/config.py
(Config.__init__): Now track whether root options have been overlayed.
(Config.overlay_root_options): Assert that no root options have been
overlayed (and then noted that they now have).
(Config.get_authorizer_and_params_hack): New function to workaround
our inability to un-overlay root-specific options. It's only the
query interface and root listing views that really need to act on
multiple roots at once, and really only the authorization options
that matter there anyway.
(Config.get_authorizer_params): Remove per-root overlay hacks from
this function.
* lib/viewvc.py
(Request.run_viewvc): Update call to setup_authorizer() (to not
specify the rootname).
(setup_authorizer): Make the rootname parameter option, as a flag
for whether to consult the current configuration or instead use
the hack which manually digs around for per-root overrides of
authorizer stuffs.
* lib/query.py
(is_forbidden): Don't try to apply the 'forbidden' authorizer where
some other (or no) authorizer has been configured for a given
root. But do complain if another authorizer has been configured,
rather than simply letting stuff leak through that an
administrator might reasonably expect to have been hidden.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2300 8cb11bc2-c004-0410-86c3-e597b4017df7
clear understanding of per-vhost and per-root configuration overrides.
This should resolve issue #411 (Can't override authz-* sections in
virtual host).
* conf/viewvc.conf.dist
Add comments about the scope and permissability of per-vhost and
per-root overrides.
* lib/config.py
(): Add some comments about option layering -- including a fancy
schmancy ASCII art diagram! -- and make some minor comment
formatting tweaks.
(Config._base_sections): Was Config._sections. Add 'authz-*'.
(Config._force_multi_value): Reformat and comment.
(Config._allowed_overrides): New mapping of valid overrides.
(Config.__init__): Track renamed _base_sections member, and avoid
instantiating _sub_config items for non-explicitly-name base
sections found therein.
(Config.load_config): Add docstring. Use _is_allowed_section() to
determine which sections to process.
(Config.load_kv_files): Add docstring.
(Config.path): Minor docstring tweak.
(Config._process_section): Instantiate missing _sub_config() items.
Add a FIXME comment.
(Config._is_allowed_section, Config._is_allowed_override): New
functions.
(Config._process_vhost): Now use _is_allowed_override() for section
filtering.
(Config._process_root_options): Removed, merged with tweaks into...
(Config.overlay_root_options): ...here, which now uses
_is_allowed_override for section filtering.
(Config.get_authorizer_params): Look in the calculated configuration
rather than specific configuration file regions. Add a FIXME
comment.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2292 8cb11bc2-c004-0410-86c3-e597b4017df7
(Config.load_config): Remove 'rootname' parameter that's unused by
callers, and the code that employs it within this function.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2291 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/config.py
(Config.set_defaults): Make 'options.cross_copies' default to 1. At
a minimum that makes it jive with the commented out default value
shown in viewvc.conf.dist, but I believe that it's also the better
of the two ways to resolve that disparity in terms of user experience.
Noticed by: Tom Throckmorton <throck{_AT_}gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2279 8cb11bc2-c004-0410-86c3-e597b4017df7
* conf/viewvc.conf.dist
(options.tabsize): New.
* lib/config.py
(Config.set_defaults): Set default value for the 'tabsize' option.
* lib/viewvc.py
(markup_stream_pygments): Pass the 'tabsize' parameter to Pygments' lexers.
When not using pygments, use 'string.expandtabs' to do tab-to-space
conversion (possibly with a new object that wraps BlameSource objects
solely for that purpose).
(DiffSource._format_text): Honor the tabsize configuration options when
expanding tabs to spaces.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2249 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
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
Trade the 'mime_types_file' option for 'mime_types_files' -- an
ordered list of MIME mapping files to consult. And provide our own
(empty) mapping file that folks can use to override the mappings
provided by other such files.
* mimetypes.conf.dist
New file.
* viewvc.conf.dist
(mime_types_files): Was mime_types_file, and now accepts multiple values.
* lib/config.py
(Config._force_multi_value): Add "mime_types_files" to the list of
multi-value configuration options.
(Config.set_defaults): Track rename of mime_types_file parameter,
now setting the default to a list containing only "mimetypes.conf".
* lib/viewvc.py
(load_config): Track new name and format of mime_types_files option.
* viewvc-install
(FILE_INFO_LIST): Also install mimetypes.conf.dist as itself and as
mimetypes.conf.
* INSTALL
(INSTALLING VIEWVC): Update reference to renamed configuration option.
* docs/upgrading-howto.html
Update this document.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2101 8cb11bc2-c004-0410-86c3-e597b4017df7
coloration to perform character encoding detection (and subsequent
translation to UTF-8).
(Thanks to Jeremy Whitlock <jcscoobyrs@gmail.com> for pointing me in
this direction, if inadvertantly.)
* viewvc.conf.dist
(options.detect_encoding): New.
* lib/config.py
(Config.set_defaults): Initialize the 'detect_encoding' parameter.
* lib/viewvc.py
(markup_stream_pygments): If the configuration asks for character
encoding detection, try to import the 'chardet' module and -- if all
goes well -- tell Pygments to use it.
* CHANGES
Note this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2095 8cb11bc2-c004-0410-86c3-e597b4017df7
configuration bit.
* lib/viewvc.py
(view_diff, view_patch): Only show diffs if 'diff' is one of the
allowed views.
* lib/config.py
(Config.set_defaults): Add 'diff' to the set of allowed_views (and
sort the values alphabetically where here).
* viewvc.conf.dist
(allowed_views): Add 'diff' to the set of views you can specify, and
include it in the default values. While here, sort the values
alphabetically.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2058 8cb11bc2-c004-0410-86c3-e597b4017df7