Commit Graph

54 Commits (f48add83f7d3ee999dc582312f9b3afc7fdb2a5c)

Author SHA1 Message Date
cmpilato f48add83f7 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2820 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-01-04 19:01:54 +00:00
cmpilato 01ebe77beb Fix a security issue: When a readable path is copied from an
unreadable one, Subversion will obscure the fact that the operation
was a copy (by removing copyfrom info) and will deem the log message
for the revision in which the copy occurred to be unreadable.  ViewVC
was only doing the former bit; now it does the latter, too.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._get_changed_paths): Set found_unreadable
    when we have to hide a copyfrom path, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2758 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-06-15 23:05:47 +00:00
cmpilato 1b63870590 Follow-up to r2731, trying to ensure that users with pre-1.4 Subversion
won't hit AttributeError's on account of svn_path_canonicalize() not 
being exposed through Subversion's Python bindings.

* lib/vclib/svn/svn_repos.py
  (_canonicalize_path): New helper function.
  (_rootpath2url): Use _canonicalize_path() instead of
    core.svn_path_canonicalize().

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository._geturl): Use (imported)
    _canonicalize_path() instead of core.svn_path_canonicalize().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2733 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-02-01 19:45:35 +00:00
cmpilato 1296106171 Fix issue #504 ("annotate view fails on filenames with colon (:)
characters in their names"), another in a long string of annotate view
brokennesses.  (Is that word?)  This time, the problem was a disparity
between Python's urllib encoding and what Subversion deems canonical.

* lib/vclib/svn/svn_repos.py
  (_rootpath2url): Canonicalize URLs for use with Subversion.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository._geturl): Canonicalize URLs for use with
    Subversion.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2731 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-02-01 16:24:29 +00:00
cmpilato 9e9b82218c Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2720 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-23 17:52:47 +00:00
cmpilato 25ab342bbf * lib/vclib/svn/svn_repos.py
(_rootpath2url): Get the absolute path before splitting off the
    drive, not afterward.  Otherwise, (some) drive letter will just get
    tacked back onto the path!  As we now verify elsewhere that
    rootpaths aren't relative, we needn't worry that .splitdrive() will
    return a relative rootpath.

Suggested by: Jens Peters <jp7677{__AT__}gmail.com>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2714 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-06 21:34:58 +00:00
cmpilato 5d68a5f883 * lib/vclib/svn/svn_repos.py
(_rootpath2url): "drive" already carries the colon, so don't append one.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2709 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-03 20:07:30 +00:00
cmpilato 6418278d55 * lib/vclib/svn/svn_repos.py
(_rootpath2url): Try a different approach that should actually
    handle spaces in the "in-repos" path, too, and maybe (if I'm super
    lucky) also work on Windows.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2707 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-03 15:18:21 +00:00
cmpilato 56e645ecb8 ### NOTE FROM THE FUTURE: This commit probably broke the ###
###  "annotate view without syntax coloration" codepath.   ###

On the 'issue-495-dev' branch:  Let vclib API consumers request that
annotation data come with or without the associated text.

* lib/vclib/__init__.py
  (Repository.annotate): Add optional 'include_text' parameter.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.annotate): Add 'include_text' parameter
    and, if False, have the annotation callback drop the text on the floor.

* lib/vclib/svn/svn_repos.py
  (BlameSource.__init__): Add 'include_text' param; squirrel away the value.
  (BlameSource._blame_cb): Don't keep text we're asked not to keep.
  (LocalSubversionRepository.annotate): Add 'include_text' parameter,
    passed to BlameSource.__init__.

* lib/vclib/ccvs/bincvs.py
  (BinCVSRepository.annotate): Add 'include_text' parameter, passed to
    blame.BlameSource().

* lib/vclib/ccvs/ccvs.py
  (CCVSRepository.annotate): Add 'include_text' parameter, passed to
    blame.BlameSource().

* lib/vclib/ccvs/blame.py
  (BlameSource.__init__): Add 'include_text' param; squirrel away the value.
  (BlameSource.__getitem__): Don't keep text we're asked not to keep.

* lib/blame.py
  (HTMLBlameSource.__init__): Update call to repos.annotate().



git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2696 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-05 19:58:38 +00:00
cmpilato 92b7b65707 Fix annotate views of files in Subversion repository whose paths
contain non-URI-safe characters (spaces, non-ASCII stuff, etc.)

* lib/vclib/svn/svn_repos.py
  (_rootpath2url): Use urllib.pathname2url to URL-encode the path
    portion of the URL we are building.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2674 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-14 21:28:46 +00:00
cmpilato 59f55fecb6 (More) gracefully handle some errorful input conditions.
* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository._getrev): Re-raise all exceptions as
    InvalidRevision exceptions.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._getrev): Re-raise all exceptions as
    InvalidRevision exceptions.

Found by:  Daniel Shahaf <d.s@daniel.shahaf.name>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2586 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-06-23 15:25:07 +00:00
cmpilato 7da44377c5 Fix issue #488 ("Allow 'rrNNN' formatting for Subversion revision
specifiers (with multiple 'r')").

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository._getrev): Accept multiple leading 'r's
    in revision specifiers.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._getrev): Accept multiple leading 'r's
    in revision specifiers.

Patch by:  Daniel Shahaf <d.s@daniel.shahaf.name>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2584 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-06-23 15:09:11 +00:00
cmpilato 4818a56012 Fix (I think...) issue #479 ("annotate a file, which uses
CVS-keywords").  This changes causes the checkout of CVS file
contents -- when used as part of the markup/annotate logic -- to not
expand keywords.  This helps it to be consistent with the results of
the annotate information query.

* lib/vclib/__init__.py,
* lib/vclib/svn/svn_ra.py,
* lib/vclib/svn/svn_repos.py
* lib/vclib/ccvs/ccvs.py
  (openfile): Add 'options' parameter (unused).  Callers updated.

* lib/vclib/ccvs/bincvs.py
  (openfile): Add 'options' parameter, and look for a 'cvs_oldkeywords'
    option to govern the use of -kkv or -ko in the 'co' command.
    Callers updated.

* lib/viewvc.py
  (markup_or_annotate): Pass 'cvs_oldkeywords' option to repos.openfile().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2545 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-04-01 16:59:11 +00:00
cmpilato 49957ea54b Hopefully, fix issue #475 ("regression: required authorization to
root") and issue #476 ("Stack trace for some users if last commit
deleted a file or folder") by preventing ViewVC from trying to look up
the path type of a deleted path at an invalid location.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._gettype): New helper function.
  (LocalSubversionRepository.itemtype): Now use _gettype() helper.
  (_get_change_copyinfo): New helper.
  (_simple_auth_check): Rework this function to definitively resolve
    the path type of paths it passes through the authz system,
    handling the complication of determining the path of a now-deleted
    path by consulting its last location prior to deletion.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2531 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-03-11 20:17:21 +00:00
cmpilato 76dae127d6 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2524 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-02-18 19:24:59 +00:00
cmpilato 2e69660725 Make what should be some decent performance improvements in the
Subversion revision metadata harvesting logic.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._revinfo): Split this into two logical
    codepaths, one that needs changed-path information along with the
    revision metadata, one which does not.  (Because if we don't need
    it, there are faster ways to get what we *do* need.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2509 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-02-11 21:33:28 +00:00
cmpilato 51fe3f9d1c * lib/vclib/svn/svn_repos.py
(_get_history, _log_helper): Move these into...
  (LocalSubversionRepository._get_history,
   LocalSubversionRepository._log_helper): ...here.  Update callers.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2507 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-02-11 21:16:13 +00:00
cmpilato e8ba12d66d Fix issue 425 ("Authorization subsystem needs some optimization").
Give the 'vcauth' subsystem a way to make universal access
determinations, which can seriously improve performance in situations
where a user has universal read access to a repository.

* lib/vcauth/__init__.py
  (GenericViewVCAuthorizer.check_universal_access): New skeletal function.
  (ViewVCAuthorizer.check_universal_access): New function.

* lib/vcauth/svnauthz/__init__.py (ViewVCAuthorizer.check_universal_access),
* lib/vcauth/forbidden/__init__.py (ViewVCAuthorizer.check_universal_access),
* lib/vcauth/forbiddenre/__init__.py (ViewVCAuthorizer.check_universal_access)
  New functions.

* lib/vclib/ccvs/bincvs.py
  (BaseCVSRepository.open): New function.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.open): Now check for universal read access.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.open): Now check for universal read access.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2496 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-12-09 16:10:04 +00:00
cmpilato 31bf260508 Cruft removal. Don't tempt folks to configure the path to their
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
2010-12-06 19:08:20 +00:00
cmpilato 1d8e32110c * lib/vclib/svn/svn_repos.py
(_split_revprops): Special-case the handling of empty input.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2454 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-08 18:11:28 +00:00
cmpilato a86bac818e * lib/vclib/svn/svn_repos.py
(BlameSource.__init__): Use client.create_context() instead of
    client.ctx_t() to avoid "NULL proxy object pool" error.

(I should have done this with the changes in r2421, but overlooked it,
I guess.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2435 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-03 16:18:55 +00:00
cmpilato 07ba91e7d9 * lib/vclib/svn/svn_repos.py,
* lib/vclib/svn/svn_ra.py
  Remove explicit import and use of 'string' module.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2434 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-02 19:46:14 +00:00
cmpilato 5a87b383e9 Finish issue #441: Allow "rNNN" formatting for Subversion revision specifiers.
* lib/vclib/svn/svn_repos.py (LocalSubversionRepository._getrev),
* lib/vclib/svn/svn_ra.py (RemoteSubversionRepository._getrev):
  Now accept revision strings that begin with 'r'.

Patch by: Daniel Shahaf <d.s{__AT__}daniel.shahaf.name>
          (Tweaked by me.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2405 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-06-17 20:43:28 +00:00
cmpilato 10d460902d Finish issue #453 by teaching ViewVC to display all displayable
Subversion revision properties.

NOTE: The svn_ra logic attempts to do the right thing when
      pre-Subversion 1.5 libraries are install, but I haven't had the
      chance to actually test this out myself.

* templates/revision.ezt
  Include the props.ezt property handler template fragment for use
  with revision props.  Also, minor markup change to a header.

* templates/docroot/styles.css
  Lose some unnecessary stylation.
 
* lib/viewvc.py
  (get_itemprops): Lose unused variable has_binary_props.
  (view_revision): Handle new return value from repos.revinfo(),
    processing extra revision props similarly to the way that file/dir
    props are processed and passing them to the template data
    dictionary.

* lib/vclib/svn/svn_ra.py
  Import _split_revprops() from svn_repos.
  (client_log): New compatibility wrapper.
  (add_log): Reformat as an svn_log_entry_receiver_t callback.
  (RemoteSubversionRepository.dirlogs, _date_from_rev): Track changes
    to self.revinfo().
  (RemoteSubversionRepository.itemlog): Now use client_log().
  (RemoteSubversionRepository._revinfo_raw): Now use client_log() and
    return revprops dict, too.
  (_log_cb): Reformat as an svn_log_entry_receiver_t callback.

* lib/vclib/svn/svn_repos.py
  (_split_revprops): New helper.
  (_log_helper, LocalSubversionRepository.dirlogs, _date_from_rev):
    Track changes to repos._revinfo().
  (_revinfo): Use _split_revprops(), and now return revprops, too.
  (_revinfo_helper): Now return revprops dict, too.
  (_date_from_rev): 

* lib/vclib/__init__.py
  (Repository.revinfo): Update docstring to indicate that this
    interface now returns a revprops dictionary, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2401 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-06-15 15:18:48 +00:00
cmpilato 26fa0600c6 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2330 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-03-10 21:17:28 +00:00
cmpilato 9dc26d4a01 Fix issue #447: Annotate view broken for local SVN repo.
* lib/vclib/svn/svn_repos.py
  (BlameSource.__init__): Add 'config_dig' parameter, and use it to
    register the Subversion configuration directory.
  (LocalSubversionRepository.__init__): Recognize an empty-string
    config_dir as None.  (Yay for configuration file nuances!)
  (LocalSubversionRepository.annotate): Pass self.config_dir to
    BlameSource().

Patch (mostly) by: Jan Parthey <jpar{_AT_}tigris.org>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2320 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-01-19 15:10:58 +00:00
cmpilato 98f1b93068 * lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.open): Remove custom SIGTERM handler.
    It's causing problems for mod_python deployments, and I can't seem
    to make it do anything meaningful for CGI deployments either.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2268 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-10-06 19:11:28 +00:00
cmpilato 92a95601d1 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2146 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-05 17:08:54 +00:00
cmpilato dfa98b490f Fix an exception in log views of Subversion repositories with 0
revisions.

* lib/vclib/svn/svn_repos.py
  (_get_history): Add easy-out for repositories with 0 revisions.

Reported by: Wojciech Wróblewski <wojtek{_AT_}elmi.pl>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2134 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-05-04 14:53:24 +00:00
cmpilato c6671ecc50 Attempt to compensate for the fact that some versions of Subversion's
Python bindings do not correctly set the .apr_err and .message members
of SubversionException objects by patching up those exceptions using
the exception arguments.

(Unfortunately, I don't have a version of these bindings installed for
testing.)

* lib/vclib/svn/svn_repos.py
  (_fix_subversion_exception): New helper function.
  (_get_history, BlameSource.__init__, LocalSubversionRepository.rawdiff,
   LocalSubversionRepository.get_location, LocalSubversionRepository.last_rev):
    Use _fix_subversion_exception().

* lib/vclib/svn/svn_ra.py
  (): Import _fix_subversion_exception from svn_repos.
  (RemoteSubversionRepository._date_from_rev, 
   RemoteSubversionRepository.get_location): Use _fix_subversion_exception().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2117 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-19 18:02:35 +00:00
cmpilato 0b1ac97f75 Try to deal with Subversion versions that lack the
SVN_ERR_CEASE_INVOCATION error code.

* lib/vclib/svn/svn_repos.py
  (_SVN_ERR_CEASE_INVOCATION): New compatibility variable.
  (NodeHistory.add_history, _get_history): Use compatibility variable
    instead of testing for SVN_ERR_CEASE_INVOCATION directly.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2070 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-12-19 19:48:43 +00:00
cmpilato 77fd2759c7 Remove unnecessary module imports.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2063 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-12-10 17:25:11 +00:00
cmpilato 11f5685955 Finish issue #384 - repos._revinfo_raw() is doing far too much work
when no authz is in use.  Vastly improves performance of
repos.itemlog() for local Subversion repositories *not* protected by
an authorizer.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository._revinfo): Was ._revinfo_raw().  Now
    encapsulates the caching logic that used to live in .revinfo(), plus
    the old logic of _revinfo_raw() modified to avoid changed-path
    processing when that processing isn't strictly required by callers.
  (LocalSubversionRepository.revinfo): Make this just a thin wrapper
    around ._revinfo() now.  Internal callers of this function updated
    to use ._revinfo() instead.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2051 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-11-13 21:14:14 +00:00
cmpilato 3738505ad7 * lib/vclib/svn/svn_repos.py
(LocalSubversionRepository._revinfo_raw): Fix a logic-o.  It's if
    a copy source path is *not* authorized for read that we want to say
    the original path was not copied.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1989 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-20 14:40:13 +00:00
cmpilato 91c5418de7 Add a helper function, use it, and fix a little authz oopsy along the way.
* lib/vclib/svn/svn_repos.py
  (_path_parts): New, and now used throughout for path-to-parts
    conversions.
  (_cleanup_path): Rewrite as a wrapper around _path_parts().
  (_fs_path_join): Rewrite as a wrapper around _cleanup_path().
  (LocalSubversionRepository._revinfo_raw): Fix an authz check made
    against the wrong path.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1969 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-26 07:43:52 +00:00
cmpilato fb0264a563 Make annotations work again for Subversion repositories.
* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.annotate): Keep the return value from
    self.itemtype() so we can pass it to _get_history().

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1952 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-12 18:20:09 +00:00
cmpilato cad4e52746 Finish issue #351, which solves a regression against 1.0.x *and*
improves upon things to boot (finishing issue #339)!

This implements support for a configuration Subversion runtime config
directory location, which is useful for employing cached authn
credentials against remote repositories that require them, as well as
avoiding complaints the Subversion library might make when trying to
ensure the existence of a runtime configuration directory.

* viewvc.conf.dist
  (options.svn_config_dir): New.

* lib/config.py
  (Config.set_defaults): Initialize options.svn_config_dir variable.

* lib/viewvc.py
  (Request.run_viewvc): Update call to vclib.svn.SubversionRepository().
  (list_roots): Update call to vclib.svn.SubversionRepository().

* lib/vclib/svn/__init__.py
  (SubversionRepository): Add 'config_dir' parameter, passed to
    updated calls to RemoteSubversionRepository() and
    LocalSubversionRepository()

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.__init__): Add 'config_dir' parameter,
    and squirrel it away in a member variable.
  (RemoteSubversionRepository.open): Add the key thing I've been
    missing for years to make custom runtime config directories work:
    setting the configuration directory location in the auth baton!
    God bless Eric Gillespie <epg@pretzelnet.org>.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.__init__): Add 'config_dir' parameter,
    and squirrel it away in a member variable (currenty unused).

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1940 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-05 18:52:45 +00:00
cmpilato 5b51bf9008 Finish issue #233: tarball entries from Subversion repositories don't
preserve executability.

* lib/vclib/__init__.py
  (Repository.isexecutable): New.

* lib/vclib/ccvs/bincvs.py
  (BaseCVSRepository.isexecutable): New.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.isexecutable): New.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.isexecutable): New.

* lib/viewvc.py
  (generate_tarball): Use repos.isexecutable() to get the executable
    bit for file tarball members.  (This loses old code which directly
    consulted the ,v file in the CVS case.)

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1936 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-03 17:02:55 +00:00
cmpilato 850422c786 * lib/vclib/svn/svn_repos.py
(LocalSubversionRepository): Throughout, don't clobber 'rev'
    variables before passing them off to .itemtype(), and ensure there
    *is* a local 'path' variable in case the .itemtype() failure case
    (which expects one) is raised



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1933 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-02 19:32:01 +00:00
cmpilato e8123f68c2 Merge changes from the 'log-paging' branch:
$ svn merge -c1849,1850,1853,1854,1855,1856 \
    http://viewvc.tigris.org/svn/viewvc/branches/log-paging

This brings sliding-window-style pagination to the log revision view.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1857 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-04-15 18:17:02 +00:00
cmpilato 3ab9ffbbc0 For issue #39, bang in some rudimentary support for displaying version
controlled item properties.  (Of course, this doesn't apply to CVS.)

* lib/vclib/__init__.py
  (Repository.itemprops): New.

* lib/vclib/ccvs/bincvs.py
  (BaseCVSRepository.itemprops): New.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.itemprops): New.
  (LocalSubversionRepository._revinfo_raw): Fetch the whole revision
    proplist instead of repeatedly querying the filesystem.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.itemprops): New.

* lib/viewvc.py
  (get_itemprops): New.
  (markup_or_annotate, view_directory): Use get_itemprops().

* templates/docroot/styles.css
  (.vc_properties, .vc_properties h2): New style defs.

* templates/include/props.ezt
  New.

* templates/markup.ezt,
* templates/directory.ezt,
* templates/annotate.ezt
  Include the new props.ezt template chunk.

* docs/template-authoring-guide.html,
* docs/upgrading-howto.html
  Document the new data dictionary bits.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1841 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-04-09 20:14:33 +00:00
cmpilato 5f8d6a1ff4 Truncate Subversion item log history if it dips into unreadable
(authz-wise) territory.  This should also filter unreadable revisions
from the annotate view, but I'm not as confident about that change.

* lib/vclib/svn/svn_repos.py
  (_get_history): Add 'path_type' parameter, rename 'full_name'
    parameter to 'path',  and truncate history at the first unreadable
    location (if any).
  (BlameSource.__init__): Pass 'first_rev' as the starting revision to
    the Subversion annotate logic, but leave a comment here questioning
    whether it was the right thing to do.
  (LocalSubversionRepository.itemlog): Update call to _get_history(),
    and filter unreadable copyfrom paths.
  (LocalSubversionRepository.annotate): Update call to _get_history().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1832 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-03-03 21:36:27 +00:00
cmpilato 8bc4d0109c Make some minor (though nice in terms of code readability)
optimizations to the way history is crawled in Subversion backends.

* lib/vclib/svn/svn_repos.py
  (NodeHistory): Make this into an iterable object instead of relying
    on a peek into a member variable.
  (NodeHistory.__init__): Make histories a list instead of
    dictionary.  We need the ordering.
  (NodeHistory.add_history): Validate the order in which revision info
    is received -- order matters now.
  (NodeHistory.__getitem__): New.
  (_get_history): Return the NodeHistory object, which is now iterable.
  (_log_helper): Swap the order of the 'path' and 'rev' parameters
    (for consistency).
  (_fetch_log): Merged into its only caller, which was ...
  (LocalSubversionRepository.itemlog): ...this.  Update the use of
    NodeHistory here to avoid unnecessary sorts and reverses and such.
  (LocalSubversionRepository.annotate): Update the use of NodeHistory here.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1831 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-03-03 21:00:45 +00:00
cmpilato 261db1bb7f * lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.openfile, LocalSubversionRepository.listdir, 
   LocalSubversionRepository.dirlogs, LocalSubversionRepository.annotate): 
    Use self.itemtype() to pull off both an authz check as well as 
    kind-in-light-of-operation validation.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1830 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-03-03 20:35:19 +00:00
cmpilato e1f287360a Add some missing module imports.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1829 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 16:14:15 +00:00
cmpilato 4395bc3b1c Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1828 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 16:11:24 +00:00
cmpilato 7cf7328238 * lib/vclib/svn/svn_repos.py
Tweak all uses of vclib.svn.core.* to be just core.*


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1794 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-13 21:34:31 +00:00
cmpilato 10fa46063c * lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.dirlogs): Oops!  Fix a buglet caused by
    looking at the wrong revision-holding variable.
 

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1791 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-13 17:39:12 +00:00
cmpilato 3cbf07551b Finish issue #57 with more support for showing locked status.
* lib/vclib/__init__.py
  (Repository.dirlogs): Update comment.
  (Revision.__init__): Add 'lockinfo' parameter, used to populate
    similarly named class member.

* lib/vclib/svn/svn_repos.py
  (Revision.__init__): Add 'lockinfo' parameter, and update call to
    vclib.Revision().
  (_log_helper): Update call to Revision(), and lose custom lockinfo handling.
  (LocalSubversionRepository.dirlogs): Populate entry lockinfo with a
    call to svn_fs_get_lock() for each entry.

* lib/vclib/svn/svn_ra.py
  (LogCollector.__init__): Add 'lockinfo' parameter, used to populate
    similarly named class member.
  (LogCollector.add_log): Pass self.lockinfo to updated call to Revision().
  (RemoteSubversionRepository.itemlog): Pass lock info to
    LogCollector(), and lose custom lockinfo handling.
  (RemoteSubversionRepository.itemtype, RemoteSubversionRepository.listdir): 
    Update expected return value from _get_dirents().
  (RemoteSubversionRepository.dirlogs): Populate entry lockinfo from
    updated return value from _get_dirents().
  (RemoteSubversionRepository._get_dirents): Rework to trade in
    dirents and locks instead of only dirents.

* lib/vclib/ccvs/bincvs.py
  (Revision.__init__): Update call to vclib.Revision().
  (_get_logs): Add 'lockinfo' member to DirEntry() items.

* lib/vclib/ccvs/ccvs.py
  (InfoSink.__init__): Init lockinfo dictionary.
  (InfoSink.set_locker): New.
  (InfoSink.define_revision): Set lockinfo on Revision item.
  (InfoSink.set_revision_info): Populate DirEntry lockinfo from
    Revision lockinfo data.

* lib/viewvc.py
  (view_directory): Populate entry lockinfo.
  (common_template_data): Populate the 'lockinfo' data dictionary item.

* templates/directory.ezt,
* templates/dir_new.ezt
* templates/annotate.ezt,
* templates/markup.ezt
  Tweak to show lock status.

* docs/template-authoring-guide.html
  Note new data dictionary items.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1787 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 21:06:40 +00:00
cmpilato d620498e9e Add support for display of locked status.
* docs/template-authoring-guide.html
  Document the new appearances of the lockinfo data.

* templates/log.ezt,
* templates/log_table.ezt
  Show lock status information.

* templates/docroot/images/lock.png
  New icon.

* lib/viewvc.py
  (view_log): Populate the log revision entry's new "lockinfo" member.

* lib/vclib/svn/svn_repos.py
  (_log_helper): Accept 'lockinfo' parameter, used to populate the
    similarly named member of the Revision() object.
  (_fetch_log): Query the lock status of the input path, and update
    calls to _log_helper().

* lib/vclib/ccvs/ccvs.py
  (CCVSRepository.itemlog): Update call to _file_log(), passing lockinfo.
  (TreeSink.__init__): Init new lockinfo dictionary.
  (TreeSink.set_locker): New.

* lib/vclib/ccvs/bincvs.py
  (_parse_log_header): Now parse and return lock information, too.
  (_file_log): Add 'lockinfo' parameter, used to populate the
    similarly named Revision() object members.
  (BinCVSRepository._get_tip_revision, BinCVSRepository.itemlog):
    Expect lockinfo back from _parse_log_header(), and pass to updated
    calls to _file_log().
  (_get_logs): Expect lockinfo back from _parse_log_header().

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.itemlog): Use svn_client_ls3() to fetch
    lock information.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1783 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 19:41:19 +00:00