Commit Graph

34 Commits (f48add83f7d3ee999dc582312f9b3afc7fdb2a5c)

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 ccb7f2e3f1 Ensure that we are dealing with absolute repository paths. Who knows
what kind of chaos may ensue otherwise.

* conf/viewvc.conf.dist
  Note that paths should be absolute filesystem paths.

* lib/vclib/svn/__init__.py
  (canonicalize_rootpath, expand_root_parent): Assert that local
    repository paths are absolute.

* lib/vclib/ccvs/__init__.py
  (canonicalize_rootpath, expand_root_parent): Assert that local
    repository paths are absolute.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2713 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-05 15:35:39 +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 16ccaa931c Add vclib-specific path canonicalization and root-parent expansion
routines (and use them).

Background: I had delusions of adding root-parent expansion for remote
Subversion repositories, but I lacked the requisite motivation.
Still, these are good changes which further move VC-specific knowledge
out of ViewVC's core moddules and back into the vclib abstraction
layer, which such knowledge belongs.

* lib/viewvc.py
  (Request.run_viewvc): Use vclib.*.canonicalize_rootpath() to get
    version-control-specific rootpath canonicalization.
  (expand_root_parents, find_root_in_parents): Rework to use the
    expand_root_parent() vclib implementations.
  (locate_root): Docstring typo fix.

* lib/vclib/ccvs/__init__.py
  (canonicalize_rootpath, expand_root_parent): New.
  (CVSRepository): Use canonicalize_rootpath().

* lib/vclib/svn/__init__.py
  (_re_url): Make module-global.
  (canonicalize_rootpath, expand_root_parent): New.
  (SubversionRepository): Use canonicalize_rootpath().

* bin/cvsdbadmin
  (__main__): Use canonicalize_rootpath() before passing the root path
    to vclib.ccvs.CVSRepository().

* bin/svndbadmin
  (__main__): Use canonicalize_rootpath().

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1950 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-12 16:26:33 +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 220792f72c Merge to trunk all the changes from the 'vcauth-reorg' branch as of
r1761, which see for logs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1762 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-06 19:22:53 +00:00
cmpilato aa6b9dcf8e Merge changes (r1735:1738) from the (misnamed) options-overhaul
branch.  This reduces the number of vclib plugins to two -- one for
each of CVS and Subversion.

* lib/viewvc.py
  (): Update callers of vclib.svn.created_rev(), vclib.svn.get_location(),
    vclib.svn.get_youngest_revision(), and vclib.svn.last_rev() to use
    request.repos.* instead.
  (Request.run_viewvc): For CVS, invoke only
    vclib.ccvs.CVSRepository(), but pass the use_rcsparse setting to
    it.  For Subversion, invoke only vclib.svn.SubversionRepository().

* lib/vclib/ccvs/ccvs.py
  Renamed from lib/vclib/ccvs/__init__.py, and tweaked to look for
  stuff common to the bincvs implementation in the sibling 'bincvs'
  module.

* lib/vclib/ccvs/__init__.py
  New, a replacement by a new stub file with a factory function
  that selects which CVS implementation to use.

* lib/vclib/ccvs/bincvs.py
  Moved from lib/vclib/bincvs/__init__.py.

* lib/vclib/bincvs
  Removed (it's now empty).

* lib/vclib/svn/svn_repos.py
  Renamed from lib/vclib/svn/__init__.py.
  (LocalSubversionRepository.created_rev,
   LocalSubversionRepository.get_location,
   LocalSubversionRepository.get_youngest_revision, 
   LocalSubversionRepository.last_rev): Moved into the class from outside.

* lib/vclib/svn/svn_ra.py
  Moved from lib/vclib/svn_ra/__init__.py.
  (RemoteSubversionRepository.created_rev,
   RemoteSubversionRepository.get_location,
   RemoteSubversionRepository.get_youngest_revision, 
   RemoteSubversionRepository.last_rev): Moved into the class from outside.

* lib/vclib/svn/__init__.py
  New, replacing previous incarnation with a file that contains only a
  single factory function.

* lib/vclib/svn_ra/
  Removed (it's now empty).

* bin/loginfo-handler
  (ProcessLoginfo): Now use vclib.ccvs.CVSRepository(), disabling use_rcsparse.

* bin/cvsdbadmin
  (__main__): Now use vclib.ccvs.CVSRepository(), disabling use_rcsparse.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1739 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-12-03 15:25:51 +00:00
cmpilato 703327df1c Implement a more-or-less generic global revision info function in the
vclib.Repository interface, and adapt the Subversion vclib modules to
implement it.

* lib/vclib/__init__.py
  (ADDED, DELETED, REPLACED, MODIFIED): New static variables.
  (Repository.revinfo): New function.
  (ChangedPath): New class.
  (UnsupportedFeature): New exception type.

* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.revinfo): New (just raises vclib.UnsupportedFeature).

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.revinfo): New (just raises vclib.UnsupportedFeature).

* lib/vclib/svn/__init__.py
  (SVNChangedPath): Was ChangedPath, now is a subclass of vclib.ChangedPath.
  (SubversionRepository.revinfo): Was get_revision_info().  Rework to
    use SVNChangedPath items.

* lib/vclib/svn_ra/__init__.py
  (): Import SVNChangedPath instead of ChangedPath.
  (LastHistoryCollector.add_history): Rework to use SVNChangedPath items.
  (SubversionRepository.revinfo): Was get_revision_info().

* lib/viewvc.py
  (view_revision): Rework this to use Repository.revinfo()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1685 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-06-27 16:41:03 +00:00
cmpilato 118c6cc35e Allow ViewVC to work when rcsparse is backed by the tparse module.
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
  Use rcsparse.parse() instead of rcsparse.Parser.parse() throughout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1472 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-11-08 20:01:40 +00:00
cmpilato 528d4aec3d Cleanup ViewVC's configuration and use of external utilities by
creating a new section of the configuration file strictly for defining
the locations of these helper applications.

This closes issue #229 (configurable path to sed) and issue #62
(configurable path to diff), and perhaps others I failed to find.

* viewvc.conf.dist
  Add a new "utilities" section for corraling all the various
  tool-location configurations, and relocate (with some tweaks) a
  bunch of options:
     general.rcs_path => utilities.rcs_dir
     general.cvsnt_ext_path = utilities.cvsnt
     general.svn_path => utilities.svn
     options.enscript_path => utilities.enscript
     options.highlight_path => utilities.highlight
     options.py2html_path => utilities.py2html_dir
     options.php_exe => utilities.php
     options.cvsgraph_path => utilities.cvsgraph
     utilities.diff (new)
     utilities.gzip (new)
     utilities.sed (new)
     options.use_py2html (new)

* lib/config.py
  (_sections): Add 'utilities' section.
  (Config.set_defaults): Reflect options tweaks made to
    viewvc.conf.dist in the code here.

* lib/viewvc.py
  (Request.run_viewvc): Track renamed utilities.svn option.  Now pass
    cfg.utilities into BinCVSRepository(), CCVSRepository(), and
    SubversionRepository().  Collapse now-identical
    SubversionRepository() calls.
  (markup_stream_python): Return immediately if options.use_py2html
    isn't set.  Track renamed utilities.py2html_dir option.
  (view_cvsgraph_image, view_cvsgraph): Track renamed
    utilities.cvsgraph option.
  (MarkupPHP.__init__): Track renamed utilities.php option, and allow
    for 'php' as a fallback value.
  (MarkupHighlight.__init__): Track renamed utilities.highlight option.
  (MarkupEnscript.__init__): Track renamed utilities.enscript option,
    and honor new utilities.sed option.
  (download_tarball): Use new utilities.gzip option.

* lib/vclib/__init__.py
  (_diff_fp.__init__): Add 'diff_cmd' parameter.

* lib/vclib/svn/__init__.py
  (SubversionRepository.__init__): Drop 'svn_path' parameter, and now
    accept 'utilities'.
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/svn_ra/__init__.py
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff): Pass self.utilities.diff or 'diff' to _diff_fp().

* lib/vclib/bincvs/__init__.py
  (CVSRepository.__init__): Add 'utilities' parameter.
  (BinCVSRepository.__init__): Lose as no-longer-necessary.
  (BinCVSRepository.rcs_popen): Track renamed options, and renamed
    member variable that hold those options.

* docs/upgrading-howto.html
  Note these options changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1407 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-28 11:04:12 +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 0467a8e1d1 Fix exception in tarball view for CVS repositories when
use_rcsparse is enabled.

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs): set DirEntry.path member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1221 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 15:08:27 +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 8bba165888 Get diffs to work in the ccvs module (used when use_rcsparse is enabled),
using the system "diff" command like the svn and svn_ra modules. Factor
the diff code out of the svn and svn_ra modules so they can share
functionality with each other and ccvs. Thanks to C. Mike for getting me
to work on this.

* lib/vclib/__init__.py:
  (_diff_fp):
    new class, based on svn_ra.FileDiff, used by ccvs, svn, and svn_ra
    modules

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff):
    implement in terms of openfile, itemlog, and _diff_fp

* lib/vclib/svn_ra/__init__.py
  (FileDiff, do_diff, _escape_msvcrt_shell_command, _escape_msvcrt_shell_arg):
    removed

  (temp_checkout)
    new function

  (SubversionRepository.rawdiff):
    change implementation to use temp_checkout and _diff_fp

* lib/vclib/svn/__init__.py
  (do_diff):
    removed

  (temp_checkout):
    new function, based on code from subversion's fs.py

  (SubversionRepository.rawdiff
    change implementation to use temp_checkout and _diff_fp


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1154 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-09 15:29:56 +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 1b967b1a09 * viewcvs/lib/vclib/__init__.py (Repository.rawdiff),
* viewcvs/lib/vclib/svn/__init__.py (SubversionRepository.rawdiff),
* viewcvs/lib/vclib/svn_ra/__init__.py (SubversionRepository.rawdiff),
* viewcvs/lib/vclib/ccvs/__init__.py (CCVSRepository.rawdiff),
* viewcvs/lib/vclib/bincvs/__init__.py (BinCVSRepository.rawdiff):
  For clarity, replace uses of the term 'path' with 'path_parts' in the
  Repository.rawdiff() stub and implementations.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1104 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-26 16:07:17 +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 1b2dc4efa3 Consistify the output of the vclib diff engines, sticking with GNU
diff format.  This also has the effect of simplifying the wrapping
code (which wasn't working anyway) a little bit.  Also, restore
functionality lost in the last re-org of the diff functionality
(svn_ra).  Finally, make the vclib.ccvs module's lack of diff
functionality a little more apparent to those who attempt to use it.

* viewcvs/lib/vclib/__init__.py
  (Repository.rawdiff): Specify that returned diffs are expected to be
    in GNU diff format.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rawdiff): Eat up the rcsdiff header lines, not
    exposing them to the caller.  The goal is to expose consistent
    diff output across vclib providers, so we'll shoot for GNU diff
    compliance.

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff): Implement this interface, though only to
    raise an exception about how the functionality isn't implemented.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (do_diff): Sync with vclib.svn.do_diff().
  (SubversionRepository.rawdiff): Implement this interface.

* viewcvs/lib/viewcvs.py
  (diff_parse_headers): Lose the 'rootpath' argument.  We've tuned the
    vclib providers to stop exposing that stuff.
  (view_diff): Update calls to diff_parse_headers().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1091 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-20 15:06:52 +00:00
cmpilato 4bfb7f1354 Rename Repository.filelog() to Repository.itemlog() (Subversion
supports logs on directories, too, ya know).  And make some other
little documentation changes.

* viewcvs/lib/vclib/__init__.py
  (Repository.itemlog): Was Repository.filelog().
  (Revision.__init__): Document the input parameters.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.itemlog): Was BinCVSRepository.filelog().

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.itemlog): Was CCVSRepository.filelog().

* viewcvs/lib/vclib/svn/__init__.py
  (SubversionRepository.itemlog): Was SubversionRepository.filelog().

* viewcvs/lib/vclib/svn_ra/__init__.py
  (SubversionRepository.itemlog): Was SubversionRepository.filelog().

* viewcvs/lib/viewcvs.py
  (view_markup, view_log): Update calls to Repository.itemlog() (from
    Repository.filelog()).

* viewcvs/lib/cvsdb.py
  (GetCommitListFromRCSFile): Update calls to Repository.itemlog()
    (from Repository.filelog()).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1050 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-08 22:57:02 +00:00
rey4 2529196782 Improve error messages in directory view for inaccessible CVS files.
* lib/vclib/__init__.py
  (DirEntry.__init__):
    set "errors" member instead of "verboten"

* lib/vclib/bincvs/__init__.py
  (CVSRepository.listdir):
    don't skip "Attic" and "CVS" entries if we're not sure if they are
    directories

    don't skip entries in Attic/ when we can't tell if they are files or
    directories

  (CVSDirEntry.__init__):
    use "errors" argument instead of "verboten"

  (_get_logs):
    don't set "DirEntry.log_errors" member, use "errors"

  (_log_path):
    don't return file access errors here, they are returned by _check_path

  (_check_path):
    return error strings on file access errors instead of simple booleans

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs):
    don't set "DirEntry.log_errors" member, use "errors"

* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
  (get_logs):
    don't set "DirEntry.log_errors" member

* lib/viewcvs.py
  (view_directory):
    use "DirEntry.errors" member instead of "log_errors"

  (generate_tarball):
    use "DirEntry.errors" member instead of "verboten"

* tools/cvsdbadmin
  (RecurseUpdate):
    use "DirEntry.errors" member instead of "verboten"


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@978 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-12-03 20:44:56 +00:00
rey4 f3ca45b9a0 Handle CVS Attic paths transparently in the bincvs module
instead of exposing them to users.

* templates/include/dir_footer.ezt
    add link to show dead files

* templates/directory.ezt
    remove code for detecting Attic entries,
    change (in the attic) caption to (dead)

* lib/viewcvs.py
  (Request.run_viewcvs):
    handle old Attic URL's by redirecting,
    remove unused request.full_name member

  (get_up_path, _re_up_attic_path, nav_header_data, generate_tarball,
   download_tarball):
    remove code for handling Attic directories

  (view_markup):
    remove unused "full_name" variable

  (view_directory):
    remove code for handling Attic directories,
    replace "no_match" template variable with "num_dead"

  (view_log):
    update call to get_up_path

  (view_annotate, view_cvsgraph_image, view_cvsgraph, view_diff):
    use CVSRepository.rcsfile to get path to rcs file

* lib/vclib/bincvs/__init__.py
  (CVSRepository.itemtype):
    look in Attic for repository files

  (CVSRepository.listdir):
    remove "cvs_list_attic" option, now always list attic files.
    leave "Attic" and "CVS" directories out of returned listing.

   (CVSRepository.rcsfile, CVSRepository._atticpath):
     new methods

   (BinCVSRepository.openfile, BinCVSRepository.filelog):
     use CVSRepository.rcsfile to get path to rcs file

   (_get_logs):
     don't mark directories as dead

* lib/vclib/ccvs/__init__.py
   (CCVSRepository.filelog, CCVSRepository.openfile):
     use CVSRepository.rcsfile to get path to rcs file

* website/upgrading.html
    document "no_match" and "num_dead" template variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@908 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-31 22:34:51 +00:00
rey4 98b799adbf Improve error handling in directory view.
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.openfile, BinCVSRepository.filelog, fetch_log):
    update calls to _parse_log_header

  (_re_log_error, _re_cvsnt_error, _re_lineno):
    update regular expressions for parsing rlog error messages

  (_parse_log_header):
    do a better job of parsing rlog error messages and return messages
    to callers

  (_get_logs):
    set new DirEntry.log_errors property and deal with multiple rlog error
    messages about the same file and cases where error messages precede
    file information

  (_log_path):
     return error info

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs):
    set new DirEntry.log_errors property

* lib/vclib/svn/__init__.py
  (get_logs):
    set new DirEntry.log_errors property

* lib/vclib/svn_ra/__init__.py
  (get_logs):
    set new DirEntry.log_errors property

* lib/vclib/__init__.py
  (Repository.dirlogs):
    document new DirEntry.log_errors property

* lib/viewcvs.py
  (view_directory):
    set new template variables

* website/upgrading.html
    document new template variables

* templates/include/dir_footer.ezt
    get rid of confusing "One or more files were unreadable" message.
    We display more specific error messages in the directory list.

    add links to set selection criteria at the bottom of "There are
    [num_files] files, but none match the current selection criteria"
    message

* templates/directory.ezt
* templates/dir_alternate.ezt
    simplify the way error messages are displayed


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@907 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-31 14:38:03 +00:00
rey4 b826424b50 Get ccvs module in working state, and add "use_rcsparse" option to use
it instead of bincvs. It works for log pages, directory pages, markup
pages, checkouts, and tarball downloads, but not for diffs because vclib
doesn't currently have an interface for diffing.

* viewcvs.conf.dist
  (use_rcsparse):
    new option

* lib/config.py
  (Config.set_defaults):
    make use_rcsparse off by default

* lib/viewcvs.py
  (Request.run_viewcvs)
    import ccvs module instead of bincvs if use_rcsparse is enabled

  (markup_stream_enscript):
    check for eof() method on file objects before calling

* lib/vclib/bincvs/__init__.py
  (CVSRepository, BinCVSRepository):
    separate new base class CVSRepository out of BinCVSRepository.
    The new base class is shared with the ccvs module

  (BinCVSRepository.filelog, _file_log):
    move calls to rcs utilities out of _file_log() function and into the
    filelog() method. This way _file_log() can be shared with the ccvs
    module

  (Revision.__init__):
    add default argument values to simplify some calls in the ccvs module

  (_get_logs, _log_path):
    move some functionality out of _get_logs() into new _log_path()
    function, which is shared with ccvs

* lib/vclib/ccvs/__init__.py
  Lots of kludges added to this module to get it running again and taking
  advantage of functionality already implemented in bincvs. It's not
  pretty, but at least it works and is no longer out of date.

  (CCVSRepository, CVSRepository):
    delete old CVSRepository class, create new CCVSRepository class
    implementing the current vclib api

  (MatchingSink):
    new sink superclass

  (InfoSink):
    updated to work with tags and default branches instead of always
    finding latest trunk revisions. Also changed to work with DirEntry
    objects

  (TreeSink):
    updated to work with Revision objects

  (StreamText.next_revision, StreamText):
    remove "next_revision" debugging method and all references to it

  (COSink):
    reimplement with a simpler algorithm

* lib/vclib/ccvs/rcsparse/common.py
  (Sink.admin_completed):
    new callback

  (_Parser.parse):
    call new callback


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@798 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-01-25 19:25:30 +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 37e1e3aa93 Fix up some of the imports. Some were not needed. Also avoided the
importing of bare names, so that references are vclib.FOO (more
obvious where FOO came from). Also fixed references to the
RCSStopParser name, which were unqualified (and would have failed).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@562 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-10-09 01:46:56 +00:00
gstein dca08bb674 Rename to "path_parts" to clarify that we're referring to a list of
path segments rather than a pathname string.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@535 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-07-18 02:27:21 +00:00
lbruand e944408e70 Small coding style fixes
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@529 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-06-11 21:27:06 +00:00
lbruand d857b82cac Modified ccvs so that it conforms to the new API by Greg.
Modified a bit the API also:
 * Added a Versitem class from which both Versfile and Versitem inherite.
 * Added a show_CVSROOT constructor parameter in the CVSRepository.

Now that I am looking over to this code after some time, There are number
of concerns/interrogation that are coming to my mind:
 - Why not go into some more abstraction/polymorphism with the items  ( e.g.
Versfiles and Versdirs):
	shouldn't Versitems  have only one common getitemlist methods ?
	that would return Versitems
( and not two "getsubdirs" and "getfiles" methods...)

 - Quite obviously there are cyclic references in this library.
     This will flaw garbage collection.
    e.g. Versfile points to Repository. and so on...
  According to me deleting a Repository should in turn, result in the destruction of
 its subitems.
 - Another point of concern, we will have to deal with is
multithreading...  One of the current problem of viewcvs is that it does not
have multithreading. ( being a cgi it's kind of normal)  Now, having
multithreading capabilities in vclib would definitely leverage the
difficulty of porting  viewcvs to a servlet-like behaviour. A servlet-like
behaviour would be a big win for speed, according to me.

 - A very important ( if not vital) feature is lacking:
    You cannot select a tag to view in the repository ...
 - There is a problem with subversion ( named svn, from now on...):
svn, as you probably know, represent the evolution of a file hierarchy over time and not the
 evolution of files in hierarchy ( as in CVS). This API does not work with this kind of behaviour.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@526 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-06-09 22:20:23 +00:00
gstein 217169c9f8 Fix the style in these two files. Lots of white space was needed.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@506 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-04-26 08:51:05 +00:00
lbruand b7ced98ac2 debugged a checkout bug when a revision had a two-digit last number in a branch.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@501 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-04-14 21:31:41 +00:00
lbruand 25b5885a6b A working version of vclib.ccvs. Need a lot of debugging. Writing a driver
(called bincvs) for vclib that uses rlog and co binary rcs commands.
Added a few tests scripts.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@500 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-04-13 09:43:22 +00:00
gstein e47409ce23 Minor tweaks to get this stuff working.
* ccvs/__init__.py: the package is 'vclib' rather than 'versionlib'

* rcsparse/texttools.py: the string module is needed


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@493 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-23 00:16:18 +00:00
lbruand 928ffd54d6 Import of vclib
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@477 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-11 21:03:31 +00:00