* lib/viewvc.py
(Request.get_url): Add new 'prefix' parameter, used to toggle
whether or not the generated URL has the protocol and server name
portions of the URL. Move code from build_commit() to handle the
prefix-inclusive case.
(build_commit): Move URL prefix-generating code to
Request.get_url(), and simply call that function with the new
'prefix' option set.
(view_query): Add new 'rss_link_href' data dictionary item.
* templates/rss.ezt
Add <channel><link> bit to the output stream, populated with the new
'rss_link_href' data dictionary item.
* docs/template-authoring-guide.html
Add documentation for the new 'rss_link_href' data dictionary item,
and note that query results also use rss.ezt.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1699 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_query): Use "application/rss+xml" instead "text/xml" for
the RSS feed output stream's content type. Suggested by
Phil Ringnalda <philringnalda@tigris.org>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1695 8cb11bc2-c004-0410-86c3-e597b4017df7
(standalone-only): New question and answer about why stuff sometimes
works under standalone.py but not under Apache with the same
configuration.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1694 8cb11bc2-c004-0410-86c3-e597b4017df7
(faq-section): New style name.
* viewvc.org/faq.html
Make h3's bear the new faq-section style.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1690 8cb11bc2-c004-0410-86c3-e597b4017df7
vclib.Repository interface, and adapt the Subversion vclib modules to
implement it.
* lib/vclib/__init__.py
(ADDED, DELETED, REPLACED, MODIFIED): New static variables.
(Repository.revinfo): New function.
(ChangedPath): New class.
(UnsupportedFeature): New exception type.
* lib/vclib/bincvs/__init__.py
(BinCVSRepository.revinfo): New (just raises vclib.UnsupportedFeature).
* lib/vclib/ccvs/__init__.py
(CCVSRepository.revinfo): New (just raises vclib.UnsupportedFeature).
* lib/vclib/svn/__init__.py
(SVNChangedPath): Was ChangedPath, now is a subclass of vclib.ChangedPath.
(SubversionRepository.revinfo): Was get_revision_info(). Rework to
use SVNChangedPath items.
* lib/vclib/svn_ra/__init__.py
(): Import SVNChangedPath instead of ChangedPath.
(LastHistoryCollector.add_history): Rework to use SVNChangedPath items.
(SubversionRepository.revinfo): Was get_revision_info().
* lib/viewvc.py
(view_revision): Rework this to use Repository.revinfo()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1685 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/svn_ra/__init__.py
(SubversionRepository.__init__): Trade a bunch of list.append() calls for
a static initializition of the list.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1682 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/config.py
Re-sync (and re-order) the options listed in the sample configuration file
and the Config object.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1681 8cb11bc2-c004-0410-86c3-e597b4017df7
(ViewVCAuthorizer.__init__): Don't assume that the 'forbidden' parameter
is present. Noticed by Vairoj Arunyaangkul <va@waveman.com>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1680 8cb11bc2-c004-0410-86c3-e597b4017df7
code from view_cvsgraph() into view_cvsgraph_image(), too, and
cross-reference them in the surrounding comments.
* lib/viewvc.py
(view_cvsgraph_image): Add commented-out LD_LIBRARY_PATH set, just
like what's in view_cvsgraph().
(view_cvsgraph): Update comment and example.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1678 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewvc.org/styles.css
Tweak (and add) styles.
* viewvc.org/who.html
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/download.html
* viewvc.org/contact.html
* viewvc.org/nightly/build-viewvc-snapshot
Add some more CSS-able <div>'s, and add links to the FAQ page.
* viewvc.org/faq.html
Flesh out a little more the layout of this document, and add our first
answer!
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1674 8cb11bc2-c004-0410-86c3-e597b4017df7
convention of ViewVC into a tizzy, so rework the way the auth handling
stuff works there. We'll get root-specific handling of 'forbidden'
out of this as a result.
* lib/query.py
(is_forbidden): New.
(build_commit): Lose the 'auth' parameter, and call is_forbidden to
determine if a given result may be displayed.
(run_query): No longer grab an Authorizer object. Update calls to
build_commit().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1673 8cb11bc2-c004-0410-86c3-e597b4017df7
prevent mangling inside file contents. Why? Because file contents
should be sancred, and besides, we can't control what our various
syntax highlighting programs will do with such addresses anyway.
* lib/viewvc.py
(htmlify): Lose 'cfg' parameter; add 'mangle_email_addrs'.
(format_log, view_markup, view_log, view_annotate, view_revision,
build_commit): Update call to htmlify, using the configured value
for mangle_email_addresses.
(copy_stream, view_diff, english_query, view_error): Update call to
htmlify, with email address mangling disabled.
(DiffSource._format_text): Was spaced_html_text(). Update call to
htmlify(), with email address mangling disabled.
* viewvc.conf.dist
(mangle_email_addresses): Note that this doesn't affect the display
of file contents.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1672 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewvc.conf.dist
(mangle_email_addresses): New option.
* lib/config.py
(Config.set_defaults): Set defaults for new 'mangle_email_addresses'
option.
* lib/viewvc.py
In various functions, use 'cfg = request.cfg' to enhance readability.
(htmlify): Add 'cfg' parameter. Callers updated. Honor the new cfg
option 'mangle_email_addresses', showing only "username@..." when
mangling.
(copy_stream, MarkupPipeWrapper.__init__, MarkupShell.__init__): Add
'cfg' parameter. All callers updated.
(MarkupEnscript.__init__, MarkupHighlight.__init__): Squirrel away
the 'cfg' parameter.
* docs/upgrading-howto.html
Note the new mangle_email_addresses option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1670 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(setup_authorizer): Rework this for tighter exception handling.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Don't reveal server paths in the
file-not-found exception.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1668 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(generate_tarball): Check every path -- not just top-level
subdirectories -- for authorization.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1667 8cb11bc2-c004-0410-86c3-e597b4017df7
check_file_access() functions into a single check_path_access(). Most
authorizers won't need to care about the distinction.
* lib/vcauth/__init__.py
(GenericViewVCAuthorizer.check_path_access): New, replaces ...
(GenericViewVCAuthorizer.check_file_access,
GenericViewVCAuthorizer.check_directory_access): ...these
now-removed functions.
(ViewVCAuthorizer.check_path_access): New.
(ViewVCAuthorizer.check_file_access,
ViewVCAuthorizer.check_directory_access): Removed.
* lib/vcauth/forbidden/__init__.py
(ViewVCAuthorizer.__init__): Squirrel away 'root' so we can use it ...
(ViewVCAuthorizer.check_path_access): ...here. Was
check_directory_access(), and now optionally checks the path's type
before making the access determination.
(ViewVCAuthorizer.check_file_access): Removed.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.check_path_access): Was _check_path_access(). Add
'rev' parameter.
(ViewVCAuthorizer.check_file_access,
ViewVCAuthorizer.check_directory_access): Removed.
* lib/viewvc.py
(Request.run_viewvc, view_directory, _get_diff_path_parts,
generate_tarball, view_revision, build_commit): Use the
authorizor's check_path_access() instead of the now-removed
check_directory_access() and check_file_access() functions.
* lib/query.py
(build_commit): Use check_path_access() instead of
check_directory_access().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1661 8cb11bc2-c004-0410-86c3-e597b4017df7
easily query the repository for information.
* lib/vcauth/__init__.py
(GenericViewVCAuthorizer.__init__): Lose 'rootpath', 'roottype', and
'rootname' for just 'root', so the authz modules can make queries
of the backing VC system as necessary.
* lib/vcauth/forbidden/__init__.py
(ViewVCAuthorizer.__init__): Lose 'rootpath', 'roottype', and
'rootname' for just 'root'.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Lose 'rootpath', 'roottype', and
'rootname' for just 'root'.
* lib/viewvc.py
(Request.run_viewvc): Update call to setup_authorizer().
(setup_authorizer): Lose 'rootpath', 'roottype', and 'rootname' for
just 'root'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1655 8cb11bc2-c004-0410-86c3-e597b4017df7
and type by forcing them to implement functions which query those
pieces of information.
* lib/vclib/__init__.py
(Repository.rootname, Repository.rootpath, Repository.roottype): New.
* lib/vclib/bincvs/__init__.py
(CVSRepository.rootname, CVSRepository.rootpath,
CVSRepository.roottype): New.
* lib/vclib/svn/__init__.py
(SubversionRepository.rootname, SubversionRepository.rootpath,
SubversionRepository.roottype): New.
* lib/vclib/svn_ra/__init__.py
(SubversionRepository.rootname, SubversionRepository.rootpath,
SubversionRepository.roottype): New.
* lib/viewvc.py
(Request.run_viewvc): Ask the Repository object for its roottype(),
and translate the vclib value into a string. (It would be nice to
use the vclib value throughout the codebase, but not today.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1654 8cb11bc2-c004-0410-86c3-e597b4017df7
(ViewVCAuthorizer.__init__): Look for the read ('r') code instead
of trying to match specific permission strings ('r', 'rw', ...).
Hopefully this gives us a little better resilience if Subversion grows
more authz codes. Suggested by Jan Grant <jan.grant@bristol.ac.uk>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1653 8cb11bc2-c004-0410-86c3-e597b4017df7
(ViewVCAuthorizer.__init__): Fix a logic bug in access rights
determination. Patch by Jan Grant <jan.grant@bristol.ac.uk>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1651 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer._process_group): Fix a usage of string.strip()
where string.split() was intended. Noticed by
Jan Grant <jan.grant@bristol.ac.uk>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1650 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_directory): Move the tarball_href calculation from here...
(common_template_data): ...to here (which I thought I'd already done...)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1633 8cb11bc2-c004-0410-86c3-e597b4017df7
(Cvs1Dot12ArgParse): Handle the imported sources case, too. Thanks to
Mark Keisler <mark@mitsein.net> for pointing this out in IRC today.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1627 8cb11bc2-c004-0410-86c3-e597b4017df7
subsystem go mainstream!
* notes/authz-dev-TODO
* lib/vcauth/*
New, copied from the authz-dev branch.
* viewvc.conf.dist
* lib/viewvc.py
* lib/query.py
* lib/debug.py
Merge changes from the authz-dev branch.
* lib/config.py
Merge changes from the authz-dev branch. Also, make 'forbidden' the
default value for 'authorizer'.
* docs/upgrading-howto.html
Add sections about handling forbidden modules.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1623 8cb11bc2-c004-0410-86c3-e597b4017df7
(make_html): Not that I think anybody actually cares, but fix this
function to generate HTML properly.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1617 8cb11bc2-c004-0410-86c3-e597b4017df7