Удалил изврат, добавив чуть меньший изврат:
Теперь в процессе установки bin-файлы не модифицируются,
а только добавляется рядом с ними файл viewvcinstallpath,
в котором прописываются пути.
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@539 6955db30-a419-402b-8a0d-67ecbb4d7f56
* bin/standalone.py
(usage, badusage): New functions.
(main): Separate the option parsing from the option validation. Add
support for a '--help' option. On bad input, now print a suggestion
to run the script with '--help' for usage hints.
Patch concept by: Prabhu Gnana Sundar <prabhugs@collab.net>
(Heavily, heavily tweaked by me.)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2565 8cb11bc2-c004-0410-86c3-e597b4017df7
(main): Use a pristine Options() object when printing the usage
message (so the stated default values of options aren't affected
by what the user provided).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2561 8cb11bc2-c004-0410-86c3-e597b4017df7
(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
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
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
(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
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
(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
repository when root_as_url_component is disabled.
* bin/standalone.py
(StandaloneServer.is_viewcvs): Allow '?' as a path terminating
character (just like '/') when checking to see if the input path is
under ViewVC's control.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1263 8cb11bc2-c004-0410-86c3-e597b4017df7
dynamically fake a non-root location for a running ViewVC process.
Reasoning? It offends me that "viewcvs" was hardcoded in ... just
seems wrong.
* bin/standalone.py
(Options): Populate a new script_alias member.
(StandaloneServer.do_POST, StandaloneServer.is_viewcvs,
StandaloneServer.redirect, StandaloneServer.run_viewcvs): Use
options.script_alias instead of a hardcoded "viewcvs".
(cli): Parse new --script-alias/-s option for dynamically defining
the ScriptAlias. Rework the usage message for my own pleasure.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1227 8cb11bc2-c004-0410-86c3-e597b4017df7
in issue 179. (All changes are his except for a fix in standalone.py,
and a line initializing "commits.url" template variable to None
in build_commit).
* lib/config.py
* viewcvs.conf.dist
add [cvsdb] rss_row_limit config option
* lib/cvsdb.py:
(CheckinDatabase.CreateSQLQueryString): make "LIMIT" value customizable
(CheckinDatabaseQuery.__init__): set new "limit" member
(CheckinDatabaseQuery.SetLimit): new
* lib/viewcvs.py:
(_legal_params): add "limit" parameter
(common_template_data): add "rss_href" variable
(make_rss_time_string): new
(build_commit): add commits.title, commits.rev, commits.author,
commits.date, commits.url template variables
(view_query): handle "limit" parameter and new "rss" format
* templates/include/header.ezt
use new rss_href variable
* templates/rss.ezt
new
* bin/standalone.py
(run_viewcvs): set HTTP_HOST environment variable
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1212 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