Commit Graph

1591 Commits (47ad6e149c4f24709b8f3349dee534e64b7a0c7e)

Author SHA1 Message Date
cmpilato ed5898c37d Finish issue #307: RSS feeds should include a <channel><link> element.
* 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
2007-07-26 18:55:15 +00:00
cmpilato c487361c95 Note some completed enhancements.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1698 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-20 14:31:31 +00:00
cmpilato b037efb91e Add a FAQ item about path-based authz.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1697 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-13 19:18:22 +00:00
cmpilato 29057c811f Finish issue #306 - RSS content type should be more specific.
* 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
2007-07-09 18:18:01 +00:00
cmpilato 8ca49db267 * viewvc.org/faq.html
(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
2007-07-05 16:59:51 +00:00
cmpilato d4e115bd3a * viewvc.org/faq.html
Answer the "no module named svn" question.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1693 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-05 16:22:16 +00:00
cmpilato d09280ce6b * viewvc.org/faq.html
Reformat "questions" as (of all things) questions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1692 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-05 16:19:55 +00:00
cmpilato 98aeeab676 * viewvc.org/faq.html
Populate the answer to the "missing temporary directory" question.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1691 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-07-05 16:09:23 +00:00
cmpilato 061b30a108 * viewvc.org/styles.css
(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
2007-07-05 16:04:13 +00:00
cmpilato 01baf48a1b Update the vhosts config example to not use 'cvs' and 'svn' in vhost names.
This was too easily confused with root type declarations.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1688 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-28 15:54:49 +00:00
cmpilato 46e7cdf817 * templates/rss.ezt
For issue #238, properly XML-entity-encode the log message embedded
  in RSS feed items.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1686 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-27 17:41:57 +00:00
cmpilato 703327df1c Implement a more-or-less generic global revision info function in the
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
2007-06-27 16:41:03 +00:00
cmpilato da80a5898a Minor code cleanups (doing in vclib.svn_ra what I recently did in vclib.svn).
* lib/vclib/svn_ra/__init__.py
  (get_logs): Merge this (and delete it) ...
  (SubversionRepository.dirlogs): ... into here.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1684 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-27 15:04:39 +00:00
cmpilato 2601c02f5d Minor code cleanups.
* lib/vclib/svn/__init__.py
  (get_logs): Merge this (and delete it) ...
  (SubversionRepository.dirlogs): ... into here.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1683 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-27 14:58:30 +00:00
cmpilato ad877bd5a5 Minor code simplification.
* 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
2007-06-27 14:24:56 +00:00
cmpilato 2fe022c3a4 * viewvc.conf.dist,
* 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
2007-06-20 13:25:18 +00:00
cmpilato f40a836c23 * lib/vcauth/forbidden/__init__.py
(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
2007-06-20 13:23:52 +00:00
cmpilato c791123a08 Add FAQ item for 'COMalformedOutput: ...' as suggested by Heather
Gordon <hgordon@shutterfly.com>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1679 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-15 18:27:17 +00:00
cmpilato be4ee9d817 For issue #303, duplicate the commented-out LD_LIBRARY_PATH setting
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
2007-06-15 14:08:18 +00:00
cmpilato 889b3cdb0e Fix some webstuffs spelling oopses.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1677 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-15 13:19:20 +00:00
cmpilato e1f3b9f4f7 Tweak the tigris.org left-nav a bit.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1676 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-15 13:17:13 +00:00
cmpilato 5c26dab649 Flesh out the 'rlog output ended early' answer.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1675 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-15 12:57:05 +00:00
cmpilato c089f3bd73 Website tweaks to support the FAQ page.
* 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
2007-06-14 12:29:31 +00:00
cmpilato 01b87f562e The disconnected query interface throws all the root-centric handling
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
2007-06-06 20:32:17 +00:00
cmpilato d421c3bc22 For issue #290 - Re-work the way email address mangling is managed to
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
2007-06-04 16:50:06 +00:00
cmpilato 53e1cd8f30 Add email address mangling feature to CHANGES.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1671 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-01 20:05:39 +00:00
cmpilato 6c80a17d45 Finish issue #290 - Introduce an option for mangling email addresses.
* 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
2007-06-01 20:03:56 +00:00
cmpilato b5b1272ebb Add some notes on improving the vclib API.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1669 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-01 18:12:12 +00:00
cmpilato 8b0b3632ac Improve the vcauth stuffs error handling logic a bit.
* 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
2007-05-25 13:32:55 +00:00
cmpilato 3abdb58fc1 Fix the vcauth interactions of the tarball generation code.
* 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
2007-05-24 20:09:21 +00:00
cmpilato 65de16dd8f * lib/vcauth/forbidden/__init__.py
(): import vclib (so trying to use it later doesn't make bad stuff happen)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1666 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-21 14:45:00 +00:00
cmpilato feca32c985 For issue #268: Merge the Authorizers' check_directory_access() and
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
2007-05-15 20:18:56 +00:00
cmpilato c3bd8d5aea Consistify blockquote stylation, and update cvsweb link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1660 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-15 18:38:24 +00:00
cmpilato fc2e5b9bd1 Update URL for PEP 8.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1659 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-15 18:01:39 +00:00
cmpilato 9e64e86927 Remove vcauth/test module.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1657 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-14 19:44:30 +00:00
cmpilato a98023499d Pass the Repository object to the vcauth modules so they can more
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
2007-05-10 21:44:28 +00:00
cmpilato 2ce86a5227 Ensure that vclib.Repository objects are aware of their name, path,
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
2007-05-10 20:47:27 +00:00
cmpilato 5a5e3755f6 * lib/vcauth/svnauthz/__init__.py
(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
2007-05-10 17:00:57 +00:00
cmpilato 10a2463c9f * lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Perform some minor logic optimizations
    and cleanups.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1652 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-09 22:16:41 +00:00
cmpilato abb8486da4 * lib/vcauth/svnauthz/__init__.py
(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
2007-05-09 22:06:00 +00:00
cmpilato f5defb51ae Fix parse of multi-user svnauthz groups.
* 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
2007-05-09 15:42:37 +00:00
cmpilato 0f57c5b5e3 Remove reference to merged-and-removed authz-dev branch.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1646 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-03 18:22:19 +00:00
cmpilato 0d6e57a823 * viewvc-install
(TREE_LIST): Install the contributed templates, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1644 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-03 18:02:36 +00:00
cmpilato ed4c21c012 * lib/viewvc.py
Fix some long lines.  No functional changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1643 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-03 18:01:56 +00:00
cmpilato e5d47a1314 * lib/viewvc.py
(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
2007-04-28 23:06:49 +00:00
cmpilato 5321434ca4 * bin/loginfo-handler
(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
2007-04-26 19:36:46 +00:00
cmpilato dc19cf90ba Merge the authz-dev branch work into trunk. Let's let the pluggable authz
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
2007-04-25 20:07:13 +00:00
cmpilato fac695eec4 Add an externals definition which pulls in contributed template sets
for ViewVC 1.1.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1621 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-25 19:41:15 +00:00
cmpilato 93696bc9c2 * docs/upgrading-howto.html
Don't refer to "ViewCVS 1.0".  It was "ViewVC 1.0".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1618 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-18 16:00:37 +00:00
cmpilato 141419f852 * lib/blame.py
(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
2007-04-17 21:38:33 +00:00