* bin/svndbadmin
(SvnRev.__init__): Update the logic used to calculate change types
and diff objects to no longer assume that deleted paths have None
for their change.path. (Subversion's 1.7 bindings always populate
change.path.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2671 8cb11bc2-c004-0410-86c3-e597b4017df7
Fix a minor buglet in the usage message.
Reported by: Jean-Yves Avenard <jyavenard@gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2588 8cb11bc2-c004-0410-86c3-e597b4017df7
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
non-existent repository.
* bin/svndbadmin
(main): Do repository existence checking here, like the corresponding
code in cvsdbadmin does. (In fact, structure this function like that
corresponding cvsdbadmin code.)
(__main__): No longer do existence checks here.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2379 8cb11bc2-c004-0410-86c3-e597b4017df7
complain about unknown repositories.
* bin/svndbadmin
(main): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
* bin/cvsdbadmin
(__main__): When rebuilding, ignore the UnknownRepositoryError; when
purging, turn that sucker into something readable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2195 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/cvsdb.py
(CheckinDatabase.sql_delete): Add keep_fkey parameter, used to
prevent deletion of keys that are still in use in the 'checkins'
table.
(CheckinDatabase.PurgeRepository): Pass keep_fkey parameter when
deleting rows from tables other than 'checkins'.
* bin/cvsdbadmin,
* bin/svndbadmin
Update script usage messages to indicate that rebuilding includes
purging.
Patch by: Larry Shatzer (larrys {at} gmail.com)
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1974 8cb11bc2-c004-0410-86c3-e597b4017df7
Import 'vclib' so bad stuff doesn't happen. (Such as referencing a
non-imported module.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1959 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* bin/svndbadmin
(usage): Make it clear that the REPOSITORY command-line argument
is a path to a repository (as opposed to a ViewVC rootname or
relative URL or something else).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1703 8cb11bc2-c004-0410-86c3-e597b4017df7
(SvnRev.__init__): Don't use secs_from_timestr() -- it never
learned to accept optional pools. Do the math ourselves.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1556 8cb11bc2-c004-0410-86c3-e597b4017df7
of revisions for the 'update' operation.
* bin/svndbadmin
(): Update the script's header comment.
(main): Now accept a 'revs' list instead of a single integer revision.
(_rev2int): New helper function.
(usage): Update usage message.
(__main__): Now allow a revision range to be specified, with support
for the 'HEAD' keyword, too.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1546 8cb11bc2-c004-0410-86c3-e597b4017df7
svndbadmin. Teach the 'rebuild' commands to first purge existing data
and then crawl the repository. Also, drop support for the 'rev'
parameter to 'svndbadmin rebuild', adding instead a '--force' option
to 'svndbadmin update'.
Suggested, and SQL commands offered, by Mark <mark@mitsein.net>.
* lib/cvsdb.py
(CheckinDatabase.sql_delete, CheckinDatabase.PurgeRepository): New.
* bin/svndbadmin
(handle_revision): Add 'force' parameter, used to force update of
commits already recorded in the database.
(main): Add 'force' parameter, passed on to handle_revision().
Handle the new 'purge' command, and teach 'rebuild' to also purge.
(usage): Update usage info.
(__main__): Add support for 'update --force' and 'purge', and drop
support for 'rebuild rev'. Add a KeyboardInterrupt handler.
* bin/cvsdbadmin
(usage): Add 'purge' usage info.
(__main__): Rework command-line parameter handling. Add support for
'purge' command, and make 'rebuild' first do a purge.
* CHANGES
Note this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1493 8cb11bc2-c004-0410-86c3-e597b4017df7
(handle_revision): Add 'verbose' parameter, and use it.
(main): Add 'verbose' parameter, and pass it off to handle_revision().
(usage): Update the usage message (and make it a little more ... useful).
(__main__): Look for the -v (verbose) flag.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1279 8cb11bc2-c004-0410-86c3-e597b4017df7
file, templates, etc). Specifically, make the following changes:
- Get rid of hardcoded paths in module files ("lib" directory) and
configuration files (viewcvs.conf and mod_python's .htaccess)
- Allow stub scripts (for asp, cgi, and mod_python) to specify
configuration files so it's possible to have multiple configurations of
viewcvs running off a single installation.
- Be more consistent about resolving paths when they aren't hardcoded
(when ViewCVS is running from a source directory). In particular, try
not to depend on the working directory. That way it's legal to run
./standalone.py instead of bin/standalone.py without getting an
ImportError.
- Get rid of global cfg variables in viewcvs.py and cvsdb.py. They led to
all sorts of hacks in other files to pilfer and reset them. They were
also possible sources of races in multithreaded environments like
mod_python and asp.
- Rewrite mod_python handler so library paths can be specified inside the
stub files.
* lib/apache.py
removed, contained old mod_python handler
* lib/config.py
(Config.load_config):
remove sys.argv voodoo, just load the configuration path specified in
the pathname argument
(Config.set_defaults):
use relative path for cvsgraph_conf setting instead of hardcoded
<VIEWCVS_INSTALL_DIRECTORY> literal
* lib/cvsdb.py
(CONF_PATHNAME, config, cfg):
removed, configuration stuff
(CheckinDatabase.__init__, CheckinDatabase.CreateSQLQueryString):
add "_row_limit" member instead of using cfg object
(CreateCheckinDatabase):
removed, a do-nothing function
(ConnectDatabaseReadOnly, ConnectDatabase):
add cfg arguments
(GetUnrecordedCommitList):
add db argument
* lib/query.py
(CONF_PATHAME):
removed
(build_commit, run_query, main):
add cfg arguments, use new viewcvs.get_template function
* lib/viewcvs.py
(CONF_PATHNAME, cfg, g_install_dir):
removed
(Request.__init__):
add cfg member
(Request.run_viewcvs, Request.get_link, check_freshness,
get_view_template, generate_page, default_view, get_file_view_info,
format_log, common_template_data, MarkupEnscript.__init__,
markup_stream_python, markup_stream_php, make_time_string, view_markup,
sort_file_data, view_directory, paging, view_log, view_annotate,
view_cvsgraph_image, view_cvsgraph, view_doc, rcsdiff_date_reformat,
spaced_html_text, DiffSource.__init__, DiffSource._get_row, view_patch,
view_diff, generate_tarball, download_tarball, view_revision,
is_query_supported, english_query, build_commit, view_query,
view_error, main):
stop using global config, use cfg arguments or request member instead
(_install_path):
new, use __file__ to locate template and configuation paths
(get_view_template):
use _install_path and return compiled template instead of path
(is_viewable, default_view):
rename is_viewable to default_view and return view instead of boolean
(handle_config, load_config):
rename handle_config to load_config and return config object instead
of setting cfg global
* bin/cgi/viewcvs.cgi
* bin/cgi/query.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/standalone.py
* bin/svndbadmin
look for library relative to sys.argv[0] when no hardcoded library
path is available. Also add configuration loading code.
* bin/asp/viewcvs.asp
* bin/asp/query.asp
add configuration loading code
* bin/mod_python/.htaccess
specify new mod_python handler, remove reference to
<VIEWCVS_APACHE_LIBRARY_DIRECTORY>
* bin/mod_python/handler.py
added, holds new mod_python handler
* bin/mod_python/viewcvs.py
* bin/mod_python/query.py
rewrite for new handler, add hardcoded library and configuration paths
* viewcvs.conf.dist
remove references to <VIEWCVS_INSTALL_DIRECTORY>
* viewcvs-install
(FILE_INFO_LIST):
stop hardcoding paths in config files
(SetPythonPaths,):
get rid of <VIEWCVS_INSTALL_DIRECTORY> and
<VIEWCVS_APACHE_LIBRARY_DIRECTORY> substitutions
(ApacheEscape, _re_apache):
removed
(InstallTree):
stop hardcoding paths in lib directory
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1173 8cb11bc2-c004-0410-86c3-e597b4017df7
This gives me a chance to finally rename the 'www' directory to
something more in line with other CGI programs I've seen. And while
I'm here, and while we have Subversion, I might as well do many of the
reorgs I've been wanting to do for some time.
* www
Renamed to...
* bin
...this.
* standalone.py,
* tools/make-database,
* tools/svndbadmin,
* tools/loginfo-handler,
* tools/cvsdbadmin
Moved from here...
* bin/standalone.py,
* bin/make-database,
* bin/svndbadmin,
* bin/loginfo-handler,
* bin/cvsdbadmin
...to here.
* viewcvs-install
Update locations of moved files.
* viewcvs.sourceforge.net/upgrading.html
Tweak relevant documentation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1161 8cb11bc2-c004-0410-86c3-e597b4017df7