(main): Switch to sequence syntax to prevent future headache:
'-h' in ('--help') returns True, which is not what we expect.
'-h' in ['--help'] returns False, which is what we want.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2559 8cb11bc2-c004-0410-86c3-e597b4017df7
(main): Fix broken option handling: -d expected an argument, -c
didn't and was doubly associated with both --config-file and
--htpasswd-file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2538 8cb11bc2-c004-0410-86c3-e597b4017df7
(has_crypt, _check_passwd): If 'crypt' isn't available, look for
'fcrypt' and use it instead.
(main): Always show --htpasswd-file option, but raise an informative
error if someone tries to use it when there's no cryptographic support.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2478 8cb11bc2-c004-0410-86c3-e597b4017df7
'crypt'") by making htpasswd file support optional (based on the
availability of the 'crypt' module).
* bin/standalone.py
(): Conditionally import 'crypt' and define _check_passwd() helper function.
(ViewVCHTTPRequestHandler.validate_password): Use _check_passwd() now.
(main): Conditionally built accepted options list and usage string based
on whether 'crypt' is available.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2473 8cb11bc2-c004-0410-86c3-e597b4017df7
still generating the same defaults as before.
* conf/viewvc.conf.dist
(query, query.viewvc_base_url): New section and value.
* lib/config.py
(_base_sections): Add 'query'.
(Config.set_defaults): Set default value for cfg.query.viewvc_base_url.
* bin/asp/query.asp,
* bin/cgi/query.cgi,
* bin/mod_python/query.py,
* bin/wsgi/query.fcgi,
* bin/wsgi/query.wsgi,
Ask the configuration for the location of ViewVC before falling back
to old defaults.
* templates/query.ezt
Don't reference unset variables. Do test the log message for
empty-ness, dropping a non-breaking space in place where it is.
* templates/include/footer.ezt
Don't reference unset variables.
* lib/query.py
(build_commit): Allow ob.log to be empty. Don't generate ViewVC
links if we don't have a base URL for ViewVC.
(main): Calculate docroot in light of possible absent viewvc_link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2458 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
* bin/standalone.py
(Options.htpasswd_file): New variable.
(AuthenticationException): New.
(ViewVCHTTPRequestHandler.handle_request): Handle AuthenticationException.
(ViewVCHTTPRequestHandler.validate_password): New.
(ViewVCHTTPRequestHandler.run_viewvc): If htpasswd authentication is
enabled, then complain about missing authn creds, and validated
any presented creds.
(main): Present and handle the new --htpasswd-file option. Also, do
some rudimentary validation of --htpasswd-file and --config-file values.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2414 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/standalone.py
(NotViewVCLocationException): New exception.
(ViewVCHTTPRequestHandler.do_GET, ViewVCHTTPRequestHandler.do_POST):
Now just thin wrappers around...
(ViewVCHTTPRequestHandler.handle_request): ...this new function.
(ViewVCHTTPRequestHandler.is_viewvc): Allow for the case where the
script alias is empty (a server root deployment).
(ViewVCHTTPRequestHandler.redirect): Remove as unused (the code's
been merged into handle_request()).
(ViewVCHTTPRequestHandler.run_viewvc): Do the is_viewvc() check here
now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2411 8cb11bc2-c004-0410-86c3-e597b4017df7
simpler, but I've not done it justice in terms of upkeep.
* bin/standalone.py
(__author__, __date__, __version__, __credits__): Removed in favor of a
a simple header comment.
(Options.start_gui): Removed this member variable.
(nogui, gui): Removed.
(main): Was 'cli'. Remove all option handling for, and usage
references to, GUI mode.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2409 8cb11bc2-c004-0410-86c3-e597b4017df7
(Options): Minor formatting and noop logic changes.
(ViewVCHTTPServer): Was ViewVC_Server; move to module scope.
(ViewVCHTTPRequestHandler): Was ViewVC_Handler; move to module scope.
(serve): Track class renames.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2408 8cb11bc2-c004-0410-86c3-e597b4017df7
Reformat this file for consistency with other bits of ViewVC. There
*should* be no meaningful logic changes in this commit. (If there
are, it's probably a mistake.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2407 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
into two: 'log_pagesize' and 'dir_pagesize', individually controlling
the size of pages used (if at all) for the revision log and directory
views, respectively.
* conf/viewvc.conf.dist
(use_pagesize): Removed, in favor of...
(dir_pagesize, log_pagesize): ...these.
* lib/viewvc.py,
* lib/config.py,
* bin/standalone.py
Replace the use and tooling around 'use_pagesize' with
'dir_pagesize' and 'log_pagesize' as appropriate.
* templates/include/paging.ezt,
* templates/include/dir_header.ezt
Stop using the option value to determine whether or not to show
pagination UI. Use the presence of some pages instead.
* docs/upgrading-howto.html
Note the changes in options.
Patch by: Lei Zhang <thestig{_AT_}google.com>
(Tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2142 8cb11bc2-c004-0410-86c3-e597b4017df7
correctly, and we don't need a toggle for 'enscript' any more.
* bin/standalone.py
(GUI.__init__): Pass the configuration file to handle_config().
Lose 'enscript'-related stuff.
(GUI.toggle_use_enscript): Remove.
(cli): Fix call to gui(), dropping bogus parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2140 8cb11bc2-c004-0410-86c3-e597b4017df7
effectively allowing for non-interactive operation.
* bin/make-database
(INTRO_TEXT): Removed, merged into the usage message printed by...
(usage_and_exit): ...this new function.
(__main__): Add new command-line parsing logic, including support of
new options (--username, --hostname, --password, --dbname) and the
replacement of the --bonsai-compatible option with a more generic
--version.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2079 8cb11bc2-c004-0410-86c3-e597b4017df7
Ability to connect to MySQL through UNIX socket
diff links in query.py are shown now (moved expand_root_parents to config.py)
full-text comment searches in query and query_form are supported using MySQL FULLTEXT indexes
<select> for repository selection in query
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@5 6955db30-a419-402b-8a0d-67ecbb4d7f56
modules were renamed), and merge r1933 (in which the 'imp' module is
used to more directly deal with the import cycle problem).
* docs/upgrading-howto.html
Remove upgrading notes about renamed modules since, now, they aren't
renamed any more.
* viewvc-install
Note re-renamed paths.
* bin/mod_python/viewvc_mp.py,
* bin/mod_python/query_mp.py
Rename these back ...
* bin/mod_python/viewvc.py,
* bin/mod_python/query.py
... to these, and use the 'imp' module to load libraries from
specific locations.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1994 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
(cli): Add 'host' to the list of accepted long options.
Patch by: Larry Shatzer, Jr. <larrys {at} gmail.com>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1962 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
(__main__): Add some comments, and don't use the --host option with
'mysql' if you don't have to.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1904 8cb11bc2-c004-0410-86c3-e597b4017df7
handle Control-C more cleanly.
* bin/make-database
(INTRO_TEXT): Update this text for accuracy and clarity.
(__main__): Prompt the user for the database server hostname
(defaulting to 'localhost'), and use the result with the --host
argument to 'mysql'. While here, catch the KeyboardInterrupt
exception and silently terminate rather than raising a stacktrace.
Patch partially by Philip M. Gollucci <pgollucci {at} p6m7g8.com>.
Also:
* CHANGES
Note this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1902 8cb11bc2-c004-0410-86c3-e597b4017df7
location on the command-line.
* bin/standalone.py
(handle_config): Add 'config_file' parameter.
(serve): Update call to handle_config().
(cli): Parse the -c / --config-file argument, and describe it in the
usage message. Also, disallow it when asked to be in GUI mode.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1840 8cb11bc2-c004-0410-86c3-e597b4017df7
* bin/cvsdbadmin
Update calls to vclib.ccvs.CVSRepository() to account for new
'authorizer' parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1778 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* 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
(Cvs1Dot12ArgParse): Handle the imported sources case, too. Thanks to
Mark Keisler <mark@mitsein.net> for pointing this out in IRC today.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1627 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
Add some more debugging, and consume stdin so CVS's pipe doesn't
back up (which causes an abort()).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1518 8cb11bc2-c004-0410-86c3-e597b4017df7
Fix the loginfo-handler's argument handling so that it works with
single-file commits in CVS 1.12.x.
Patch by: Cristian Tibirna <ctibirna@giref.ulaval.ca>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1517 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/cvsdb.py
(CheckinDatabase.AddCommit): Set plus_count and minus_count
explicitly to '0', which seems to be required for some folks'
MySQL installations.
* bin/make-database
Explicitly declare that we want tables of type "MyISAM".
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1500 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
* bin/make-database
Up the length of the people table's 'who' column to 128 characters.
Suggested by: Ted Mielczarek <luserspaz@tigris.org>
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1492 8cb11bc2-c004-0410-86c3-e597b4017df7
introduced in CVS's 1.12 line.
Issue number(s): 257
Patch mostly by: Mark <mark@mitsein.net>, tweaked by me.
* bin/loginfo-handler
(Cvs1Dot12ArgParse): New.
(HeuristicArgParse): Update comment -- the problems is no longer
with "current" CVS, but with "older" ones.
(__main__): Detect the use of newer CVS loginfo formatting, and
parse the arguments accordingly. Also, clean up some indentation
inconsistency.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1463 8cb11bc2-c004-0410-86c3-e597b4017df7
cvsdbadmin script.
* bin/cvsdbadmin
(UpdateFile, RecurseUpdate, RootPath): Add new 'quiet_level'
argument. Callers updated.
(usage): Rewrite to indicate the existence of the new -q flag, and
to look more like the svndbadmin usage message.
(__main__): Parse the new -q argument.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1462 8cb11bc2-c004-0410-86c3-e597b4017df7
overlooked in that revision. This fixes issue #264, reported against
the nightly build.
* bin/loginfo-handler
(ProcessLoginfo): Pass cfg.utilities instead of cfg.general to
BinCVSRepository().
* bin/cvsdbadmin
(usage): Pass cfg.utilities instead of cfg.general to
BinCVSRepository()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1431 8cb11bc2-c004-0410-86c3-e597b4017df7
(cli): Tweak the layout of the usage message, print it to stderr,
and report error details.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1379 8cb11bc2-c004-0410-86c3-e597b4017df7
cvs 1.12.9. Based on bug report and patch from sourceforge user
"grubert" in issue 151
* bin/loginfo-handler
(HeuristicArgParse): accept alternate command lines for
commits of new and imported directories
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1345 8cb11bc2-c004-0410-86c3-e597b4017df7
individual modules or directories underneath a cvs root. It will
now crawl up the directory path looking for a CVSROOT directory
so it can use the right path for the "repositories" table and
allow results to show up in queries
* bin/cvsdbadmin
(RootPath): new
(__main__ section): use RootPath to find correct cvs roots
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1285 8cb11bc2-c004-0410-86c3-e597b4017df7