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
* 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
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
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
(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
* 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
* 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