Commit Graph

2404 Commits (master)

Author SHA1 Message Date
cmpilato 89d478a933 Bump latest advertised release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2899 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-24 13:31:36 +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 d2e7f4aff2 * lib/vclib/ccvs/__init__.py
(find_root_in_parent): Minor comment tweak only.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2893 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-23 18:53:15 +00:00
cmpilato ece31e7369 * lib/vclib/ccvs/__init__.py
(_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
2013-04-23 18:49:10 +00:00
cmpilato 16d7e0af8a Fix issue #526 ("Subversion roots not longer accessible").
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
2013-04-23 18:43:15 +00:00
cmpilato 75e503a16b * CHANGES
Merge in 1.1.19 changes.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2888 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-22 19:28:18 +00:00
cmpilato 3fbaffa2fd Bump latest advertised release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2885 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-22 19:20:06 +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 7026dcb498 Fix an exception recently introduced.
* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.filesize): Recombine path_parts before
    calling _get_dirents().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2874 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-04-17 18:16:48 +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 814bee3e4a Over in Subversion-land, I finally got around to exposing the
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
2013-04-12 15:05:28 +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 af996b9b49 Finish issue #487 ("Preserve Subversion symlinks in generated
tarballs") for remote Subversion repositories, too.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository.get_symlink_target): New function.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2858 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-03-04 20:23:09 +00:00
cmpilato 388c55e564 * lib/vclib/svn/svn_ra.py
(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
2013-03-04 19:57:35 +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 819915112e * templates/default/docroot/styles.css
Revert r2835.  Not liking the yellow.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2852 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-03-01 15:52:29 +00:00
cmpilato 33eeb41763 * CHANGES: Merge in 1.1.18's changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2851 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-28 19:34:22 +00:00
cmpilato 345e7ceb8d Bump the advertised latest release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2849 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-28 19:26:50 +00:00
cmpilato 63563517d7 * bin/make-database
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
2013-02-26 16:51:03 +00:00
cmpilato b8a7f32fb4 When querying the commits database, explicitly name columns in case
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
2013-02-26 16:43:12 +00:00
cmpilato 8854a73040 * bin/make-database
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
2013-02-26 16:15:35 +00:00
cmpilato 9b57e7d6a6 Fix issue #521 ("make-database does not allow the database port to be
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
2013-02-25 20:51:01 +00:00
cmpilato 3edd7de4d1 Fix issue #347 ("ccvs module handling of "dead" files doesn't jive
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
2013-02-25 20:35:56 +00:00
cmpilato 07ac7f5e54 Mark busted ,v files with no revisions as "absent" in the rcsparse-
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
2013-02-25 20:01:45 +00:00
cmpilato 41858c6f89 * templates/default/docroot/styles.css
Follow up to r2835, removing an unnecessary "!important" CSS
  declaration.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2836 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-22 16:56:26 +00:00
cmpilato bbe8b42877 * templates/default/docroot/styles.css
Highlight file content lines in yellow when hovered over.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2835 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-22 16:48:33 +00:00
cmpilato 3d3f677b3c * templates/default/file.ezt
Reduce a bit of redundancy.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2834 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-02-22 16:44:51 +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 281ed5ca84 Correct a royally botched CHANGES entry.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2830 8cb11bc2-c004-0410-86c3-e597b4017df7
2013-01-31 19:49:49 +00:00
cmpilato bb4a748eda Fix issue #519 ("Stack trace while accessing a BDB repository if last
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
2013-01-29 15:57:57 +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 0d1da3c79b * templates/default/include/diff_display.ezt
Show the "extra" diff info stuff, too.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2816 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-25 19:56:52 +00:00
cmpilato d018467937 Revert r2649, as the default templates *should* support the property
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
2012-10-25 19:16:18 +00:00
cmpilato cea54da382 * CHANGES
Merge 1.1.17 changes.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2812 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-25 14:06:06 +00:00
cmpilato 6fcc2b5992 Bump most recent reported release. Again.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2811 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-25 14:05:24 +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 e8f975475e Update link to the CHANGES file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2807 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-24 18:50:57 +00:00
cmpilato 06910f29e3 * CHANGES
Include 1.1.16 and 1.0.13 changes, too.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2806 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-24 18:46:52 +00:00
cmpilato 64b0994f2f Bump most stable release version.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2804 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-10-24 18:21:47 +00:00