(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