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.
USE SHELL!!!
The bug was probably somewhere in file descriptor cloning + Apache webserver
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@516 6955db30-a419-402b-8a0d-67ecbb4d7f56
(_is_cvsroot): New helper function.
(expand_root_parent, find_root_in_parent): Rework these to now
use _is_cvsroot().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2892 8cb11bc2-c004-0410-86c3-e597b4017df7
This is a big-time regression in root handling which unfortunately
found its way into the 1.1.19 release.
Reported by: Michael Theys <michael.th90{_AT_}gmail.com>,
olli hauer <ohauer{_AT_}gmx.de>
* lib/vclib/ccvs/__init__.py
(expand_root_parent): Avoid unnecessary convenience variable.
(find_root_in_parent): Don't return a rootpath that we've not
checked for existence!!
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2891 8cb11bc2-c004-0410-86c3-e597b4017df7
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
svn_cmdline_create_auth_baton() function via the SWIG Python
bindings. So now use it if it's available!
* lib/vclib/svn/svn_ra.py
(setup_client_ctx): New compatability-sensitive function.
(RemoteSubversionRepository.open): Use setup_client_ctx() now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2864 8cb11bc2-c004-0410-86c3-e597b4017df7
a potentially costly directory listing within the root parent paths.
This has been shown to reduce the initial ViewVC startup overhead by
400% in some situations where disk I/O is especially sluggish.
* lib/vclib/ccvs/__init__.py
(find_root_in_parent): New function.
* lib/vclib/svn/__init__.py
(find_root_in_parent): New function.
* lib/viewvc.py
(find_root_in_parents): Use the new find_root_in_parent() functions
offered by the vclib implementations rather than the more expensive
full root expansion stuffs.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2862 8cb11bc2-c004-0410-86c3-e597b4017df7
(cat_to_tempfile): Renamed from temp_checkout(). Callers updated.
(RemoteSubversionRepository.openfile): Use cat_to_tempfile() now,
and try to head off a race condition that could leave tempfiles
lying about.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2857 8cb11bc2-c004-0410-86c3-e597b4017df7
for local Subversion repositories.
* lib/vclib/svn/svn_repos.py
(LocalSubversionRepository.get_symlink_target): New function.
* lib/viewvc.py
(generate_tarball_header): Add the ability to generate private
headers for long symlink names, too.
(generate_tarball): Use the Repository object's get_symlink_target()
function (if available) to determine whether a versioned object is a
symlink, and use that information to preserve symlinks in
generated tarballs.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2855 8cb11bc2-c004-0410-86c3-e597b4017df7
with that of bincvs logic").
* lib/vclib/ccvs/ccvs.py
(InfoSink.define_revision): Tweak the revision matching logic a bit
to include branch points as valid revisions when examining branch
tags.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2839 8cb11bc2-c004-0410-86c3-e597b4017df7
driven CVS backend, fixing an inconsistency between rcsparse-based and
binary-based parsing.
* lib/vclib/ccvs/ccvs.py
(InfoSink.__init__): Init new 'saw_revision' flag.
(InfoSink.define_revision): Set 'saw_revision'.
(InfoSink.parse_completed): If 'saw_revision' is not set, set the
'absent' flag.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2837 8cb11bc2-c004-0410-86c3-e597b4017df7
commit deleted a file or directory").
* lib/vclib/svn/svn_repos.py
(_get_change_copyinfo): Only call svn_fs_copied_from() on "add" and
"replace" change items (which might actually be copies). This
avoids raising an exception caused by running svn_fs_copied_from()
on a missing (via deletion) root/path pair.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2827 8cb11bc2-c004-0410-86c3-e597b4017df7
(RemoteSubversionRepository.itemlog): Only fetch lock and size
information for files, not directories.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2781 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(markup_or_annotate): Don't forget to cross copies when requesting
the item's log.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.itemlog): Treat 'svn_latest_log' option
specially, as in the svn_repos case. (Ugh.)
(RemoteSubversionRepository.annotate): Pass 'svn_show_all_dir_logs'
option to itemlog(). Also, upgrade to svn_client_blame2() API.
(RemoteSubversionRepository._get_last_history_rev): Now return both
the info-provided create_rev, and the more accurate
last_history_rev. Callers updated.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2770 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository._revinfo_fetch): New. Holds the guts of
the revision info harvesting (plus some bugfixes thereto) from...
(RemoteSubversionRepository._revinfo): ...this, which now calls the
helper function. Also, don't tuple-ize the already-tupled cache
info.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2768 8cb11bc2-c004-0410-86c3-e597b4017df7
unnecessary (and somewhat expensive) work.
* lib/vclib/svn/svn_ra.py
(client_log): Add 'include_changes' parameter, pass to the
Subversion log APIs. Callers updated.
(_revinfo): Was _revinfo_raw(). Add 'include_changed_paths'
parameter. Now handles the revinfo cache, only fetches changed
paths when required, and bails out early of authz checks when
possible. All internal callers of revinfo() have been updated to
use this interface instead.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2765 8cb11bc2-c004-0410-86c3-e597b4017df7
annotate view recently introduced.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.annotate): Pass 'svn_cross_copies'
option to itemlog() so that annotation history isn't unnaturally
truncated.
(RemoteSubversionRepository._blame_cb): Only consult the revinfo
cache when authz checks are required. This improves the speed of
the operation when universal read access is granted to the user.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2763 8cb11bc2-c004-0410-86c3-e597b4017df7
fully honoring authz rules"). In doing so, this makes the svn_ra
module the most accurate it has ever been, hopefully without too
terribly much extra cost.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.listdir): No longer check access here.
That's handled down in _get_dirents() now.
(RemoteSubversionRepository.dirlogs): Don't check dirent access here.
Just ensure that the returned entries are those which are
represented in the (filtered) set return from _get_dirents().
Also, replace the revision metadata stored on each dirent with
values from the revinfo cache (which does authz sanitizing).
(RemoteSubversionRepository._get_dirents): Do authz-checking of
dirents here, and use _get_last_history_rev() to populate a useful
created_rev.
(RemoteSubversionRepository._get_last_history_rev): Because
Subversion's RA layer doesn't consider copy events when
determining an item's last-committed-rev, compensate for this with
a bounded log operation which does. This brings created-rev
parity with the svn_repos module (at the cost of the extra RA
work, but with the benefit of, you know, accuracy.
(RemoteSubversionRepository._revinfo_raw): Leave a TODO about a
future optimization.
(RemoteSubversionRepository._log_cb): Set found_unreadable when
sanitizing an unreadable copyfrom path, too.
(RemoteSubversionRepository.created_rev): Now just a thin wrapper
around the beefed-up _get_last_history_rev() function.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2760 8cb11bc2-c004-0410-86c3-e597b4017df7
(LogCollector.add_log): Allow the access_check_func to be None (and
avoid trying to call it in that case).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2759 8cb11bc2-c004-0410-86c3-e597b4017df7
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
remote SVN repositories.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.annotate): Examine revision logs to
determine the legal annotation range we are allowed to request,
and use the revinfo cache to strip sensitive author/data info from
the annotation data.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2757 8cb11bc2-c004-0410-86c3-e597b4017df7
authz rules"):
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.get_locations): Check authz on the
result of a get_locations lookup (being sure to use the original
path in the error message, if any).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2756 8cb11bc2-c004-0410-86c3-e597b4017df7
log view for remote SVN repositories.
* lib/vclib/svn/svn_ra.py
(LogCollector.__init__): Add 'access_check_func' parameter, stashed
away as a member variable. Initialize 'done' variable to False.
(LogCollector.add_log): Use access_check_func() to test for access.
If access is denied, set 'done' to True and ignore future
invocations.
(RemoteSubversionRepository.itemlog): Add _access_checker inner
function, passed as a callback to LogCollector.__init__().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2755 8cb11bc2-c004-0410-86c3-e597b4017df7
time.
* lib/vclib/svn/__init__.py
(_canonicalize_path): New helper function.
(canonicalize_rootpath): Rework this to perform the URL -> absolute
path conversion any time it can, not only when using really old
Subversion versions.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2735 8cb11bc2-c004-0410-86c3-e597b4017df7
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
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
(_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
what kind of chaos may ensue otherwise.
* conf/viewvc.conf.dist
Note that paths should be absolute filesystem paths.
* lib/vclib/svn/__init__.py
(canonicalize_rootpath, expand_root_parent): Assert that local
repository paths are absolute.
* lib/vclib/ccvs/__init__.py
(canonicalize_rootpath, expand_root_parent): Assert that local
repository paths are absolute.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2713 8cb11bc2-c004-0410-86c3-e597b4017df7
(_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