Commit Graph

355 Commits (56c2b61458742e54b871fa0d3ce4ce289748a40a)

Author SHA1 Message Date
Vitaliy Filippov 56c2b61458 Merge with original r2905 2013-07-18 19:13:28 +04:00
vfilippov e854e254f9 Bug 106871
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1603 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:12:23 +04:00
vfilippov 24b979d9e2 Bug 88900 - Force cvs_ondisk_charset
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1451 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:05 +04:00
vfilippov 7d06bd21bc Bug 82651
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1447 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:05 +04:00
vfilippov 76987f0851 Bug 82651 - Retrieve text file contents from SVN when searching (debug)
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1444 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov 928bf6f1a6 Bug 82651 - Retrieve text file contents from SVN when searching
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1443 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov e8c05fc096 Bug 87133
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1423 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:03 +04:00
vfilippov 999c9de4d3 Bug 87501 - Add must-revalidate headers
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1422 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:03 +04:00
vfilippov 131171943d Bug 87501 - Guess for full diff
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1421 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:03 +04:00
vfilippov e415cd7bb0 Bug 87501 - init charset guesser
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1417 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:03 +04:00
vfilippov e363cf19b1 Bug 82651 - Tika&Sphinx&chardet content indexing (done!)
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1388 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:00 +04:00
vfilippov 83c7e6fe49 Bug 82651
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1371 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:00 +04:00
vfilippov 7eb621bcd1 Bug 76690 - Optimize "only svn" / "only cvs"
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1230 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:59 +04:00
vfilippov 33fffa82e8 Bug 71273 - Fix exception in ViewVC diffs
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1041 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:58 +04:00
vfilippov 94c0c90329 Bug 63447 - include fof_sudo in rss links
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@879 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:58 +04:00
vfilippov a4c3bd1a46 Bug 63447
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@877 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:57 +04:00
vfilippov 1cda6497e1 Debug "unsecure patch" detection for queries across multiple repos,
debug vcauth grp


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@771 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:56 +04:00
vfilippov b9f2b63c09 Bug 45675: Bug 60603 displayed an empty patch
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@661 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:56 +04:00
vfilippov b1cffd5f2d Bug 60409 - Output correct link rel=self in RSS feeds
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@644 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:56 +04:00
vfilippov 323a4d5629 Bug 59499
Show diffs for moved files in query results


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@633 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04:00
vfilippov bf062cc41b Bug 57245
Hyperlink bug URLs

[rewritehtml]
name.find = REGEXP
name.replace = REPLACEMENT


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@537 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04:00
vfilippov e17b0dce21 Bug 56474
Honor repository for build_commit


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@518 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04:00
vfilippov 964531a7a9 Bug 37020
mystical empty diffs


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@421 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:54 +04:00
vfilippov 4304976db7 Bug 37020
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@280 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:54 +04:00
vfilippov e78c234550 Bug 37020
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
2013-07-18 17:06:54 +04:00
vfilippov 8367e08370 Bug 37020
Don't verify comments


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@270 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:54 +04:00
cmpilato 4251b52987 Fix buglet in (unused) ViewVCHtmlFormatter.get_result() function.
* 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
2013-07-10 16:29:13 +00:00
cmpilato aa724feae4 Fix issue #527 ("ViewVC markup/annotate views raise exceptions
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
2013-04-25 14:52:58 +00:00
cmpilato a1fd08948a * lib/viewvc.py
(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
2013-04-23 20:17:01 +00:00
cmpilato a4ad1b13c2 * lib/viewvc.py
(make_time_string): A little syntax change to be more Pythonic.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2881 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-19 20:34:46 +00:00
cmpilato 1f58e41376 Finish issue #46 ("ISO 8601 date/time format").
* lib/viewvc.py
  (make_time_string): If cfg.options.iso8601_timestamps is set,
    generate ISO-8601-compliant timestamp strings.

* lib/config.py
  (Config.set_defaults): Initialize 'iso8601_timestamps' option value.

* conf/viewvc.conf.dist
  (iso8601_timestamps): New option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2880 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-19 20:31:15 +00:00
cmpilato 4fd9cc0811 Fix some latent bugs whitespace handling.
* 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
2013-04-18 13:49:15 +00:00
cmpilato 6406b106a1 More work on issue #11 ("Universal UTF-8 output from ViewVC").
* 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
2013-04-17 17:59:41 +00:00
cmpilato a2090ce90b Make some additional dents on issue #11 ("Universal UTF-8 output from
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
2013-04-17 15:23:42 +00:00
cmpilato 0ca6106034 Fix issue #525 ("Tarball output is double-compressed when
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
2013-04-16 18:15:50 +00:00
cmpilato 801eaff764 Fix an ancient code concern by no longer reading file content fully
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
2013-04-15 19:06:30 +00:00
cmpilato 1ca3dc4195 Fix issue #524 ("Give administrators a way to limit the size of files
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
2013-04-15 19:04:40 +00:00
cmpilato b67254fcf2 Optimize the mapping of a single root name to a root path by avoiding
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
2013-03-20 13:15:34 +00:00
cmpilato decb5e375b * lib/viewvc.py
Drop in some more timestamp debugging sections.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2860 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-03-18 18:38:51 +00:00
cmpilato ab923539dd Finish issue #487 ("Preserve Subversion symlinks in generated tarballs")
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
2013-03-04 19:37:31 +00:00
cmpilato 701ba24454 * lib/viewvc.py
(generate_tarball_header): Indentation fixes only.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2854 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-03-04 16:52:19 +00:00
cmpilato eaeb527802 * lib/viewvc.py
Fix spelling error ('typefrag' should be 'typeflag') throughout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2853 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-03-04 16:51:38 +00:00
cmpilato 572554fa89 * lib/viewvc.py
(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
2013-02-22 16:34:10 +00:00
cmpilato f48add83f7 Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2820 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-01-04 19:01:54 +00:00
cmpilato b57831ade8 Fix the handling of diff options throughout.
* 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
2012-10-25 20:21:13 +00:00
cmpilato 19818e269c * lib/viewvc.py
(view_patch): Honor the "show functions" option when generating
    patches, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2817 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-25 20:14:16 +00:00
cmpilato dcb7e17dc6 Fix issue #516 ("Regression: UnboundLocalError: local variable
'log_pagestart' referenced before assignment").

* lib/viewvc.py
  (view_log): Initialize the 'log_pagestart' variable.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2808 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-25 13:46:15 +00:00
cmpilato de517ae29c Fix issue #515 ("XSS bug in diff view (CVE-2012-4533)").
* 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
2012-10-24 13:26:36 +00:00
cmpilato f4945fd7d9 Oops! Fix the diff view I broke in r2784.
* 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
2012-10-03 14:33:38 +00:00
cmpilato 4590ebbd6b Fix issue #512 ("'Select for diffs' does not work across pages").
* 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
2012-10-03 14:22:48 +00:00