Commit Graph

61 Commits (983f9c737929abadf940990b412e6f2e2ece6fd3)

Author SHA1 Message Date
Vitaliy Filippov 983f9c7379 Post-merge debug.
Also return some lost files back, document 4intra.net modifications
in CHANGES and README files, remove 'union' authorizer and rewritehtml
as the similar functionality is already provided by the core.

Also fix diffs for non-bash (sh/ash/dash) shells.
2013-07-24 17:37:59 +04:00
Vitaliy Filippov 56c2b61458 Merge with original r2905 2013-07-18 19:13:28 +04:00
vfilippov a0a40b6047 Bug 87710
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1424 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:04 +04:00
vfilippov c6582d1480 Bug 79260 - Fix cvsntacl auth for Python 2.6
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1265 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:07:00 +04:00
vfilippov 552d04e882 Bug 45200
remove temp files


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@517 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04:00
vfilippov f0a1418fbf Bug 45200
USE SHELL!!!
The bug was probably somewhere in file descriptor cloning + Apache webserver


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@516 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:54 +04:00
vfilippov 75be406156 Bug 45200
Use temp file


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@512 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:54 +04: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 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 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 02bd4d70db Update some copyright notices.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2569 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-05-17 12:02:28 +00:00
cmpilato 4818a56012 Fix (I think...) issue #479 ("annotate a file, which uses
CVS-keywords").  This changes causes the checkout of CVS file
contents -- when used as part of the markup/annotate logic -- to not
expand keywords.  This helps it to be consistent with the results of
the annotate information query.

* lib/vclib/__init__.py,
* lib/vclib/svn/svn_ra.py,
* lib/vclib/svn/svn_repos.py
* lib/vclib/ccvs/ccvs.py
  (openfile): Add 'options' parameter (unused).  Callers updated.

* lib/vclib/ccvs/bincvs.py
  (openfile): Add 'options' parameter, and look for a 'cvs_oldkeywords'
    option to govern the use of -kkv or -ko in the 'co' command.
    Callers updated.

* lib/viewvc.py
  (markup_or_annotate): Pass 'cvs_oldkeywords' option to repos.openfile().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2545 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-04-01 16:59:11 +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 10d460902d Finish issue #453 by teaching ViewVC to display all displayable
Subversion revision properties.

NOTE: The svn_ra logic attempts to do the right thing when
      pre-Subversion 1.5 libraries are install, but I haven't had the
      chance to actually test this out myself.

* templates/revision.ezt
  Include the props.ezt property handler template fragment for use
  with revision props.  Also, minor markup change to a header.

* templates/docroot/styles.css
  Lose some unnecessary stylation.
 
* lib/viewvc.py
  (get_itemprops): Lose unused variable has_binary_props.
  (view_revision): Handle new return value from repos.revinfo(),
    processing extra revision props similarly to the way that file/dir
    props are processed and passing them to the template data
    dictionary.

* lib/vclib/svn/svn_ra.py
  Import _split_revprops() from svn_repos.
  (client_log): New compatibility wrapper.
  (add_log): Reformat as an svn_log_entry_receiver_t callback.
  (RemoteSubversionRepository.dirlogs, _date_from_rev): Track changes
    to self.revinfo().
  (RemoteSubversionRepository.itemlog): Now use client_log().
  (RemoteSubversionRepository._revinfo_raw): Now use client_log() and
    return revprops dict, too.
  (_log_cb): Reformat as an svn_log_entry_receiver_t callback.

* lib/vclib/svn/svn_repos.py
  (_split_revprops): New helper.
  (_log_helper, LocalSubversionRepository.dirlogs, _date_from_rev):
    Track changes to repos._revinfo().
  (_revinfo): Use _split_revprops(), and now return revprops, too.
  (_revinfo_helper): Now return revprops dict, too.
  (_date_from_rev): 

* lib/vclib/__init__.py
  (Repository.revinfo): Update docstring to indicate that this
    interface now returns a revprops dictionary, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2401 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-06-15 15:18:48 +00:00
vfilippov 2f99f7b72c Bug 45675 -- better way of diffing added/removed files
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@99 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-01-15 10:00:38 +00:00
stas 5a55d3c0cd O_o max context value = 2^25-1 ... workaround for Bug 45200
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@76 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-22 18:13:08 +00:00
vfilippov 00d1ffe3e0 fix
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@75 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-22 18:00:37 +00:00
vfilippov f3aa325419 bug 37020
viewvc 1.1.0-beta1 initial commit


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@4 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-11 14:17:41 +00:00
cmpilato 5b51bf9008 Finish issue #233: tarball entries from Subversion repositories don't
preserve executability.

* lib/vclib/__init__.py
  (Repository.isexecutable): New.

* lib/vclib/ccvs/bincvs.py
  (BaseCVSRepository.isexecutable): New.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.isexecutable): New.

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

* lib/viewvc.py
  (generate_tarball): Use repos.isexecutable() to get the executable
    bit for file tarball members.  (This loses old code which directly
    consulted the ,v file in the CVS case.)

* CHANGES
  Note this change.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1936 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-06-03 17:02:55 +00:00
cmpilato e8123f68c2 Merge changes from the 'log-paging' branch:
$ svn merge -c1849,1850,1853,1854,1855,1856 \
    http://viewvc.tigris.org/svn/viewvc/branches/log-paging

This brings sliding-window-style pagination to the log revision view.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1857 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-04-15 18:17:02 +00:00
cmpilato 3ab9ffbbc0 For issue #39, bang in some rudimentary support for displaying version
controlled item properties.  (Of course, this doesn't apply to CVS.)

* lib/vclib/__init__.py
  (Repository.itemprops): New.

* lib/vclib/ccvs/bincvs.py
  (BaseCVSRepository.itemprops): New.

* lib/vclib/svn/svn_repos.py
  (LocalSubversionRepository.itemprops): New.
  (LocalSubversionRepository._revinfo_raw): Fetch the whole revision
    proplist instead of repeatedly querying the filesystem.

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

* lib/viewvc.py
  (get_itemprops): New.
  (markup_or_annotate, view_directory): Use get_itemprops().

* templates/docroot/styles.css
  (.vc_properties, .vc_properties h2): New style defs.

* templates/include/props.ezt
  New.

* templates/markup.ezt,
* templates/directory.ezt,
* templates/annotate.ezt
  Include the new props.ezt template chunk.

* docs/template-authoring-guide.html,
* docs/upgrading-howto.html
  Document the new data dictionary bits.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1841 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-04-09 20:14: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 3cbf07551b Finish issue #57 with more support for showing locked status.
* lib/vclib/__init__.py
  (Repository.dirlogs): Update comment.
  (Revision.__init__): Add 'lockinfo' parameter, used to populate
    similarly named class member.

* lib/vclib/svn/svn_repos.py
  (Revision.__init__): Add 'lockinfo' parameter, and update call to
    vclib.Revision().
  (_log_helper): Update call to Revision(), and lose custom lockinfo handling.
  (LocalSubversionRepository.dirlogs): Populate entry lockinfo with a
    call to svn_fs_get_lock() for each entry.

* lib/vclib/svn/svn_ra.py
  (LogCollector.__init__): Add 'lockinfo' parameter, used to populate
    similarly named class member.
  (LogCollector.add_log): Pass self.lockinfo to updated call to Revision().
  (RemoteSubversionRepository.itemlog): Pass lock info to
    LogCollector(), and lose custom lockinfo handling.
  (RemoteSubversionRepository.itemtype, RemoteSubversionRepository.listdir): 
    Update expected return value from _get_dirents().
  (RemoteSubversionRepository.dirlogs): Populate entry lockinfo from
    updated return value from _get_dirents().
  (RemoteSubversionRepository._get_dirents): Rework to trade in
    dirents and locks instead of only dirents.

* lib/vclib/ccvs/bincvs.py
  (Revision.__init__): Update call to vclib.Revision().
  (_get_logs): Add 'lockinfo' member to DirEntry() items.

* lib/vclib/ccvs/ccvs.py
  (InfoSink.__init__): Init lockinfo dictionary.
  (InfoSink.set_locker): New.
  (InfoSink.define_revision): Set lockinfo on Revision item.
  (InfoSink.set_revision_info): Populate DirEntry lockinfo from
    Revision lockinfo data.

* lib/viewvc.py
  (view_directory): Populate entry lockinfo.
  (common_template_data): Populate the 'lockinfo' data dictionary item.

* templates/directory.ezt,
* templates/dir_new.ezt
* templates/annotate.ezt,
* templates/markup.ezt
  Tweak to show lock status.

* docs/template-authoring-guide.html
  Note new data dictionary items.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1787 8cb11bc2-c004-0410-86c3-e597b4017df7
2008-02-12 21:06:40 +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 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 2ce86a5227 Ensure that vclib.Repository objects are aware of their name, path,
and type by forcing them to implement functions which query those
pieces of information.

* lib/vclib/__init__.py
  (Repository.rootname, Repository.rootpath, Repository.roottype): New.

* lib/vclib/bincvs/__init__.py
  (CVSRepository.rootname, CVSRepository.rootpath,
    CVSRepository.roottype): New.

* lib/vclib/svn/__init__.py
  (SubversionRepository.rootname, SubversionRepository.rootpath,
    SubversionRepository.roottype): New.
  
* lib/vclib/svn_ra/__init__.py
  (SubversionRepository.rootname, SubversionRepository.rootpath,
    SubversionRepository.roottype): New.

* lib/viewvc.py
  (Request.run_viewvc): Ask the Repository object for its roottype(),
    and translate the vclib value into a string.  (It would be nice to
    use the vclib value throughout the codebase, but not today.)

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1654 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-05-10 20:47:27 +00:00
cmpilato 0dfb93969d Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1590 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:26:36 +00:00
cmpilato 9e07c413fa Improve the error display when trying to view annotations on a binary file.
* lib/vclib/__init__.py
  (NonTextualFileContents): New Exception.

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): Translate the Subversion error
    SVN_ERR_CLIENT_IS_BINARY_FILE in the new vclib.NonTextualFileContents 
    exception.

* lib/viewvc.py
  (view_annotate): Catch the new vclib.NonTextualFileContents exception.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1514 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:47:37 +00:00
cmpilato acd8ab25e9 Minor vclib interface cleanup, adding a new Annotation object, and
having the Repository.annotate() implementations return lists of them
(instead of lists of those cool-but-overused-_item-thingies).

* lib/vclib/__init__.py
  (Repository.annotate): Note that this interface now returns
    Annotation objects.
  (Annotation): New.
  Also, do some docstring addition/modification elsewhere in this file.

* lib/vclib/ccvs/blame.py
  (BlameSource.__getitem__): Return vclib.Annotation objects now.
  (_item): Remove as unneeded.

* lib/vclib/svn/__init__.py
  (BlameSource.__getitem__): Return vclib.Annotation objects now.
  (_item): Remove as unneeded.

* lib/vclib/svn_ra/__init__.py
  (SubversionRepository._blame_cb): Store vclib.Annotation objects now.
  (_item): Remove as unneeded.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1427 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-08-18 22:35:14 +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 669ea3162b Implement support for full diffs. Change based on a patch from
Jacob Nevins (sourceforge user "jtn") in issue 153.

* lib/vclib/__init__.py
  (_diff_args): perform full diff when "context" option is None
  
* lib/viewvc.py
  (view_diff): add logic for full diffs
  
* templates/diff.ezt
* templates/include/diff_form.ezt
    add option for full diffs

* viewvc.org/template-authoring-guide.html
* viewvc.org/url-reference.html
    update documentation for "diff_format" template variable and url param
  
    


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1346 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-23 21:53:00 +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 49d332a996 Fix error messages when a path string is passed to vclib.ItemNotFound
instead of a list of path parts. We seem to do that a few places in
the svn module.

* vclib/__init__.py
  (ItemNotFound.__init__): accept path strings as arguments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1284 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 16:39:17 +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
cmpilato 3f03d0923e Some diff-related fixes.
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.rawdiff): Stop being so picky about the diff
    header sanity.  Start looser, and we'll tighten up as we need to.

* lib/vclib/__init__.py
  (_diff_fp.close): Add 'self' to the parameter list.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1170 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-22 16:32:59 +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 88ac9dd646 * viewcvs/lib/vclib/__init__.py
(InvalidRevision.__init__): Make the revision argument optional, and
    fix the exception strings up a bit.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1094 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-22 22:03:55 +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
rey4 7cdebbaf24 Move some diff functionality into vclib
* lib/vclib/__init__.py
  (Repository.rawdiff, UNIFIED, CONTEXT, SIDE_BY_SIDE, _diff_args):
    new

* lib/vclib/bincvs/__init__.py
  (Repository.rawdiff):
    new

* lib/vclib/svn/__init__.py
  (Repository.rawdiff):
    new

  (do_diff):
    move code that fixes diff headers here

* lib/viewcvs.py
  (_path_parts):
    new function to break a repository path into parts

  (Request.run_viewcvs):
    use _path_parts function

  (view_diff):
    use new Repository.rawdiff methods and _path_parts


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1086 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-22 20:07:02 +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 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 0ed400de63 Tweak vclib DirEntry and Revision objects.
- Revision class is now defined in vclib
- DirEntry class has new log_error boolean member to replace use of
  bincvs._FILE_HAD_ERROR constant.
- In CVS, DirEntry.state string member is replaced by boolean DirEntry.dead

* lib/vclib/__init__.py
  (Repository.dirlogs):
    add documentation

  (Revision):
    new class

* lib/vclib/bincvs/__init__.py
  (Revision):
    inherit from new vclib.Revision class

  (get_logs, _FILE_HAD_ERROR):
    stop using _FILE_HAD_ERROR constant

  (parse_log_entry, get_logs):
    use "dead" properties instead of "state" properties on Revision and
    DirEntry objects

  (_newest_file):
    bugfix, call _check_path() to make sure returned file is accessible

* lib/rlog.py
  (GetRLogData):
    use Revision.dead member instead of Revision.state

* lib/vclib/svn/__init__.py
  (Revision, LogEntry):
    rename LogEntry class to Revision and inherit from vclib.Revision

  (NodeHistory.add_history):
    trim beginning slashes from subversion paths passed to this callback

  (_log_helper):
    call new Revision constructor

  (fetch_log):
    simplify return values

  (get_logs):
    set DirEntry.log_error member

  (SubversionRepository.filelog):
    update for changed fetch_log function, remove some kludges

* lib/viewcvs.py
  (Request.run_viewcvs, bincvs):
    import bincvs module as neccessary instead of importing globally

  (view_markup, sort_file_data, view_directory, view_log,
   generate_tarball):
    update to deal with changed DirEntry and Revision members


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@796 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-01-25 19:05:08 +00:00
rey4 3623c5476b Add new repository methods to vclib.
* lib/vclib/__init__.py
  (Repository):
    update docstrings

* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.listdir):
    add options argument

  (BinCVSRepository.openfile):
    fix bug in cvsnt workaround

  (BinCVSRepository.dirlogs, BinCVSRepository.filelog):
    new methods

  (_sort_tags):
    removed

  (get_logs):
    simplify arguments and return value

* lib/vclib/svn/__init__.py
  (SubversionRepository.listdir):
    add options argument

  (SubversionRepository.dirlogs, SubversionRepository.filelog):
    new methods

* lib/viewcvs.py
  (view_markup, view_log):
    use new repos.filelog() method

  (icmp):
    new function

  (view_directory, generate_tarball):
    use new repos.dirlogs() method

  (read_log):
    removed

  (download_tarball):
    update call to generate_tarball


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@795 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-01-25 18:37:42 +00:00
rey4 c1785db585 Remove dead code from vclib.
* lib/vclib/__init__.py
  (Repository.getitem, Repository.getfiles, Repository.getsubdirs,
   Revision, Repository._getvf_files, Repository._getvf_subdirs,
   Versfile, Versdir, Versitem, Repository._getvf_info,
   Repository._getvf_tree, Repository._getvf_properties,
   Repository._getvf_cofile):
    removed

* lib/vclib/svn/__init__.py
  (SubversionRepository.getitem, SubversionRepository._getvf_files,
   SubversionRepository._getvf_subdirs,
   SubversionRepository._getvf_info,
   SubversionRepository._getvf_tree,
   SubversionRepository._getvf_properties,
   SubversionRepository._getvf_cofile):
    removed

* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.getitem, BinCVSRepository._getvf_files,
   BinCVSRepository._getvf_subdirs,
   BinCVSRepository._getvf_info,
   BinCVSRepository._getvf_tree,
   BinCVSRepository._getvf_properties,
   BinCVSRepository._getvf_cofile):
    removed


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@736 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-21 19:54:27 +00:00