Commit Graph

2404 Commits (master)

Author SHA1 Message Date
cmpilato 6418278d55 * lib/vclib/svn/svn_repos.py
(_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
2012-01-03 15:18:21 +00:00
cmpilato 1dd1a21537 * lib/viewvc.py
(): 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
2011-12-12 20:01:30 +00:00
cmpilato 06a3feec90 Reintegrate the 'issue-495-dev' branch into the trunk. This
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
2011-12-06 14:22:48 +00:00
cmpilato a03cd82de5 On the 'issue-495-dev' branch, make what I think are some pretty
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
2011-12-05 21:11:29 +00:00
cmpilato 094024a0ec On the 'issue-495-dev' branch:
* lib/vclib/__init__.py
  (Repository.annotate): Rewrite docstring for clarity.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2697 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-05 20:06:11 +00:00
cmpilato 56e645ecb8 ### NOTE FROM THE FUTURE: This commit probably broke the ###
###  "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
2011-12-05 19:58:38 +00:00
cmpilato 2f722f39b9 On the 'issue-495-dev' branch:
* lib/viewvc.py
  (markup_stream): Was markup_stream_pygments().  Caller changed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2695 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-05 18:31:55 +00:00
cmpilato 402dfd831f On the 'issue-495-dev' branch:
* lib/viewvc.py
  (markup_stream_pygments): Remove level of indentation made
    unnecessary by r2693.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2694 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-05 18:30:50 +00:00
cmpilato 738d17f71f On the 'issue-495-dev' branch:
* 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
2011-12-05 18:28:05 +00:00
cmpilato fdc0bcd420 On the issue-495-dev branch: Add BRANCH-README.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2692 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 19:49:45 +00:00
cmpilato db032720a8 On the 'issue-495-dev' branch: Re-apply the most recently committed
(then reverted) bits of the issue #495 work.

* lib/viewvc.py (markup_stream_pygments)

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2691 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 19:48:24 +00:00
cmpilato c9256effc4 Create a branch for issue #495 development.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2690 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 19:38:59 +00:00
cmpilato b42a4a0915 * lib/viewvc.py
(markup_or_annotate): Don't show annotation warnings for markup
    views of images.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2688 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 18:35:01 +00:00
cmpilato d2275afb6d * lib/viewvc.py
(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
2011-12-02 18:18:23 +00:00
cmpilato 5db50e6bcc Revert r2657, r2680, and r2681, effectively removing support for
Pygments' lexer guessing functionality (closing the REOPENED bug issue
#501, and necessitating that feature issue #495 be itself REOPENED).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2684 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 17:51:41 +00:00
cmpilato 7b6ecd807c * templates/classic/file.ezt
Say "Content type" rather than "File MIME type".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2683 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-12-02 16:10:57 +00:00
cmpilato e8a0caeef5 *** THIS REVISION WAS REVERTED IN r2684 ***
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
2011-11-29 15:33:20 +00:00
cmpilato dfeb3b5d90 *** THIS REVISION WAS REVERTED IN r2684 ***
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
2011-11-29 15:25:00 +00:00
cmpilato 5943e01304 * lib/viewvc.py
(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
2011-11-29 15:17:59 +00:00
cmpilato 6a8d5debd6 Template-y changes for file views.
* 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
2011-11-29 14:59:49 +00:00
cmpilato 537c59c516 Port a change from the 'classic' templates to the new 'default' ones.
* 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
2011-11-18 20:31:59 +00:00
cmpilato 92b7b65707 Fix annotate views of files in Subversion repository whose paths
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
2011-11-14 21:28:46 +00:00
cmpilato 46e17662d5 Fix issue #499 ("svndbadmin fails on deleted files").
* 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
2011-11-14 20:14:14 +00:00
cmpilato 7ab960262a Merge in 1.1.12's CHANGES.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2670 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-03 14:45:17 +00:00
cmpilato 6f47cef67d Add a step to the release procedure.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2668 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-03 14:43:57 +00:00
cmpilato a592e3b0bc Bump latest version number.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2666 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-03 14:39:40 +00:00
cmpilato 94d9f0ef49 * templates/default/log.ezt,
* templates/default/include/pathrev_form.ezt,
* templates/default/directory.ezt,
* templates/default/diff.ezt,
* templates/default/docroot/styles.css
  Still more template stylistic tweaks.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2662 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-01 18:45:27 +00:00
cmpilato b566f297b3 * templates/default/include/diff_display.ezt
Track recent rename of diffs.display_as to diffs.diff_block_format.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2661 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-11-01 14:14:40 +00:00
cmpilato a6be4da978 * templates/default/log.ezt,
* 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
2011-11-01 14:12:58 +00:00
cmpilato 8cdccc1ea5 Fix a bug which prevented certain directory diff displays.
* 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
2011-11-01 13:40:01 +00:00
cmpilato ccb53d164e *** THIS REVISION WAS REVERTED IN r2684 ***
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
2011-10-31 21:39:33 +00:00
stilor 441da057cc * lib/viewvc.py
(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
2011-10-28 20:37:01 +00:00
cmpilato a69597e29c Finish issue #470 ("No links to repository root logs").
* 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
2011-10-28 19:24:37 +00:00
cmpilato 43f001ef25 * templates/default/file.ezt,
* 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
2011-10-27 21:14:02 +00:00
cmpilato 4341dab5b7 * templates/default/revision.ezt,
* 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
2011-10-27 20:59:38 +00:00
stilor 6e81b5eb1e * docs/template-authoring-guide.html
* 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
2011-10-27 18:20:06 +00:00
cmpilato dc1763b37b * lib/config.py,
* 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
2011-10-27 18:10:37 +00:00
cmpilato 65137920a8 Begin the work of making the 'newvc' contributed template set into the
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
2011-10-27 18:05:14 +00:00
cmpilato 00d96de446 * CHANGES: Note the addition of prop-diff support.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2646 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-27 14:53:49 +00:00
cmpilato 6008bc6a7b Reintegrate the ^/branches/property-diff branch.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2645 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-27 14:51:43 +00:00
cmpilato 753d2d5320 On the 'property-diff' branch:
* docs/template-authoring-guide.html
  Update the template authoring guide in light of the changes I made
  in r2643.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2644 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-26 19:18:20 +00:00
cmpilato 2b5e7b51a0 On the 'property-diff' branch: rename the 'diff' template data
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
2011-10-26 19:11:41 +00:00
stilor 6453447c63 * docs/template-authoring-guide.html
(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
2011-10-24 20:05:37 +00:00
cmpilato 5e3c53e592 Sync the 'property-diff' branch with outstanding trunk changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2641 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-21 14:47:51 +00:00
cmpilato 24cbe623e7 * docs/template-authoring-guide.html
Update to refer to ViewVC 1.2, not 1.0.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2640 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-21 14:47:02 +00:00
cmpilato 48a59d30ad * docs/release-notes/1.2.0.html
New stub file.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2639 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-21 14:46:35 +00:00
cmpilato 605e66e56f * docs/release-notes/1.1.0.html
Add some helpful markup comments.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2638 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-21 14:46:15 +00:00
cmpilato 661e7fc569 * notes/releases.txt
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
2011-10-21 14:42:33 +00:00
cmpilato 055e1dad53 * docs/upgrading-howto.html
Add stub section for "from 1.1" section.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2635 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-20 19:48:55 +00:00
cmpilato 51f194d4ad * docs/upgrading-howto.html
Dial back the color intensity a bit.  Sheesh.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2634 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-20 19:48:00 +00:00