Commit Graph

48 Commits (master)

Author SHA1 Message Date
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 9e9b82218c Bump copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2720 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-23 17:52:47 +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
stilor c6775f5b89 * common.py
New file to house common definitions; _item and _RCSDIFF_*
  for now. Remove local definitions in the rest of modules.

* idiff.py
  (sidebyside, unified): Return _RCSDIFF_NO_CHANGES type if
  the generator failed to yield anything else.
  (sidebyside): Add type attribute to the returned tuple so
  that template can check the type.

* diff_display.ezt
  (top-level): Define messages to be used if diffs cannot be
  displayed. Use the definitions in all non-raw displays.
  (sidebyside,unified): Handle _RCSDIFF_IS_BINARY and
  _RCSDIFF_NO_CHANGES; the former is not returned yet - will
  be passed to the template once properties are diffed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2605 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-10-01 06:33:22 +00:00
cmpilato a5df176395 Wow. Drop a "general code cleanup" kind of bomb on the codebase. All
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.

* lib/compat.py
  Remove as unused.

* bin/cvsdbadmin,
* bin/loginfo-handler,
* bin/make-database,
* bin/svndbadmin,
* lib/accept.py,
* lib/blame.py,
* lib/cvsdb.py,
* lib/popen.py,
* lib/query.py,
* lib/sapi.py,
* lib/vcauth/forbidden/__init__.py
* lib/vcauth/forbiddenre/__init__.py,
* lib/vcauth/svnauthz/__init__.py,
* lib/vclib/__init__.py,
* lib/vclib/ccvs/blame.py,
* lib/win32popen.py,
* tests/timelog.py
  Replace explicit import and use of the 'string' module with newer constructs.

* bin/standalone.py,
* lib/viewvc.py 
  No longer use 'compat' module.  Replace explicit import and use of
  the 'string' module with newer constructs.

* lib/dbi.py
  Use calender.timegm() instead of compat.timegm().

* lib/vcauth/__init__.py
  Lose unused module imports.

* lib/config.py,
  Replace explicit import and use of the 'string' module with newer
  constructs where possible.  Lose old ConfigParser patch-up code for
  Python 1.5.1.

* lib/vclib/ccvs/ccvs.py
  Replace explicit import and use of the 'string' module with newer
  constructs where possible.  Import _path_join() from bincvs, and use
  it instead of a bunch of copy-and-pasted string join() statements
  throughout.

* lib/vclib/ccvs/__init__.py
  (cvs_strptime): Moved here from the 'compat' module.

* lib/vclib/ccvs/bincvs.py
  (): No longer use 'compat' module.  Replace explicit import and use
    of the 'string' module with newer constructs.
  (_path_join): New, used now instead of a bunch of copy-and-pasted
    string join() statements throughout.

* viewvc-install
  Don't use the 'compat' module any more.

Also, so some rearranging of non-critical bits.

* misc/:              New directory.
* misc/py2html.py:    Moved from 'lib/py2html.py'.
* misc/PyFontify.py:  Moved from 'lib/PyFontify.py'.
* misc/elemx/:        Moved from 'elemx/'.
* misc/tparse/:       Moved from 'tparse/'.
* tools/make-release
  Omit 'misc' directory from releases, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-03 16:49:52 +00:00
cmpilato 1da4f1a0e3 Copyright bumps only.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2349 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-03-29 15:30:00 +00:00
cmpilato 8af29de901 There were too many ways to do something as simple as HTML escaping in
the ViewVC codebase.  Simplify, conjoin, remove, etc.

* lib/sapi.py
  (escape): New function.  *The* preferred HTML-escaping mechanism.
  (Server.escape): New common Server object escape mechanism (which
    uses the aforementioned escape(), of course).
  (CgiServer.escape, WsgiServer.escape, AspServer.escape,
   ModPythonServer.escape): Lose as unnecessary.

* lib/viewvc.py
  (Request.get_form): Escape hidden form variable names and values.
  (htmlify): Remove.
  (): Replace all uses of cgi.escape() and htmlify() with (directly or
    indirectly) sapi.escape().
  
* lib/query.py
  (main): Use server.escape() instead of cgi.escape().

* lib/blame.py
  (HTMLBlameSource.__getitem__): Use sapi.escape() instead of
    cgi.escape().

* lib/idiff.py
  (_mdiff_split, _differ_split): Use sapi.escape() instead of
    cgi.escape().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2344 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-03-11 19:56:22 +00:00
cmpilato 7fd9e405a1 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2107 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 16:43:33 +00:00
cmpilato b90ed5fffa * lib/blame.py
Only import vclib.ccvs.blame for the one function that cares.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1986 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-08-13 20:13:15 +00:00
cmpilato 4395bc3b1c Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1828 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-28 16:11:24 +00:00
cmpilato 141419f852 * lib/blame.py
(make_html): Not that I think anybody actually cares, but fix this
    function to generate HTML properly.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1617 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-17 21:38:33 +00:00
cmpilato e1f28b1bc0 * lib/viewvc.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/ccvs/blame.py
* lib/blame.py
* lib/popen.py
  Replace stray tabs with spaces.  (Hopefully) no logic changes.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1616 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-17 21:07:33 +00:00
cmpilato 60991a4743 Finish issue #208 (Annotate aborts on #include "./filename"). Patch
more or less by Russell Yanofsky.

* lib/blame.py
  (link_includes): Calculate include paths in such a way that '.' is
    dropped and '..' is normalized.  This should prevent us from
    sending paths through Subversion's APIs that aren't legal (and
    cause assertions to fire).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1414 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-01 16:45:35 +00:00
rey4 72459917f7 Restore copyright statements for Curt Hagenlocher accidentally
deleted in r1288

* lib/blame.py
* lib/vclib/ccvs/blame.py


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1290 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-20 03:27:02 +00:00
rey4 3efd3fa040 Clean for file headers and copyright notices for issue 167
* bin/asp/query.asp
* bin/asp/viewvc.asp
* bin/cgi/query.cgi
* bin/cgi/viewvc.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/make-database
* bin/mod_python/handler.py
* bin/mod_python/query.py
* bin/mod_python/viewvc.py
* bin/standalone.py
* bin/svndbadmin
* lib/accept.py
* lib/blame.py
* lib/compat.py
* lib/config.py
* lib/cvsdb.py
* lib/dbi.py
* lib/debug.py
* lib/idiff.py
* lib/popen.py
* lib/query.py
* lib/sapi.py
* lib/vclib/__init__.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/viewvc.py
* lib/win32popen.py
* tools/make-release
* tparse/tparse.cpp
* tparse/tparse.h
* tparse/tparsemodule.cpp
* tparse/tparsemodule.h
* viewcvs-install


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1288 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 02:07:36 +00:00
rey4 f74711446f Finish issue 168, the project rename. Change is mostly based on the patch
from Gerard Gerritsen (sigcafe), with some other stuff thrown in.

* bin/asp/viewcvs.asp
* bin/asp/viewvc.asp
* bin/cgi/viewcvs-strace.sh
* bin/cgi/viewvc-strace.sh
* bin/cgi/viewcvs.cgi
* bin/cgi/viewvc.cgi
* bin/mod_python/viewcvs.py
* bin/mod_python/viewvc.py
* lib/viewcvs.py
* lib/viewvc.py
* viewcvs.conf.dist
* viewvc.conf.dist
    the file renames

* bin/cvsdbadmin
* bin/loginfo-handler
* bin/svndbadmin
* bin/asp/query.asp
* bin/cgi/query.cgi
* bin/mod_python/query.py
* bin/make-database
* bin/standalone.py
* lib/debug.py
* lib/compat.py
* lib/blame.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/bincvs/__init__.py
* lib/query.py
* lib/config.py
* lib/dbi.py
* lib/sapi.py
* INSTALL
* TODO
* cvsgraph.conf.dist
* tests/timelog.py
* tools/make-release
* tparse/tparsemodule.h
* tparse/Setup.py
* tparse/INSTALL
* tparse/tparsemodule.cpp
* tparse/tparse.h
* tparse/tparse.cpp
* windows/README
* viewcvs-install
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* viewvc.org/license-1.html
    the other changes



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1287 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 00:33:54 +00:00
rey4 b91146fee0 Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to
ViewCVS in comments, strings, and documentation. References to ViewCVS
in filenames and urls still need to be fixed. Also, logo.png (the blimp)
needs to be updated or replaced.

This patch is by Gerard Gerritsen (sigcafe), the only change I've made is
to restore a reference to ViewCVS in a comment about backwards compatibility.

* windows/README
* viewcvs-install
* README
* templates/include/footer.ezt
* templates/include/header.ezt
* templates/error.ezt
* templates/query.ezt
* templates/docroot/help.css
* templates/docroot/help_query.html
* templates/docroot/help_dirview.html
* templates/docroot/help_rootview.html
* templates/docroot/styles.css
* templates/docroot/help_log.html
* templates/diff.ezt
* tools/make-release
* lib/sapi.py
* lib/dbi.py
* lib/accept.py
* lib/cvsdb.py
* lib/config.py
* lib/query.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/svn/__init__.py
* lib/vclib/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/blame.py
* lib/popen.py
* lib/compat.py
* lib/viewcvs.py
* lib/debug.py
* INSTALL
* bin/standalone.py
* bin/make-database
* bin/mod_python/query.py
* bin/mod_python/viewcvs.py
* bin/cgi/query.cgi
* bin/cgi/viewcvs.cgi
* bin/asp/query.asp
* bin/asp/viewcvs.asp
* bin/svndbadmin
* bin/loginfo-handler
* bin/cvsdbadmin
* viewcvs.conf.dist


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 17:19:28 +00:00
rey4 5204e26666 Change vclib interface to accept 'rev' parameters wherever it accepts
path parameters so it is possible to use a single Repository object
to request information about any path at any revision.

Note: I wasn't able to test the svn_ra.get_location function because
I only have subversion 1.2.3.

* lib/vclib/__init__.py
  (Repository.itemtype, Repository.openfile, Repository.listdir,
   Repository.dirlogs, Repository.itemlog, Repository.annotate):
    add rev arguments, update docstrings

* lib/vclib/bincvs/__init__.py
  (CVSRepository.itemtype, CVSRepository.listdir, BinCVSRepository.openfile,
   BinCVSRepository.dirlogs, BinCVSRepository.itemlog):
    same

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs, CCVSRepository.itemlog):
    same

* lib/vclib/svn/__init__.py
  (SubversionRepository.__init__):
    remove rev argument

  (get_location, created_rev, _get_history, get_revision_info, _fetch_log,
   _get_last_history_rev, get_logs, do_diff,
   SubversionRepository.itemtype, SubversionRepository.openfile,
   SubversionRepository.listdir, SubversionRepository.dirlogs,
   SubversionRepository.itemlog, SubversionRepository.annotate):
    add rev arguments, use new _getrev and _getroot functions to handle
    all revision string parsing and revision_root creation

  (SubversionRepository._getrev, SubversionRepository._getroot):
    new functions

* lib/vclib/svn_ra/__init__.py
  (_rev2optrev):
    accept integers instead of strings, and eliminate head/unspecified
    revision handling which is already taken care of by _getrev

  (SubversionRepository.__init__):
    remove rev argument

  (get_location, created_rev, get_revision_info, get_logs,
   SubversionRepository.itemtype, SubversionRepository.openfile,
   SubversionRepository.listdir, SubversionRepository.dirlogs,
   SubversionRepository.itemlog, SubversionRepository.annotate,
   SubversionRepository.rawdiff, SubversionRepository._get_dirents):
    add rev arguments, use new _getrev function to handle all revision
    string parsing

  (SubversionRepository._getrev):
    new function

* lib/blame.py
  (link_includes):
    update call to repos.itemtype

* tools/cvsdbadmin
  (RecurseUpdate):
    update call to repos.listdir

* lib/viewcvs.py
  (Request.run_viewcvs):
    update calls to SubversionRepository constructors and _strip_suffix

  (_strip_suffix):
    add rev parameter, remove redundant where parameter

  (_repos_pathtype, view_markup, search_files, _get_diff_path_parts,
   generate_tarball):
    update calls to vclib methods

  (nav_path, view_directory, view_log, setup_diff, download_tarball,
   view_revision):
    explicitly read 'rev' query param instead of relying on
    SubversionRepository.rev, and update vclib calls


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1144 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-03 13:23:42 +00:00
cmpilato 97a07dc88e This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0
Strict.  Changes have been made in the EZT templates, the CSS files,
HTML code embedded in the Python files as well as in the help
files. The original code structure and design is the very same.  No
other improvements have been made to the browser code and it still
uses the old layout tables to create the page grid.

Apart from the XHTML/CSS code changes, the patch adds an argument (-x
x) for CVSGraph in viewcvs.py in the view_cvsgraph function to tell
CVSGraph to generate XHTML code. For Mozilla/Firefox to recognize the
id attribute in the image map generated, the content-type must be set
to application/xhtml+xml (see
https://bugzilla.mozilla.org/show_bug.cgi?id=109445).  This patch does
however not change the content-type, but uses an ugly hack to make the
CVSGraph output work in Mozilla with the current text/html
content-type: a name attribute is merged into the id attribute in the
map_name defined in the cvsgraph.conf.dist file.

The XHTML code does not contain the standard XML declaration, just the
XHTML 1.0 Strict Doctype. This is to keep ViewCVS as encoding agnostic
as before and let the browser decide which encoding to use. An XML
file without the encoding declared must be interpreted as UTF-8 (or
UTF-16 if the byte order mark is included).

* viewcvs/cvsgraph.conf.dist
  Add name="" hack to the 'map_name' variable so Mozilla/Firefox will work.

* viewcvs/lib/ezt.py
  XHTML-ize sample output.

* viewcvs/lib/viewcvs.py
  XHTML-ize hard-coded output.
  (view_cvsgraph): Pass "-x x" to cvsgraph to force XHTML production.

* viewcvs/lib/blame.py
* viewcvs/lib/debug.py
* viewcvs/lib/py2html.py
* viewcvs/lib/query.py
* viewcvs/lib/vclib/bincvs/__init__.py
* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/error.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/query_form.ezt
* viewcvs/templates/query_results.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/roots.ezt
* viewcvs/templates/docroot/help_dirview.html
* viewcvs/templates/docroot/help_log.html
* viewcvs/templates/docroot/help_logtable.html
* viewcvs/templates/docroot/help_query.html
* viewcvs/templates/docroot/help_rootview.html
* viewcvs/templates/docroot/styles.css
* viewcvs/templates/include/branch.ezt
* viewcvs/templates/include/branch_form.ezt
* viewcvs/templates/include/diff_form.ezt
* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/file_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
* viewcvs/templates/include/paging.ezt
* viewcvs/templates/include/sort.ezt
* viewcvs/templates/include/view_tag.ezt
  XHTML-ize hard-coded output and templatized data.

* viewcvs/CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1109 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-28 17:06:16 +00:00
cmpilato a5ad1e5f41 * viewcvs/lib/blame
(link_includes): Use the more generic itemtype() interface instead of
    the rcsfile() one.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1099 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 19:40:29 +00:00
cmpilato 828ee07077 Abstract the annotate interface by moving core functionality down
into the vclib providers.

* viewcvs/lib/vclib/__init__.py
  (Repository.annotate): New interface.

* viewcvs/lib/vclib/ccvs/blame.py
  New file, with contents cored from viewcvs/lib/blame.py, and
  reworked a little bit to avoid data tainting, and to be independent
  of the vclib implementation.

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.annotate): Implement Repository.annotate() by returning
    a blame.BlameSource object.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.annotate) Implement by returning a
    vclib.ccvs.blame.BlameSource object.

* viewcvs/lib/vclib/svn/__init__.py
* viewcvs/lib/vclib/svn_ra/__init__.py
  (SubversionRepository.annotate): New.  Return NotImplementedError.

* viewcvs/lib/viewcvs.py
  (view_annotate): Use new blame.blame() function.

* viewcvs/lib/blame.py
  Gut this sucker, moving most of the heavy lifting into the ccvs module.
  (HTMLBlameSource): New wrapper for BlameSource objects to handle
    HTML-izing and such.
  (blame): New function, thin wrapper around
  (make_html): Remove unused 'sticky' param.  Tweak to use new
    abstracted interface, but at the cost of diff_url support.  I'll
    probably come back to this (by adding a --diff-url option), but
    does anyone really care?


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1098 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 18:51:35 +00:00
cmpilato 0738697d61 Fix an annotate bug reported by Amy Langenhorst <Amy.Langenhorst@noaa.gov>.
* lib/blame.py
  (CVSParser.is_branch): Tighten up regular expression with '^'/'$'.
    Revisions like "11.0.2.2.0.1" were matching not with groups
    "11.0.2.2" and "1", but with "11" and "2.2.0.1".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1049 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-08 22:55:58 +00:00
rey4 21f89e87d5 Get revision numbers to display on annotate pages when viewing HEAD.
* lib/blame.py
  (BlameSource.__init__):
    set "revision" member to revision being annotated

* lib/viewcvs.py
  (view_annotate):
    use "revision" member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1021 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:28:22 +00:00
rey4 33e9c1db0c Make the blame module use get_url links
* lib/viewcvs.py
  (sticky_vars):
    removed

  (view_annotate):
    pass partial get_url links to blame module

* lib/blame.py
  (link_includes, BlameSource.__init__, BlameSource.__getitem__):
    use get_url links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1016 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:04:03 +00:00
jhenstridge 7cce726069 Fix up validity errors due to non-escaped ampersands in URLs.
* lib/viewcvs.py: add an optional escape parameter to the get_url()
   method, that will entity escape the URL.
   Pass escape=1 to each call to get_url() that is used to construct a
   URL for display in a template.
 * lib/blame.py: fix up a small entity escaping problem here too.
 * templates/revision.ezt: fix up a few HTML validity errors in this
   template that were a lot more obvious after clearing up the other
   errors.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@918 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-09-14 08:49:32 +00:00
cmpilato 0f09f6c241 Templatize the annotate view!
* viewcvs/lib/viewcvs.py
  (view_annotate): Now use blame.BlameSource() class for doing annotations.

* viewcvs/lib/blame.py
  (BlameSource, BlameSequencingError): New classes.
  (make_html): Re-work to use the use BlameSource code.

* viewcvs/lib/config.py
  (Config.set_defaults): No longer set self.templates.footer.

* viewcvs/viewcvs.conf.dist
  (templates.footer): Removed.

* viewcvs/templates/annotate.ezt
  Re-work this template to make use of the newly exposed blame data,
  and the fabulous new EZT assignment commands!

* viewcvs/website/upgrading.html
  Document this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@833 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 05:08:12 +00:00
cmpilato 1ab8cfbd92 Purge semi-colons from the ends of statements (in one case, moving it into a
string constant as an HTML entity terminator.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@719 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-14 15:53:42 +00:00
gstein 9c346b051f Ensure that we open ,v files in binary mode.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@630 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-02-26 02:31:31 +00:00
gstein 42f004c911 Minor cleanups.
- remove the revision_symbolic_name since it was bogus and unused
- quote the outer table attributes for xhtml compat
- remove the unused usedlog
- change the line number formatting to simplify the width usage
  (through the '*' format character) and to make the name= anchor
  surround the actual number rather than empty space.
- use '*' for author formatting, too
- remove the '.diff' from the URLs


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@567 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-10-10 00:53:14 +00:00
gstein 79728fb463 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@543 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-09-05 07:34:45 +00:00
gstein 44b8e40d50 Switch over to the vclib.ccvs.rcsparse package.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@540 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-09-05 07:11:42 +00:00
timcera 705a54514e Corrected small errors noticed by pychecker.
* Multiple imports of the same module.
  * Module imported but never used.
  * Variables only used once.
  * Corrected deprecated modules.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@462 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-01 03:43:56 +00:00
gstein 007ad51b2c change web site references from www.lyra.org/viewcvs/ to the new
viewcvs.sourceforge.net/ site.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@193 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-30 08:49:19 +00:00
gstein e3dbdb4fcc Update copyright years to include 2001.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@182 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 22:51:02 +00:00
akr 945cb91e38 (link_includes): use sticky parameters for a link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@171 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-10 09:12:45 +00:00
gstein 67daa9e5e2 Extract the RCS parsing code into a separate module. It now uses a "sink"
model, sending events/info to the blame script.

(this allows the RCS parser to be used in numerous contexts by simply
 switching the Sink that is used)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@166 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-08 19:34:58 +00:00
akr 5251065e6d fix blame for empty deltatext especially 1.1 to 1.1.1.1.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@153 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-27 07:05:49 +00:00
akr 3d6f71ce00 couldn't handle multiple RCS-encoded string in single line.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@152 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-27 06:51:36 +00:00
akr 1a69430064 couldn't scan RCS-encoded string ends with @.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@151 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-27 06:44:20 +00:00
akr 050ad1f8fe add sticky info to blame link to fix problem with non-default repository.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@150 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-27 06:12:33 +00:00
gstein 6ed78e918e fix the links that are generated
the "primordial" revision no longer links to the directory. the user can do
    that from the navbar at the top of the page (a bit more intuitive).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@117 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-12 07:24:13 +00:00
gstein 31272b7cea use dict.get() to simplify/speed some code.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@108 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-11 22:34:14 +00:00
gstein 33356d5a30 fix some previous-revision handling (generally failed on files with just a
single revision in them)
strip out the header/footer stuff from make_html()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@106 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-11 11:15:54 +00:00
gstein cbe1f36d8a remove unused code.
slight change to use math.log10()
fix problem with finding the end of a @-delimited token. It didn't work
    when the terminating @ was at the end of a line.
remove the CGI script stuff, but leave a direct-invocation for testing


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@103 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-11 01:12:33 +00:00
gstein a1e7108d76 small tweak to get this working right. 'token' had an empty string, so the
reference to token[-1] raised an error.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@99 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-09 11:48:49 +00:00
gstein 867883e525 untabify. indent changed, too.
despite the size of this diff, there were NO code changes. "cvs diff -b"
    to see that the change was whitespace only.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@98 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-09 11:21:30 +00:00
gstein 18048c0a80 update the copyright and license information.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@93 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-05-09 08:36:29 +00:00
gstein 17c4db41dc initial checkin from Curt.
this currently operates as a CGI, but we will be integrating it as a part
    of viewcvs.cgi; therefore, it is going into lib/ to become a module.
this file is "pure" Curt except for the license in the header (changed per
    Curt's email to the viewcvs-dev list), and some comments about it
    being maintained as part of the ViewCVS project.
    [ change will progress from this snapshot ]


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@86 8cb11bc2-c004-0410-86c3-e597b4017df7
2000-04-28 14:01:48 +00:00