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.
Удалил изврат, добавив чуть меньший изврат:
Теперь в процессе установки bin-файлы не модифицируются,
а только добавляется рядом с ними файл viewvcinstallpath,
в котором прописываются пути.
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@539 6955db30-a419-402b-8a0d-67ecbb4d7f56
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
Bug 32155
Fix an EVERLASTING error for all RSS generator:
Generating dates via strftime() with non-english LC_TIME
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@271 6955db30-a419-402b-8a0d-67ecbb4d7f56
* lib/viewvc.py
(ViewVCHtmlFormatter.get_result): Remove some unnecessary
statements, and fix the fact that this was disregarding the 'maxlen'
parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2905 8cb11bc2-c004-0410-86c3-e597b4017df7
depending on Python version").
* lib/viewvc.py
(transcode_text): Avoid using keyword arguments with unicode() and
.encode(), support for which wasn't added until Python 2.7.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2902 8cb11bc2-c004-0410-86c3-e597b4017df7
(markup_stream, DiffSource._format_text): Fix still more buglets
around tab-to-space conversion.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2895 8cb11bc2-c004-0410-86c3-e597b4017df7
(_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
* lib/viewvc.py
(markup_stream): Only expand tabs if the tabsize > 0.
(DiffSource._format_text): Only strip EOL stuffs from the ends of
lines -- preserve other whitespace forms. Also, only expand tabs if
the tabsize > 0.
* conf/viewvc.conf.dist
(tabsize): Use the term "horizontal tab character" rather than
"tabstop". The latter is the destination; the former is the
character that tells the text flow to resume there.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2876 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(markup_stream): When transcoding, handle the whole body of file
contents at once rather than trying to go line-by-line. Why?
Because until transcoded, the concept of a "line" is rather
meaningless. (NOTE: There is almost certainly some fallout to
occur in the annotate view as a result of this work, since each VC
system's annotation support also uses the naive concept of a
line.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2873 8cb11bc2-c004-0410-86c3-e597b4017df7
ViewVC").
Use the 'chardet' module where available and enabled by configuration
to detect source file content encoding, and transcode the output to
UTF-8. We supported this already via Pygments when
'enable_syntax_coloration' was set; now we can also support this when
it isn't.
* lib/viewvc.py
(detect_encoding, transcode_text): New helper functions.
(markup_stream): Use the new helper functions to attempt to
transcode text into UTF-8 even when syntax coloration is *not* in
use.
* conf/viewvc.conf.dist
(detect_encoding): Remove notation about this only being used when
'enable_syntax_coloration' is also enabled.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2872 8cb11bc2-c004-0410-86c3-e597b4017df7
allow_compress=1").
* lib/viewvc.py
(get_writeready_server_file): Add 'allow_compress' parameter, and
handling to give callers the power to disable response-level
compression.
(download_tarball): When calling get_writeready_server_file(),
disable compression (if any) since we're doing our own gzipping
herein.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2870 8cb11bc2-c004-0410-86c3-e597b4017df7
into memory when generating tarballs.
* lib/viewvc.py
(generate_tarball): Avoid reading file contents fully into memory.
Rather, query the filesize from the vclib provider and chunk the
output. If the filesize must be calculated, use two chunked
passes over those contents (one to measure, one to write to the
tarball).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2867 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
Be less sloppy about what this script reports as default behavior
around hostnames and ports. If a hostname isn't supplied,
"localhost" isn't strictly passed to 'mysql'; same for the port.
And on UNIX, the lack of an explicit hostname (or an explicit
"localhost" one) will cause 'mysql' to use a UNIX socket rather than
a TCP/IP one, regardless of what the provided port is. So it's not
strictly accurate to imply that by not providing a hostname and
port, 'make-database' will use "localhost/3306" for that
information.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2844 8cb11bc2-c004-0410-86c3-e597b4017df7
someone has a modified/customized database with additional or
reordered columns.
* lib/cvsdb.py
(CheckinDatabase.CheckCommit, CheckinDatabase.PurgeRepository):
Name columns in SELECT statement rather than using '*'.
Patch by: Grant Bremer <gbremer{__AT__}tigris.org>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2843 8cb11bc2-c004-0410-86c3-e597b4017df7
Use "ENGINE=MyISAM" rather than "TYPE=MyISAM" throughout. The
latter syntax was deprecated in MySQL 5.0 and dropped in 5.5.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2842 8cb11bc2-c004-0410-86c3-e597b4017df7
specified").
* bin/make-database
(__main__): Add a --port option and handling thereof, passing the
value off to 'mysql'.
Patch by: Grant Bremer <gbremer{__AT__}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2841 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
(markup_stream): Strip EOL characters from the ends of marked-up
lines. Templates can re-add line breaks, but they can't easily
strip them.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2832 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
* lib/viewvc.py
(DiffDescription.__init__): Don't set self.diff_options.
(DiffDescription.get_content_diff, DiffDescription.get_prop_diff):
Rename local variable 'options' to 'diff_options', and actually
populate *it* rather than the otherwise unused (and now removed)
'diff_options' class variable.
(DiffDescription._get_diff, DiffDescription._line_idiff_sidebyside,
DiffDescription._line_idiff_unified, DiffDescription._content_fp,
DiffDescription._prop_fp): Rename 'options' to 'diff_options'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2818 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
* templates/classic/file.ezt,
* templates/default/file.ezt
Set the page's <title> attribute to "Annotation of ..." or "Contents
of ...", depending on whether the output is annotated.
Patch by: John McNally <jmcnally{__AT__}collab.net>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2796 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(DiffSource._get_row): Pass the "extra" line information through the
formatter code so that, at a minimum, it's HTML-escaped.
Patch by: Nicolás Alvarez <nicolas.alvarez{__AT__}gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2792 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_diff): Add 'cfg' convenience variable (to avoid a stack trace
caused by using such a thing a few lines later).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2790 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_log): Preserve the 'log_pagestart' query value when generating
the 'select for diff' links so that clicking the link returns you to
the same page (modulo repagination due to new commits in the race
window ... but let's not think about that). Also, preserve the
'r1' query parameter when generating the paging form.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2788 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/cgi/viewvc.cgi
Add some commented-out logic for renice-ing the ViewVC CGI process.
Inspired by: Karl Berry <karl{__AT__}freefriends.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2786 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
(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
New icon file.
* templates/default/directory.ezt,
* templates/default/docroot/styles.css
Add template bits for displaying a lock-icon "overlay" for locked
items in the directory view.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2774 8cb11bc2-c004-0410-86c3-e597b4017df7
(LogFormatter.get): Fix a regression introduced in 1.1.14's handling
of log messages when not HTML-ifying them (for example, when serving
them up via RSS).
Patch by: Christoph Sommer <christoph.sommer{__AT__}uibk.ac.at>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2771 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
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
for better performance").
* lib/viewvc.py
Replace uses of format_log() throughout with calls to LogFormatter()
(to get a formatter "lf") then lf.get() (to get the formatted log
string). Also...
(format_log): Remove as unused.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2741 8cb11bc2-c004-0410-86c3-e597b4017df7
better performance"), make the first step of two in trying to avoid
parsing log messages twice when once will suffice.
* lib/viewvc.py
(ViewVCHtmlFormatterTokens): New class for generating HTML-formatted
text from a set of provided ViewVCHtmlFormatter tokens.
(ViewVCHtmlFormatter.get_result): Track renamed function, and defer
the work of the text generation to the token object's get_result()
method.
(ViewVCHtmlFormatter.tokenize_text): Renamed from _tokenize_text(),
and now return a ViewVCHtmlFormatterTokens object.
(LogFormatter): New class for encapsulating the log formatting logic.
(format_log): Make a wrapper around LogFormatter for now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2740 8cb11bc2-c004-0410-86c3-e597b4017df7
anonymously").
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Don't try to convert a None username to
lower- or upper-case.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2738 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
(update_license): Remove.
(bump_years): Print reminder about amending the change history
section of the LICENSE.html file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2722 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
against the upstream version of this module.
* lib/common.py
(TemplateData): Moved here...
* lib/ezt.py
...from here.
* lib/query.py,
* lib/viewvc.py
Import 'TemplateData' from 'common' now, and update references to this
relocated class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2711 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
(): Stop importing the pygments stuff at the module-global scope,
and go back to doing so...
(markup_stream): ...here.
(markup_or_annotate): No longer consider access to Pygments when
making the first pass at colorizing -- if we don't have it,
markup_stream() will fail quickly and we can take the second
(non-colorizing) pass.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2702 8cb11bc2-c004-0410-86c3-e597b4017df7
reintroduces the issue #495 feature ("Syntax highlight/colorize
scripts without extensions") while building much more fault tolerance
into the system.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2699 8cb11bc2-c004-0410-86c3-e597b4017df7
useful improvements to the syntax coloration and annotation codepaths.
First, settle on the file contents as fetched via repos.openfile() as
the canonical source of such. But also, allow any exceptions thrown
while colorizing those file contents to trigger a second attempt
without colorization enabled. This should allow for non-error-ful
display of binary files which lack both an extension and VC content
type hint (those are treated by default as text files).
* lib/viewvc.py
(markup_stream): Add docstring. Replace 'fp' parameter with
'file_lines' parameter. Add 'colorize' parameter. No longer try
to munge 'blame_data' -- expect that callers have done that. Lose
first_line tracking stuff, as fetching the first line of the file
is no longer destructive. Always use 'file_lines' as the source
of file contents; never the text attached to the 'blame-data'.
(markup_or_annotate): Rework this to do more of the cheap work of
annotating and markup up so that markup_stream() can be called
more than once if necessary -- once to attempt colorization, and
again without that feature if the first pass fails.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2698 8cb11bc2-c004-0410-86c3-e597b4017df7
### "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
* lib/viewvc.py
(): Try to import the pygments code at the global scope instead of...
(markup_stream_pygments): ...here. Add/move some comments, too.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2693 8cb11bc2-c004-0410-86c3-e597b4017df7
(markup_stream_pygments): Re-make the semantic changes from r2680,
which were (I believe) good ones, even if the lexer guessing stuff
hasn't yet work out entirely.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2686 8cb11bc2-c004-0410-86c3-e597b4017df7
For issue #501 ("Stack trace when trying to 'view' binary files"):
* lib/viewvc.py
(markup_stream_pygments): On second thought, allow guessing to
happen on non-None MIME types iff they appear to be text-y.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2681 8cb11bc2-c004-0410-86c3-e597b4017df7
For issue #501 ("Stack trace when trying to 'view' binary files"):
* lib/viewvc.py
(markup_stream_pygments): Rework the Pygments lexer-choosing logic a
bit. First, don't try any of it when syntax highlighting is
disabled. Secondly, don't guess at a lexer if we know the file's
MIME type and have already failed to get a matching lexer.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2680 8cb11bc2-c004-0410-86c3-e597b4017df7
(markup_or_annotate): Pass 'mime_type' to common_template_data() so
it can properly set the 'prefer_markup' bit. Otherwise, it will
guess without out svn:mime-type at its disposal.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2679 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/default/markup.ezt
Delete as unused.
* templates/default/include/fileview.ezt
Delete, after merging contents into...
* templates/default/file.ezt
...here. Also, port the [hide_binary_garbage] stuff from the classic
templates.
* templates/default/docroot/styles.css
(.vc_notice): New class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2678 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/default/query_results.ezt
Display warning text when query results are superficially truncated.
* templates/default/docroot/styles.css
(.vc_warning): New style.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2676 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* bin/svndbadmin
(SvnRev.__init__): Update the logic used to calculate change types
and diff objects to no longer assume that deleted paths have None
for their change.path. (Subversion's 1.7 bindings always populate
change.path.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2671 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/default/docroot/styles.css
Layout/style tweaks to the new default template set.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2660 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(diff_side_item): Pass the option to repos.itemlog() which says to
include directory logs even for revisions in which the directory
itself was not explicitly modified (props changed).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2659 8cb11bc2-c004-0410-86c3-e597b4017df7
Finish issue #495 ("Syntax highlight/colorize scripts without
extensions").
* lib/viewvc.py
(markup_stream_pygments): Failing all else, use the Pygments
guess_lexer() function to guess a file's content type from the
first line of its text. (Most of this patch is compensation for
the first that if this heuristic codepath is traversed, we've eaten
a line of text from the file object that we don't expect to have
been eaten.
Patch by: Chris Mayo <cjmayo{__AT__}tigris.org>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2657 8cb11bc2-c004-0410-86c3-e597b4017df7
(DiffSource): Do not switch to flush state. Such switch causes changes
to be displayed as removal and readdition.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2656 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_roots): Generate a log_href -- the revision log for the root
directory of the repository -- where it makes sense to do so.
* templates/classic/roots.ezt,
* templates/default/roots.ezt
Markup the last-modified-revision as a link to the log view where we can.
* docs/template-authoring-guide.html
Note the additional data dictionary item.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2653 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/default/log.ezt,
* templates/default/docroot/styles.css,
More markup changes to the default templates.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2652 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/default/log.ezt,
* templates/default/graph.ezt,
* templates/default/diff.ezt,
* templates/default/include/diff_display.ezt
Take a stab at updating the new default templates to handle the
property diff stuff.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2651 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/classic/include/diff_display.ezt
* lib/viewvc.py
Rename 'display_as' to 'diff_block_format', as discussed on ML.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2650 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
dictionary item to 'diffs' for consistency with other multi-value
items. Yes, I know it makes the template usage itself weird
... "diffs.changes" instead of "diff.changes", but...
* lib/viewvc.py
(view_diff): Store the desc.changes in the 'diffs' data dictionary
item, not the 'diff' item.
* templates/diff.ezt
* templates/include/diff_display.ezt
Replace uses of 'diff' with 'diffs'. Selectively, of course.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2643 8cb11bc2-c004-0410-86c3-e597b4017df7
(top level) Introduce formatting rules for 4th and 5th levels of variables.
(diff.ezt) Update for the changes on the property-diff branch. Describe
missing parts (intraline diffs, patch_href). Fix some typos and copy-paste
errors.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2642 8cb11bc2-c004-0410-86c3-e597b4017df7
Try to document the creation of new release branches (though it's been a
while since I've done that, so this is all subject to my imperfect memory.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2637 8cb11bc2-c004-0410-86c3-e597b4017df7
Tweak the "from 0.8" section for a bit of consistency with other sections.
(As if anyone is still running 0.8.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2633 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewvc): Select diff view for directories if r1/r2 arguments
are provided.
(view_revision): Generate a link to diff view on directories if there was
a change in properties.
* log.ezt
(revision links): Generate 'diff to previous' and 'diff to selected' for
directories as well as files. Check for URL, not revision when determining
if 'diff to previous' link should be created (for consistency with 'diff
to selected')
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2626 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Pass anchor locations to the diff template.
* diff_display.ezt
(top-level): Generate anchors.
* revision.ezt
(path links): Use anchors to point to content and property parts of the diff.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2625 8cb11bc2-c004-0410-86c3-e597b4017df7
(DiffDescription): Add support for property diffs.
(diff_side_item): Store properties hash in the side items.
(view_diff): Generate property diffs.
* diff_display.ezt
(headers): Indicate the property being diffed, if applicable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2624 8cb11bc2-c004-0410-86c3-e597b4017df7
(DiffDescription): New class. Move the diff format selection and processing
to this new class. Split the processing into "preparation" and actual diff.
The ideas behind this new class are:
1. It will accumulate the diff "blocks". Currently, it will handle content and
properties. In the future, it can be easily reused to accumulate diffs for
recursive ("revision") diff.
2. It separates the diff method from the selection of content to be diffed.
We have two content inputs (content, properties), four formats (raw, traditional
side-by-side, intraline side-by-side, intraline unified). The former two expect
a stream (fp), the latter two expect array of lines. This class makes each of
these chunks separate from each other.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2622 8cb11bc2-c004-0410-86c3-e597b4017df7
(raw): Gracefully handle the case where there are no changes (output
"No changes" instead of not displaying anything).
* viewvc.py
(diff_parse_headers): Detect if there were no input from diff stream,
report RCSDIFF_NO_CHANGES in this case.
(view_diff): If binary/empty changes are detected, relay that information
to the template.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2621 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): In preparation for factoring out the "differ" code, make view_diff
always pass the differences as 'changes' array/stream. The format is now selected
via new 'display_as' argumnet.
* diff_display.ezt
(all formats): Accommodate changes in viewvc.py
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2619 8cb11bc2-c004-0410-86c3-e597b4017df7
(all formats): Remove the use of empty <h3> as spacer, instead add margin-top on tables.
(sidebyside, unified): Specify column widths. Otherwise, files with narrow content
are displayed with line number columns occupying 50% of the screen.
(unified): Remove cut-n-paste "width" attribute specification.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2618 8cb11bc2-c004-0410-86c3-e597b4017df7
(left_header/right_header): Define common left/right side descriptions,
use them in all diff output formats (adding them to raw and unified, which
didn't have headers before)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2616 8cb11bc2-c004-0410-86c3-e597b4017df7
(legend): Remove references to revisions (revisions may be the same, e.g.
if diffing same revision on different branches). There are detailed references
in the headers.
(legend): Mention that colors designate not only affected lines, but also
characters (if intraline diffs are enabled).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2614 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Make diff an iterable (sequence); later property changes will be
added to the sequence. Pass hide_legend, left_rev, right_rev outside of the
diff[] array to untie diff.ezt from include/diff_display.ezt. Rename format
to diff_format for consistency with template name.
* diff.ezt
Same, plus small fixes in legend: capitalize first letter in 'changed',
refer to revision as such, not as 'v.XXX' - such references are not used
anywhere else.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2613 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Factor out common code preparing left/right item information into a new
function, diff_side_item.
(diff_side_item): New function.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2607 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Remove try-except block, exceptions are now handled in
setup_diff with more specific error messages. Merge the 'if fp'
block with the preceding conditional - which is the only way fp
is set to non-None.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2606 8cb11bc2-c004-0410-86c3-e597b4017df7
New file to house common definitions; _item and _RCSDIFF_*
for now. Remove local definitions in the rest of modules.
* idiff.py
(sidebyside, unified): Return _RCSDIFF_NO_CHANGES type if
the generator failed to yield anything else.
(sidebyside): Add type attribute to the returned tuple so
that template can check the type.
* diff_display.ezt
(top-level): Define messages to be used if diffs cannot be
displayed. Use the definitions in all non-raw displays.
(sidebyside,unified): Handle _RCSDIFF_IS_BINARY and
_RCSDIFF_NO_CHANGES; the former is not returned yet - will
be passed to the template once properties are diffed.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2605 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Encapsulate into a single _item parts that would
be repeated when multiple "diffable" items will be passed to diff.ezt.
At that time, diff will be changed to a sequence.
* diff_display.ezt, diff.ezt
Prefix those repeatable parts with 'diff'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2604 8cb11bc2-c004-0410-86c3-e597b4017df7
query, rather than croaking on an empty response.
* viewvc-install
(install_file): If raw_input() return an empty string, re-ask the
question.
Patch by: Alexey Neyman <stilor@att.net>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2599 8cb11bc2-c004-0410-86c3-e597b4017df7
commit allows environmental overrides to trump programmatically
passed-in configuration paths.
* INSTALL
Mention the VIEWVC_CONF_PATHNAME override environment variable.
* lib/viewvc.py
(load_config): Document this function and the order in which it
searches for a configuration path. Use server.getenv() instead of
os.environ.get() where we can so that environmental overrides work
in mod_python.
Patch by: Alon Bar-Lev <alon.barlev@gmail.com>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2597 8cb11bc2-c004-0410-86c3-e597b4017df7
For issue #494 ("allow override config from in mod_python"), use
server.getenv() instead of os.environ.get() to look for the special
VIEWVC_CONF_PATHNAME environment variable.
* INSTALL
Mention the VIEWVC_CONF_PATHNAME override environment variable.
* lib/viewvc.py
(load_config): Use server.getenv() instead of os.environ.get().
Patch by: Alon Bar-Lev <alon.barlev@gmail.com>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2595 8cb11bc2-c004-0410-86c3-e597b4017df7
Note the importance of the MIME type maps for syntax coloration, and
point folks to the 'mime_types_files' option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2593 8cb11bc2-c004-0410-86c3-e597b4017df7
allowed_views, etc.)").
* conf/viewvc.conf.dist
(allowed_views): Add descriptions of the various views.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2591 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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
Fix a mistaken issue reference.
* INSTALL
Add a step allowing access to your ViewVC install directory, and delay the
Apache restart by a step.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2582 8cb11bc2-c004-0410-86c3-e597b4017df7
Add code to workaround the fact that in Python 2.6,
fnmatch.translate() stopped returning strings that ended with '$'
(which work fine as MySQL regular expressions) and started instead
returning strings that ended with '\Z(?ms)' (which... don't).
* lib/cvsdb.py
(CheckinDatabase.SQLQueryListString): If the returned regexp ends
with '\Z(?ms)', replace those characters with a single '$'
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2580 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(diff_parse_headers): Add 'path1' and 'path2' parameters, and use
those paths in the returned header lines.
(view_patch, view_diff): Pass paths into diff_parse_headers() now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2577 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/standalone.py
(usage, badusage): New functions.
(main): Separate the option parsing from the option validation. Add
support for a '--help' option. On bad input, now print a suggestion
to run the script with '--help' for usage hints.
Patch concept by: Prabhu Gnana Sundar <prabhugs@collab.net>
(Heavily, heavily tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2565 8cb11bc2-c004-0410-86c3-e597b4017df7
(main): Use a pristine Options() object when printing the usage
message (so the stated default values of options aren't affected
by what the user provided).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2561 8cb11bc2-c004-0410-86c3-e597b4017df7
(main): Switch to sequence syntax to prevent future headache:
'-h' in ('--help') returns True, which is not what we expect.
'-h' in ['--help'] returns False, which is what we want.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2559 8cb11bc2-c004-0410-86c3-e597b4017df7
sticky tag is specified").
* lib/vclib/ccvs/bincvs.py
(_get_logs): Only try to skip the "rest of the file" if there's
reason to believe there's a "rest of the file". While here,
ensure that the 'tag' variable is defined in all cases (though it
shouldn't matter).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2557 8cb11bc2-c004-0410-86c3-e597b4017df7
#433 ("queries return only partial results"). When a database query
is artificially limited by the 'row_limit' setting, inform the user
that the returned data is incomplete.
* lib/cvsdb.py
(CheckinDatabase.CreateSQLQueryString): Add 'detect_leftover'
parameter, used internally to check for a reached query limit.
(CheckinDatabase.RunQuery): Update call to CreateSQLQueryString(),
and check for leftover query response rows. If any are found, set
the appropriate flag on the query object.
(CheckinDatabaseQuery.__init__): Set initial values for new
'executed' and 'limit_reached' members.
(CheckinDatabaseQuery.SetExecuted,
CheckinDatabaseQuery.SetLimitReached,
CheckinDatabaseQuery.GetLimitReached,
CheckinDatabaseQuery.GetCommitList): New functions.
* lib/viewvc.py
(view_query): Use query.GetCommitList() now instead of poking into
the query object directly. Also, check query.GetLimitReached(),
reporting the findings through the data dictionary (via a new
'row_limit_reached' item) to the templates.
* lib/query.py
(run_query): Use query.GetCommitList() now instead of poking into
the query object directly. Now return a 2-tuple of commits and a
limit-reached flag.
(main): Update expectations of run_query() call. Populate
'row_limit_reached' data dictionary item.
* templates/query_results.ezt,
* templates/query.ezt
Display a warning if the query results are incomplete.
* templates/docroot/styles.css
(.vc_warning): New style definition.
* docs/template-authoring-guide.html
Document the new 'row_limit_reached' template item.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2551 8cb11bc2-c004-0410-86c3-e597b4017df7
While here, add notes to the 'row_limit' and 'rss_row_limit'
configuration option descriptions.
* lib/cvsdb.py
(CheckinDatabase.GetCommitsTable): New helper.
(CheckinDatabase.AddCommit, CheckinDatabase.CreateSQLQueryString,
CheckinDatabase.CheckCommit, CheckinDatabase.sql_delete): Use new
GetCommitsTable() helper instead of hard-coding the version-specific
selection of the commits table.
* conf/viewvc.conf.dist
(row_limit, rss_row_limit): Make it clear what exactly is getting
limited here.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2550 8cb11bc2-c004-0410-86c3-e597b4017df7
mechanisms, namely by removing the largely redundant "global" limit
and allowing the per-query row limit (which already exist, too) to do
its work.
While here, remove a poorly conceived (but thankfully unhighlighted)
mechanism for overriding the administrative limit on database rows
which was accessible via URL CGI params.
* lib/viewvc.py
(_legal_params): Remove 'limit' as a legal parameter.
(view_query): No longer allow an undocumented URL parameter to
override the admin-declared SQL row limit. That should have never
been allowed!
* lib/cvsdb.py
(CheckinDatabase.__init__): Remove 'row_limit' parameter and
associated self._row_limit member.
(CheckinDatabase.CreateSQLQueryString): No longer fuss with
self._row_limit. Let the individual query carry the row limit.
(ConnectDatabase): Update call to CheckinDatabase().
* lib/query.py
(form_to_cvsdb_query): Now accept 'cfg' parameter, and set the
query's row limit from the configured defaults.
(run_query): Update call to form_to_cvsdb_query().
* docs/url-reference.html
Remove reference to the 'limit' parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2547 8cb11bc2-c004-0410-86c3-e597b4017df7
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
consumption").
* lib/viewvc.py
(ViewVCHtmlFormatter._tokenize_text): Switch to a line-based
approach. This provides a *vast* improvement in performance and
memory usage, especially for large log messages with many
mark-up-able regions.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2543 8cb11bc2-c004-0410-86c3-e597b4017df7
dumped") by raising a cleaner error message when asked to display a
"checkout" of a non-file.
* lib/viewvc.py
(view_checkout): If the target isn't a file, raise a
ViewVCException().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2541 8cb11bc2-c004-0410-86c3-e597b4017df7
(main): Fix broken option handling: -d expected an argument, -c
didn't and was doubly associated with both --config-file and
--htpasswd-file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2538 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* templates/roots.ezt
Also show the last author, and mark only the "Name" header as the
sort choice.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2519 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
view").
* lib/viewvc.py
(_re_rewrite_escaped_url): New compiled regexp.
(markup_escaped_urls): New helper function.
(markup_stream_pygments): Use markup_escaped_urls() to wrap URLs in
<a> tags, something Pygments won't do for us.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2514 8cb11bc2-c004-0410-86c3-e597b4017df7
(canonicalize_rootpath): Per the thought found in issue #446
("Specifying repo location using file:// prefix in svn_roots leads
to lack of hyperlinks on revision view"), convert file:/// and
file://localhost/ URLs into local paths.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2512 8cb11bc2-c004-0410-86c3-e597b4017df7
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
(ViewVCAuthorizer._get_paths_for_root): Trap and return a cleaned-up
error when the authzfile isn't parse-able.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2505 8cb11bc2-c004-0410-86c3-e597b4017df7
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
Patch by: Craig Leres <leres@tigris.org>
Expanded by: me
The original version of this patch was submitted to cvs2svn issue #141:
http://cvs2svn.tigris.org/issues/show_bug.cgi?id=141
* lib/vclib/ccvs/rcsparse/common.py
(_Parser._parse_rcs_tree_entry): If there is an error when parsing a
CVS timestamp, include the revision number in the exception message.
The calendar.timegm() function is not very picky, but it does emit an
error if the month number is invalid.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2495 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
(_path_join): Fix one of my more pathetic coding errors. (How do
you lose track of the proper valid variable name in a two-line
function. Honestly...)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2490 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_markup, view_annotate): Raise a more graceful error message
when asked for markup or annotate view on a non-file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2480 8cb11bc2-c004-0410-86c3-e597b4017df7
(has_crypt, _check_passwd): If 'crypt' isn't available, look for
'fcrypt' and use it instead.
(main): Always show --htpasswd-file option, but raise an informative
error if someone tries to use it when there's no cryptographic support.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2478 8cb11bc2-c004-0410-86c3-e597b4017df7
'crypt'") by making htpasswd file support optional (based on the
availability of the 'crypt' module).
* bin/standalone.py
(): Conditionally import 'crypt' and define _check_passwd() helper function.
(ViewVCHTTPRequestHandler.validate_password): Use _check_passwd() now.
(main): Conditionally built accepted options list and usage string based
on whether 'crypt' is available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2473 8cb11bc2-c004-0410-86c3-e597b4017df7
length when compression would skew that.
* lib/viewvc.py
(get_writeready_server_file): Add optional 'content_length'
parameter, and the code to handle it.
(view_doc): Update call to get_writeready_server_file().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2471 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/sapi.py
(WsgiServer.FieldStorage): Don't pass self._headers to
cgi.FieldStorage() -- that parameter is for *input* headers, and
self._headers is a collection of output headers.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2459 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
Lose more explicit invocations of 'string' module functions (which
no worky because we aren't importing that module any more).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2457 8cb11bc2-c004-0410-86c3-e597b4017df7
Tweak the release procedure to include pegging the externals
definition which pulls in the 'templates-contrib' subdirectory.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2452 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(_re_rewrite_svnrevref): New regular expression.
(ViewVCHtmlFormatter.format_svnrevref): New.
(format_log): Accept 'request' parameter instead of 'cfg' (which can
be obtained via the request). For Subversion repositories,
register a formatter which marks up revision references as links
to the revision view.
(): Update callers of format_log().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2439 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
(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
property, and use it to inform Pygments as to the file's encoding in
the markup and annotate views (while still providing that information
to the user agent in the checkout view).
* lib/viewvc.py
(parse_mime_type): New helper function.
(calculate_mime_type): Now also return the encoding as possibly
parsed from the svn:mime-type property. Callers updated.
(get_writeready_server_file): Add 'encoding' parameter.
(markup_stream_pygments): Add 'encoding' parameter which, if
provided, becomes the encoding passed to Pygments.
(view_checkout): Pass the encoding as/if provided by calculate_mime_type()
to get_writeready_server_file().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2430 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
(ViewVCHtmlFormatter): Was HtmlFormatter. Which, uh, has the same
name as an object imported from Pygments.
(format_log): Track renamed class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2426 8cb11bc2-c004-0410-86c3-e597b4017df7
display node kind information and, by extension, links to the markup
and diff views for files.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository._revinfo_raw): Tweak _log_cb() inner
function to make use of the svn_log_changed_path2_t information
where available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2424 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/standalone.py
(Options.htpasswd_file): New variable.
(AuthenticationException): New.
(ViewVCHTTPRequestHandler.handle_request): Handle AuthenticationException.
(ViewVCHTTPRequestHandler.validate_password): New.
(ViewVCHTTPRequestHandler.run_viewvc): If htpasswd authentication is
enabled, then complain about missing authn creds, and validated
any presented creds.
(main): Present and handle the new --htpasswd-file option. Also, do
some rudimentary validation of --htpasswd-file and --config-file values.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2414 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/standalone.py
(NotViewVCLocationException): New exception.
(ViewVCHTTPRequestHandler.do_GET, ViewVCHTTPRequestHandler.do_POST):
Now just thin wrappers around...
(ViewVCHTTPRequestHandler.handle_request): ...this new function.
(ViewVCHTTPRequestHandler.is_viewvc): Allow for the case where the
script alias is empty (a server root deployment).
(ViewVCHTTPRequestHandler.redirect): Remove as unused (the code's
been merged into handle_request()).
(ViewVCHTTPRequestHandler.run_viewvc): Do the is_viewvc() check here
now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2411 8cb11bc2-c004-0410-86c3-e597b4017df7
simpler, but I've not done it justice in terms of upkeep.
* bin/standalone.py
(__author__, __date__, __version__, __credits__): Removed in favor of a
a simple header comment.
(Options.start_gui): Removed this member variable.
(nogui, gui): Removed.
(main): Was 'cli'. Remove all option handling for, and usage
references to, GUI mode.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2409 8cb11bc2-c004-0410-86c3-e597b4017df7
(Options): Minor formatting and noop logic changes.
(ViewVCHTTPServer): Was ViewVC_Server; move to module scope.
(ViewVCHTTPRequestHandler): Was ViewVC_Handler; move to module scope.
(serve): Track class renames.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2408 8cb11bc2-c004-0410-86c3-e597b4017df7
Reformat this file for consistency with other bits of ViewVC. There
*should* be no meaningful logic changes in this commit. (If there
are, it's probably a mistake.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2407 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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
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
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
option.
* conf/viewvc.conf.dist
(root_parents): Rewrite the documentation for this to be more clear
and to note the valid root type strings.
* lib/viewvc.py
(Request.run_viewvc, expand_root_parents): Make some error strings
provide more helpful information.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2399 8cb11bc2-c004-0410-86c3-e597b4017df7
non-existent repository.
* bin/svndbadmin
(main): Do repository existence checking here, like the corresponding
code in cvsdbadmin does. (In fact, structure this function like that
corresponding cvsdbadmin code.)
(__main__): No longer do existence checks here.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2379 8cb11bc2-c004-0410-86c3-e597b4017df7
<title>.
* templates/rss.ezt
Apply the necessary formatting for RSS feed title and description
elements. Too bad so many readers have developed their own
individual ideas about presentation of this under-documented format.
(See also r2376.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2377 8cb11bc2-c004-0410-86c3-e597b4017df7
current only-use-the-most-recently-noticed formatter approach.
* lib/ezt.py
(Template._cmd_format): Rename 'printer' parameter to 'formatter'.
(_print_formatted): New helper function.
(_write_value): Now pop/restore the whole stack of formatters, and
use _print_formatted() to do the real output writing.
(Context.__init__): Rename 'printers' member to 'formatters'.
Consumers updated.
(_raw_formatter, _html_formatter, _uri_formatter): Renamed from
_raw_printer(), _html_printer(), and _uri_printer() respectively.
Consumers updated.
(_xml_formatter): New.
(_formatters): Renamed from _printers. Consumers updated.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2376 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/ccvs/rcsparse/default.py
(_TokenStream): Convert token_term into a frozenset if the Python
version supports such.
(_TokenStream.get): Remove unnecessary buffer length calculations.
Patch by: Brian Harring <ferringb{_AT_}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2372 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/sapi.py
(escape): Ensure that the input is string-ified before doing string
transformations on it.
Patch by: Michael Henry <drmikehenry{__AT__}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2369 8cb11bc2-c004-0410-86c3-e597b4017df7
Fix some formatting, and -- Ooh! Did you see that? Why, yes, I
*did* just pull on some armor-plated underwear in the WSGI
deployment section.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2367 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_revision): Include a self-referential 'revision_href' item in
the template data dictionary.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2362 8cb11bc2-c004-0410-86c3-e597b4017df7
the ViewVC codebase. Simplify, conjoin, remove, etc.
* lib/sapi.py
(escape): New function. *The* preferred HTML-escaping mechanism.
(Server.escape): New common Server object escape mechanism (which
uses the aforementioned escape(), of course).
(CgiServer.escape, WsgiServer.escape, AspServer.escape,
ModPythonServer.escape): Lose as unnecessary.
* lib/viewvc.py
(Request.get_form): Escape hidden form variable names and values.
(htmlify): Remove.
(): Replace all uses of cgi.escape() and htmlify() with (directly or
indirectly) sapi.escape().
* lib/query.py
(main): Use server.escape() instead of cgi.escape().
* lib/blame.py
(HTMLBlameSource.__getitem__): Use sapi.escape() instead of
cgi.escape().
* lib/idiff.py
(_mdiff_split, _differ_split): Use sapi.escape() instead of
cgi.escape().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2344 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_queryform): Escape user-provided input before passing it
directly off to the templates. Can you say "XSS attack vector"?
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2326 8cb11bc2-c004-0410-86c3-e597b4017df7
(query_backup): Switch to using the sapi interface for output file
I/O instead of using 'print'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2325 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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
Comment tweaks, primarily to note in the authorizer parameter
sections that those options only apply when 'authorizer' has been
set to the correct respective authorizer name.
Suggested by: Dan Poirier <poirier{_AT_}pobox.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2318 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
(docroot): Add admonishment about how this interplays with per-root
configuration of the 'template_dir' option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2308 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
whose primary navigation links aren't preserved on every page.
* viewvc.org/who.html,
* viewvc.org/faq.html,
* viewvc.org/download.html,
* viewvc.org/contact.html
Lose the 'Project Page' and 'Contributing' nav links.
* viewvc.org/index.html
Lose the 'Project Page' and 'Contributing' nav links. Put the
(short) license on this page.
* viewvc.org/contributing.html
Lose the 'Project Page' and 'Contributing' nav links. Put info
about the viewvc.tigris.org site on this page.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2295 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
(common_template_data): Default 'roots_href' to None, and only
populate it if the roots listing is one of the configured allowed
views.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2288 8cb11bc2-c004-0410-86c3-e597b4017df7
Defer validation of certain query-view-related input whose format is
unknown at the time of validation. That includes all the form fields
whose interpretation (as an exact match, a blog, a regular expression,
etc.) changes based on the another field's value. Instead, do that
validation in the view funcs themselves.
* lib/viewvc.py
(_legal_params): Set the validator for the 'branch', 'file', 'who',
and 'comment' parameters to None.
(validate_query_args): New function for more careful query arg validation.
(view_queryform, view_query): Call validate_query_args().
Tested by: Jon Foster <jonfoster{_AT_}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2286 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
values as we do for revision property values.
* lib/viewvc.py
(get_itemprops): Pass property values through format_log().
Patch by: Senthil Kumaran S <senthil@collab.net>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2277 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_diff): Use repos.itemlog() to fetch revision metadata about
the left- and right-hand diff objects and expose 'author', 'log',
'ago', and 'size' to the templates.
* docs/template-authoring-guide.html
Document the newly added template data dictionary items.
* templates/diff.ezt
Display the revision authors in the diff view.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2275 8cb11bc2-c004-0410-86c3-e597b4017df7
a single character.
* lib/viewvc.py
(build_commit): Fix calls to format_log(). It turns out that
parameter ordering is, you know, somewhat important.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2273 8cb11bc2-c004-0410-86c3-e597b4017df7
(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
(utilities): Clarify what we mean by "the directories in which
certain programs live".
Suggested by: Eric McCarty <emccarty{_AT_}ostendo.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2261 8cb11bc2-c004-0410-86c3-e597b4017df7
(HtmlFormatter._tokenize_text): Give preference to the longer of
overlapping matches that begin at the same point. Add some
comments that better explain what we're doing.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2257 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(HtmlFormatter): Add docstring.
(HtmlFormatter.get_result): Now return the total number of readable
characters, too.
(format_log): Update expected return values from lf.get_result().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2255 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewvc-install
(TREE_LIST): Add a new field -- a boolean "is-optional" flag.
(install_tree): New parameter 'is_optional', used to avoid whining when
something in the source tree is missing.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2252 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_diff): Tweak some logic ordering, and ensure that 'changes' is
initialized as a sequence (instead of None) as some template logic
paths seem to care.
Reported by: Lawrence Cutlip-Mason <rena.larry.cm{_AT_}gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2251 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
indicate that truncation happened (so callers can tack on an ellipsis
or somesuch).
* lib/viewvc.py
(HtmlFormatter.format_email_truncated): Fix logic to use ellipsis
for mangling but not for truncation. (Also fix an off-by-one
error in the logic.)
(HtmlFormatter.get_result): Now return the result string and a
"was-truncated" flag.
(format_log): Update call to HtmlFormatter.get_result, and tack on
an ellipsis if the log was truncated.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2247 8cb11bc2-c004-0410-86c3-e597b4017df7
userdata along with the log message formatters for use by the
conversion functions. While ViewVC doesn't use this right now, the
feature has proven useful in writing an add-on that allows somewhat
generic highlighting of issue/bug IDs to URLs.
* lib/viewvc.py
(HtmlFormatToken): Remove.
(HtmlFormatter.format_url, HtmlFormatter.format_email_obfuscated,
HtmlFormatter.format_email_truncated, HtmlFormatter.format_email,
HtmlFormatter.format_text): Now accept (unused) 'userdata' parameter.
(HtmlFormatter.add_formatter): Now accept 'userdata' parameter, associated
with the formatter for future use.
(HtmlFormatter.get_result): Pass the 'userdata' from the token to its
converter.
(HtmlFormatter._tokenize_text): Switch to using _item()s instead of
HtmlFormatTokens. Associate with each item the userdata for its converter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2245 8cb11bc2-c004-0410-86c3-e597b4017df7
and I think, actually fix ancient issue #3 ("URL cut off in elipsis")!
Incidentally, this change also makes the email address obfuscation
stuff work as documented. Not sure how I started munging data when
mangle_email_addresses=1 (by substituting " at " for the at-sign), but
no more.
* lib/viewvc.py
(htmlify): Drop 'mangle_email_addresses' parameter, which was mostly
unused, and no longer do anything except very basic HTML encoding.
Callers updated.
(_re_rewrite_url): Tweak to match *non*-HTML-encoded URLs now.
(HtmlFormatToken, HtmlFormatter): New classes for log formatting.
(mangle_email_addresses): Remove as unused.
(format_log): Add 'maxlen' parameter, allowing this function to be used
for both long- and short-form log message formatting.
(copy_stream): Drop unnecessary 'cfg' parameter. Update call to htmlify().
(MarkupPipeWrapper.__init__): Drop 'cfg' parameter as unused.
(MarkupPipeWrapper.__call__): Update call to htmlify().
(markup_or_annotate, view_revision, view_directory, view_log,
build_commit): Use format_log() to format both long- and
short-form log messages.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2244 8cb11bc2-c004-0410-86c3-e597b4017df7
A fix for potential bug when no Subversion repositories are visible
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@206 6955db30-a419-402b-8a0d-67ecbb4d7f56
markup/annotate views.
* templates/file.ezt
Add some customizable template logic to hide the contents of file's with
non-human-readable file formats. Were Greg Stein dead, he'd be rolling
over in his grave right now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2228 8cb11bc2-c004-0410-86c3-e597b4017df7
(view_error): Settle for simple HTML-escaping of error messages
rather than full htmlification.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2225 8cb11bc2-c004-0410-86c3-e597b4017df7
files.
* lib/viewvc.py
(markup_stream_pygments): Pass stripnl=False to Pygments lexers so
they won't strip out leading blank lines from the files they are
colorizing.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2223 8cb11bc2-c004-0410-86c3-e597b4017df7
like this:
http://localhost/viewvc/subversion/?view=foo%22)%20was%20passed\
%20as%20a%20parameter.20%20Visit%20http://www.baddy.com%20to%20\
figure%20out%20why%20(%22foo
Would result in an error page that read as follows:
An illegal value ("foo") was passed as a parameter. Visit
http://www.baddy.com to figure out why ("foo") was passed as a
parameter.
(where "http://www.baddy.com" was linkified, and could potentially
point to a malicious website.)
With this change, we will avoid printing unknown parameter names, and
will show the parameter name rather its value when a bogus value is
detected. Yes, there's admittedly some information loss here that
might be useful to the well-meaning but fat-fingered user, but the
security aspect is more important.
* lib/viewvc.py
(_validate_param): Don't print illegal parameter names, and show the
(legal) parameter name rather than its value when that value is
illegal.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2217 8cb11bc2-c004-0410-86c3-e597b4017df7
tightening up some other bits.
* lib/viewvc.py
(_validate_view, _validate_mimetype): New validation functions.
(_re_validate_mimetype): Removed as unused.
(_legal_params): Tweak the validation routines for 'view' and
'content-type' to point to _validate_view() and _validate_mimetype(),
respectively.
(_validate_param): Now check for non-zero result from validation
functions as the "valid" indicator, rather than requiring each of
them to raise an exception in troubled times.
(Request.run_viewvc): Lose now-unnecessary validation of
'content-type' parameter -- the normal parameter validation stuff
should catch problems there.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2213 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewvc): Move the logic that maps view=rev to
view=revision into the parameter validation loop.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2212 8cb11bc2-c004-0410-86c3-e597b4017df7
(Request.run_viewvc): Use an intermediate variable to simplify some
logic around input parameter validation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2211 8cb11bc2-c004-0410-86c3-e597b4017df7
Comment out all the options here, forcing folks to uncomment the
stuff they want to modify. This allows the parsing of this file to
be optimized toward doing less work, while maintaining a consistent
initial presentation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2207 8cb11bc2-c004-0410-86c3-e597b4017df7
(This doesn't really fix anything, and hopefully doesn't break anything
either, but is merely a "good programming practice" cleanup item.)
* lib/viewvc.py
(Request.run_viewvc): Ensure that server.redirect() is the last
thing this function does (when it does it).
* lib/sapi.py
(CgiServer.redirect): Avoid calling sys.exit(). Also, fix a use of
print() that should be sys.stdout.write() (for consistency).
(AspServer.redirect, ModPythonServer.redirect): Avoid calling sys.exit().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2205 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
* lib/viewvc.py
(_re_validate_boolint): New.
(_legal_params): Switch the validation function to _re_validate_boolint
for the following: 'hideattic', 'makeimage', 'parent', 'tarball',
and 'hidecvsroot'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2199 8cb11bc2-c004-0410-86c3-e597b4017df7
complain about unknown repositories.
* bin/svndbadmin
(main): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
* bin/cvsdbadmin
(__main__): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2195 8cb11bc2-c004-0410-86c3-e597b4017df7
case-handling semantics.
* conf/viewvc.conf.dist
(force_username_case): New option.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.__init__): Find and handle new force_username_case
authorizer option.
(ViewVCAuthorizer._get_paths_for_root): Replace ConfigParser.optionxform()
(which does normalization of option names) with an identity function
of sorts.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2192 8cb11bc2-c004-0410-86c3-e597b4017df7
Use "Contents of /path/to/file" instead of "Annotate of /path/to/file" as
the page title.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2181 8cb11bc2-c004-0410-86c3-e597b4017df7
commit/repository info.
* lib/cvsdb.py
(CheckinDatabase.PurgeRepository): Clear all the ID caches after
running a purge operation so that, if the purge is actually part
of a rebuild, the subsequent update doesn't merely pull IDs from
the cache (with the side-effect of not readding them to the database).
Reported by: Naran Babhu <naranbabhu{_AT_}tigris.org
Martin Dessureault <martin{_AT_}austin.rr.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2178 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_queryform): Add 'query_action' and 'query_hidden_values' back
to the data dictionary, as they were accidentally dropped in r2123.
Reported by: Naran Babhu <naranbabhu{_AT_}tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2175 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
correctly, and we don't need a toggle for 'enscript' any more.
* bin/standalone.py
(GUI.__init__): Pass the configuration file to handle_config().
Lose 'enscript'-related stuff.
(GUI.toggle_use_enscript): Remove.
(cli): Fix call to gui(), dropping bogus parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2140 8cb11bc2-c004-0410-86c3-e597b4017df7
remote Subversion directory view.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.dirlogs): Store the entry's revision as
a string, for consistency with other vclib modules.
Reported by: Wojciech Wróblewski <wojtek{_AT_}elmi.pl>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2137 8cb11bc2-c004-0410-86c3-e597b4017df7
Make this able to build any branch, not just trunk and tag names.
* notes/releases.txt
Update example of using make-release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2128 8cb11bc2-c004-0410-86c3-e597b4017df7
404 not found on log_href's of removed files
More request.roottype ---> my_repos['roottype']
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@157 6955db30-a419-402b-8a0d-67ecbb4d7f56
(view_directory, view_log): Add some comments explaining the
presence of certain data dictionary dummy values.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2124 8cb11bc2-c004-0410-86c3-e597b4017df7
in all of its templated views. Do this with a custom, dictionary-like
class that prevents the creation of new keys after an initial
instantiation of keys and (possibly dummy) values.
* lib/ezt.py
(TemplateData): New.
* lib/viewvc.py
(common_template_data): Now return an ezt.TemplateData() object.
(make_comma_sep_list_string): New.
(markup_or_annotate): Use new ezt.TemplateData() interface now. Use
make_comma_sep_list_string() where applicable.
(view_roots, view_log, view_cvsgraph, view_diff, view_revision,
view_queryform, view_query): Use new ezt.TemplateData() interface now.
(view_directory): Use new ezt.TemplateData() interface now. Drop
'search_re_form' dictionary item.
* lib/query.py
(main): Use new ezt.TemplateData() interface now. While here, drop
'script_name' calculation (it isn't used).
* templates/include/dir_header.ezt
Display the search form if 'search_re_action' is set, not 'search_re_form'.
* docs/template-authoring-guide.html
Remove 'search_re_form'. Update 'search_re_action' description.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2123 8cb11bc2-c004-0410-86c3-e597b4017df7
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
(Template._cmd_for): Raise a more useful exception message when the
to-be-looped-over variable ain't a sequence.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2115 8cb11bc2-c004-0410-86c3-e597b4017df7
(Template._cmd_print): Raise a more helpful exception to give some
clues to template authors who tried to, say, print a sequence
reference.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2111 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
don't imply that it does in the UI.
* lib/viewvc.py
(view_directory): Don't provide sortby_rev_href to the template.
* templates/directory.ezt
Only offer sort links when those links are provided by ViewVC.
* templates/dir_new.ezt
Only offer sort links when those links are provided by ViewVC. Use
date-based sorting if rev-based sorting isn't available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2090 8cb11bc2-c004-0410-86c3-e597b4017df7
Look in CVS/SVN/All repos link on query results page
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@121 6955db30-a419-402b-8a0d-67ecbb4d7f56
vclib layer for revision-sorted output rather than "whatever you want
to give me".
* lib/viewvc.py
(markup_or_annotate): Pass vclib.SORTBY_REV instead of vclib.SORTBY_DEFAULT
to the itemlog() interface.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2086 8cb11bc2-c004-0410-86c3-e597b4017df7
from an email response I gave on the dev@ list. Will massage this
into something a little more ready for publicity later.
* docs/release-notes,
* docs/release-notes/1.1.0.html
New.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2085 8cb11bc2-c004-0410-86c3-e597b4017df7
!!previous commit also was related to bug 45675
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@100 6955db30-a419-402b-8a0d-67ecbb4d7f56
to it for line number columns in the diff view.
* templates/docroot/styles.css
(.vc_diff_line_number): New.
* templates/diff.ezt
Use new vc_diff_line_number class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2083 8cb11bc2-c004-0410-86c3-e597b4017df7
effectively allowing for non-interactive operation.
* bin/make-database
(INTRO_TEXT): Removed, merged into the usage message printed by...
(usage_and_exit): ...this new function.
(__main__): Add new command-line parsing logic, including support of
new options (--username, --hostname, --password, --dbname) and the
replacement of the --bonsai-compatible option with a more generic
--version.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2079 8cb11bc2-c004-0410-86c3-e597b4017df7
'commits' in schema version 1 (so that old version-ignorant code will
croak on a version-1 database).
* lib/cvsdb.py
(CheckinDatabase.AddCommit, CheckinDatabase.CreateSQLQueryString,
CheckinDatabase.CheckCommit, CheckinDatabase.sql_delete,
CheckinDatabase.PurgeRepository): Account for the fact that in
version 1 of the commits database schema, the 'checkins' table has
been renamed to 'commits'.
* bin/make-database
(DATABASE_SCRIPT_VERSION_1): Rename the 'checkins' table to 'commits'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-366-dev@2075 8cb11bc2-c004-0410-86c3-e597b4017df7
commits database schema, and use it (when present) in the 'purge'
operation.
* lib/cvsdb.py
(CheckinDatabase.sql_purge): New function.
(CheckinDatabase.PurgeRepository): If we have a schema version that
supports it, use a much faster approach of purging. Otherwise, we
have to suffer through a slow purge process.
* bin/make-database
(DATABASE_SCRIPT_VERSION_1): Add a new index of 'descid's to the
'checkins' table.
Patch (mostly) by: Larry Shatzer, Jr. <larrys@gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-366-dev@2074 8cb11bc2-c004-0410-86c3-e597b4017df7
schema that includes a `metadata' table (in which may be found the
schema version).
* lib/cvsdb.py
(CVSDB_VERSION): New global variable.
(CheckinDatabase.__init__): Init a new _version variable.
(CheckinDatabase.Connect): Fetch a list of tables and see if the new
`metadata' table is present. If so, use it to query the database
schema version. (Else, assume version 0.)
(CheckinDatabase.GetTableList, CheckinDatabase.GetMetadataValue,
CheckinDatabase.SetMetadataValue): New functions.
* bin/make-database
Rework this to be able to write two different schemas -- the
original, Bonsai-compatible one, and a new one -- triggered by the
presence/absence of a command-line --bonsai-compatible parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-366-dev@2073 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewvc.py
(view_revision): Add new 'num_changes' data dictionary item.
* templates/revision.ezt
Expose new 'num_changes' item as a header on this page, and tweak
the way the more/first changes links appear.
* docs/template-authoring-guide.html
Document num_changes dictionary item.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2067 8cb11bc2-c004-0410-86c3-e597b4017df7
files).
* lib/viewvc.py
(markup_or_annotate): Make the default value for the 'annotation'
data dictionary member 'none' (instead of None) to simplify
template logic.
* docs/template-authoring-guide.html
Update docs for 'annotated'.
* templates/file.ezt
Use simplified logic to avoid missing links. (No, not *that* kind ...)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2064 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
and have that mean "use an authorizer". So let's just prevent that
confusion right now, okay?
* lib/config.py
(Config.set_defaults): Set 'authorizer' by default to None.
* viewvc.conf.dist
(authorizer): Update comments for correctness, and don't imply that
"forbidden" is the default authorizer.
* docs/upgrading-howto.html
Stop saying that "forbidden" is the default authorizer.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2053 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* lib/debug.py
(t_dump): Was dump(). Now accepts an output file handle, and sorts
the output in a predictable fashion.
* lib/viewvc.py
(main): Track changes to debug.dump().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2048 8cb11bc2-c004-0410-86c3-e597b4017df7
use an ad-hoc class to hold all that stuff instead.
* lib/viewvc.py
(get_file_view_info): Now return an object with interesting member variables
instead of a nasty long list of values in an easy-to-goof-up order.
(common_template_data, view_directory, view_log, view_diff): Update
uses of get_file_view_info to track new calling semantics.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2047 8cb11bc2-c004-0410-86c3-e597b4017df7
Ability to connect to MySQL through UNIX socket
diff links in query.py are shown now (moved expand_root_parents to config.py)
full-text comment searches in query and query_form are supported using MySQL FULLTEXT indexes
<select> for repository selection in query
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@5 6955db30-a419-402b-8a0d-67ecbb4d7f56
* viewvc.org/index.html
Lose 'Future Plans' section, and overhaul the feature and requirements lists.
* viewvc.org/contributing.html
Fix the link to the Template Authoring Guide.
* viewvc.org/download.html
Add a section for upgrading existing ViewVC installations.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2044 8cb11bc2-c004-0410-86c3-e597b4017df7
Author(s): C. Michael Pilato <cmpilato@red-bean.com>
Compatibility: ViewVC 1.1
The "newvc" template set uses top navigation tabs to flip between
various views of a file or directory, and aims for a clean-yet-modern
look and feel.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.