Commit Graph

44 Commits (56c2b61458742e54b871fa0d3ce4ce289748a40a)

Author SHA1 Message Date
Vitaliy Filippov 56c2b61458 Merge with original r2905 2013-07-18 19:13:28 +04:00
vfilippov 67b205634e Bug 37020
Удалил изврат, добавив чуть меньший изврат:
Теперь в процессе установки bin-файлы не модифицируются,
а только добавляется рядом с ними файл viewvcinstallpath,
в котором прописываются пути.


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@539 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:55 +04: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 aac6bbafb9 Add '--help' option to standalone.py.
* 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
2011-05-12 18:34:12 +00:00
cmpilato 90d35a6fc1 * bin/standalone.py
(main): Revert (mostly) a wording change made in r2562.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2563 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-05-12 13:47:04 +00:00
cmpilato 91995a4241 * bin/standalone.py
(main): Rework the usage message for conciseness, and fix an old typo, too.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2562 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-05-12 13:39:12 +00:00
cmpilato eef47fbb1f * bin/standalone.py
(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
2011-05-12 13:15:32 +00:00
cmpilato 63ddc213ae * bin/standalone.py
(main): Restore alphabetical order of options listed in the usage message.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2560 8cb11bc2-c004-0410-86c3-e597b4017df7
2011-05-12 13:10:36 +00:00
cmpilato 8eeac0cd59 * bin/standalone.py
(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
2011-05-12 13:09:27 +00:00
cmpilato 963a3a2094 * bin/standalone.py
(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
2011-03-15 20:40:23 +00:00
cmpilato de95d36720 * bin/standalone.py
(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
2010-11-30 18:19:28 +00:00
cmpilato 5f50e82bda Fix issue #471 ("standalone.py won't start on Windows: no module named
'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
2010-11-16 16:02:46 +00:00
cmpilato 40df73e111 Bump some copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2463 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-09 18:19:03 +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 f548912f9a Finish issue #49 - authentication support for standalone.py.
* 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
2010-07-15 20:50:54 +00:00
cmpilato 8f9eaf9e26 * bin/standalone.py
(main): Don't accept the -g option.  (This is leftover from a
    previous change.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2413 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-07-15 20:31:17 +00:00
cmpilato 9ce6a651c7 More improvements to standalone.py.
* 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
2010-07-15 20:22:36 +00:00
cmpilato 28b4383a7b Remove the GUI mode from standalone.py. Great idea when the tool was
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
2010-07-15 19:06:09 +00:00
cmpilato e3042df5a3 * bin/standalone.py
(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
2010-07-15 18:55:23 +00:00
cmpilato 26522f7f71 * bin/standalone.py
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
2010-07-15 18:43:10 +00:00
vfilippov 6835e74f20 Merge with ViewVC 1.2-dev http://viewvc.tigris.org/svn/viewvc@2204
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@184 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-16 14:11:20 +00:00
cmpilato 211bc90343 Finish issue #402: Split the 'use_pagesize' configuration directive
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
2009-05-05 15:45:25 +00:00
cmpilato fdff86c5f4 Fix the GUI mode of standalone.py -- it wasn't even starting
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
2009-05-05 15:34:11 +00:00
cmpilato 7fd9e405a1 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2107 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-18 16:43:33 +00:00
cmpilato d1a7412c6d Remove dead code.
* lib/popen.py
  (pipe_cmds, _copy): Remove as unused.

* bin/standalone.py
  (StandaloneServer.run_viewvc): Tweak comment that referred to pipe_cmds().

Found by: Rune Halvorsen <runeh {AT} sanedefaults.net>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2088 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-02-03 03:53:25 +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 0aaeeb4398 * bin/standalone.py
(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
2008-06-19 20:06:26 +00:00
cmpilato 81b39b70a1 Add support to standalone.py for specifying a configuration file
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
2008-04-08 16:38:25 +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 b9044a9a9d Finish issue #234 - standalone.py uses not registered port per default.
According to http://www.iana.org/assignments/port-numbers, "The
Dynamic and/or Private Ports are those from 49152 through 65535".

* bin/standalone.py
  (Options): Change default port to 49152.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1515 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:56:49 +00:00
cmpilato 21f68a5118 Finish issue #261 -- detect SVN repository from standalone.
* viewvc/bin/standalone.py
  (serve): Recognize Subversion repository paths provided via -r, too.
  (cli): Update the usage message.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1453 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-17 03:50:23 +00:00
cmpilato 7e55acdc5d * viewvc/bin/standalone.py
(serve): Fix some leftover references to the old cvsnt_exe_path
    config option.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1452 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-10-17 03:38:21 +00:00
cmpilato f448035ca4 * bin/standalone.py
(GUI.__init__): Fix minor spelling errors.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1381 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 18:23:29 +00:00
cmpilato d8d2075d65 Finish issue #235.
* bin/standalone.py
  (Options):  Add daemon member.
  (cli): Add support for --daemon/-d option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1380 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-14 18:08:28 +00:00
cmpilato 08c145ddc0 * bin/standalone.py
(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
2006-07-14 17:37:48 +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 f74711446f Finish issue 168, the project rename. Change is mostly based on the patch
from Gerard Gerritsen (sigcafe), with some other stuff thrown in.

* bin/asp/viewcvs.asp
* bin/asp/viewvc.asp
* bin/cgi/viewcvs-strace.sh
* bin/cgi/viewvc-strace.sh
* bin/cgi/viewcvs.cgi
* bin/cgi/viewvc.cgi
* bin/mod_python/viewcvs.py
* bin/mod_python/viewvc.py
* lib/viewcvs.py
* lib/viewvc.py
* viewcvs.conf.dist
* viewvc.conf.dist
    the file renames

* bin/cvsdbadmin
* bin/loginfo-handler
* bin/svndbadmin
* bin/asp/query.asp
* bin/cgi/query.cgi
* bin/mod_python/query.py
* bin/make-database
* bin/standalone.py
* lib/debug.py
* lib/compat.py
* lib/blame.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/bincvs/__init__.py
* lib/query.py
* lib/config.py
* lib/dbi.py
* lib/sapi.py
* INSTALL
* TODO
* cvsgraph.conf.dist
* tests/timelog.py
* tools/make-release
* tparse/tparsemodule.h
* tparse/Setup.py
* tparse/INSTALL
* tparse/tparsemodule.cpp
* tparse/tparse.h
* tparse/tparse.cpp
* windows/README
* viewcvs-install
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* viewvc.org/license-1.html
    the other changes



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1287 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 00:33:54 +00:00
cmpilato 0b1a9fde95 Fix a bug which caused 404's for revision views of the default
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
2006-02-15 19:06:23 +00:00
cmpilato 95fd278332 Add a new --script-alias option to standalone.py, to allow folks to
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
2006-01-05 19:24:13 +00:00
rey4 dabb055603 Add RSS capability to ViewVC using patch from Paul Koning (pkoning)
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
2005-12-22 05:16:23 +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 72672b458c Tweak logic used to find installed paths ("lib" directory, configuration
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
2005-12-06 04:04:14 +00:00
cmpilato 3c9b6d1869 Tigris.org likes to use '/trunk/www' for the project htdocs stuff.
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
2005-11-12 06:15:20 +00:00