Commit Graph

1450 Commits (2efd7cc4afbc14b8a05816ff283a659d0ae5562d)

Author SHA1 Message Date
cmpilato 2efd7cc4af Unify the allowable views configury, and all support for disabling the
checkout view.  The former is for sanity, the latter for security.

* viewvc.conf.dist
  (allow_tar, allow_annotate, allow_markup): Removed.
  (allowed_views): New.

* lib/config.py
  (Config._force_multi_value): Add 'allowed_views'.
  (Config.set_defaults): Set default for 'allowed_views'; no longer set
    defaults for 'allow_tar', 'allow_annotate', 'allow_markup'.

* lib/viewvc.py
  (default_view, view_directory, download_tarball, get_file_view_info,
   view_annotate, view_diff, build_commit, view_revision, view_markup,
   view_checkout): Track changes, adding code to prevent checkout view
    URL generation when the view is disabled, and doing the same for
    markup views (which should have already been done, since we already
    had an allow_markup option!)

* templates/query_results.ezt
* templates/markup.ezt
* templates/directory.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/annotate.ezt
  Don't assume checkout and markup views are present.

* docs/upgrading-howto.html
  Update to show the configuration changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1544 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-27 19:03:37 +00:00
cmpilato 676ee09745 Rename the 'rev' view to the 'revision' view (at the CGI param level).
* lib/viewvc.py
  (_views): Rename the 'rev' view to the 'revision' view.  (This has
    always bugged me.)
  (Request.run_viewvc): Redirect old 'view=rev' URLs to 'view=revision'.

* docs/url-reference.html
  Update to reflect new URL syntax (and compatability support).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1543 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-27 17:39:43 +00:00
cmpilato ac39b5ec6c * docs/url-reference.html
Reformat to (mostly) fit in 80 columns.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1542 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-27 17:31:33 +00:00
cmpilato 68a7d107e2 * lib/viewvc.py
(_orig_path, common_template_data, view_directory, view_revision,
   setup_diff): Catch vclib.InvalidRevision exceptions from
    repos._getrev(), and re-throw them as ViewVCExceptions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1539 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-12 15:06:50 +00:00
cmpilato ea04c73b36 * templates/error.ezt
Only show the stacktrace when we've not provided a user-friend error
  message.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1538 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-12 14:54:10 +00:00
cmpilato 5443c117e6 * bin/mod_python/viewvc_mp.py,
* bin/mod_python/query_mp.py
  Remove unnecessary reload() statements.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1537 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-09 16:37:51 +00:00
cmpilato ef89f0db73 Rename the Mod_Python stub scripts to avoid triggering an import loop
detection error.

* bin/mod_python/viewvc.py,
* bin/mod_python/query.py
  Renamed these ...

* bin/mod_python/viewvc_mp.py,
* bin/mod_python/query_mp.py
  ... to these.

* viewvc-install
  Track the renamed stub scripts.

* docs/upgrading-howto.html
  Note the change to the Mod_Python stub script names.
  



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1536 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-09 16:04:31 +00:00
cmpilato 3c0ab3e163 * INSTALL
Add a note about the security implications of the checkout view,
  suggested by Moritz Naumann <security@moritz-naumann.com>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1535 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-27 15:38:49 +00:00
cmpilato 300a8236cb Robustness fixes in the query stuffs where empty or missing revision
metadata occurs.

* lib/cvsdb.py
  (Commit.SetTime, Commit.GetTime, CheckinDatabase.AddCommit): Handle
    missing dates.

* bin/svndbadmin
  (SvnRev.__init__): Handle missing or invalid datestamps.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1534 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-26 20:20:04 +00:00
cmpilato 891dfa4b85 Robustness fixes where empty or missing revision metadata occurs.
* lib/vclib/svn/__init__.py
  (_datestr_to_date): Make this function more robust in the face of
    bogus datestamps.

* lib/viewvc.py
  (htmlify, format_log, make_time_string, make_rss_time_string,
    build_commit, view_directory): Make this functions more gracefully
    handle "None" revision metadata, and not generate data like
    "Unknown date" or "&nbsp;".
  
* templates/log.ezt,
* templates/markup.ezt,
* templates/rss.ezt,
* templates/revision.ezt,
* templates/log_table.ezt
  Handle empty revision metadata more gracefully.  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1533 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-26 19:28:48 +00:00
cmpilato e4527a3732 Un-bind ViewVC's core libraries from the assumption that sys.stdout is
the output stream.

* lib/viewvc.py
  (copy_stream): Don't supply a default value for 'dst', and don't
    special-case a value of None for it, either.
  (view_checkout, view_cvsgraph_image, view_doc): Pass
    request.server.file() as the 'dst' parameter to copy_stream().
  (view_patch): Pass request.server.file() as the 'dst' parameter to
    copy_stream().  Also, use request.server.file() instead of
    sys.stdout.
  (download_tarball): Use request.server.flush() instead of
    sys.stdout.flush().
  (view_error): Use server.file() instead of sys.stdout.

* lib/query.py
  (main): Use server.file() instead of sys.stdout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1532 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-26 18:07:19 +00:00
cmpilato 169aba8c30 * viewvc.conf.dist (use_source_highlight): Default to 0.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1531 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-13 15:21:39 +00:00
cmpilato 3c426916d4 Add new CHANGES item for source-highlight integration.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1530 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 22:30:46 +00:00
cmpilato 8254d2d876 I think I'm finished messing around with source-highlight integration
now.  No, really!

* INSTALL
  Okay, no more messing around with lesser version.  source-highlight
  2.5 it is.

* lib/viewvc.py
  (MarkupSourceHighlight.__init__): Use 'sed' to strip unnecessary
    leading and close tags generated by source-highlight.  Also, pass
    a value of "l_" for the line number reference prefix, which makes
    this consistent with highlight's line IDs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1529 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 22:16:44 +00:00
cmpilato 85f7720267 Miscellaneous cleanups around the source-highlight integration.
* templates/docroot/styles.css
  Remove source-highlight styles.  We can't reliably get that program
  to generate real style names.

* viewvc.conf.dist
  (source_highlight): Fix the sample path.

* lib/viewvc.py
  (MarkupSourceHighlight): Rework this to pipe the file contents into
    source-highlight on stdin, and don't try to enable CSS output or
    anything fancy, because source-highlight has too many bugs in this
    area.  Use --failsafe mode.

* INSTALL
  Change the recommendation for the version of source-highlight.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1528 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 21:52:30 +00:00
cmpilato 436e10e74c Add notes to INSTALL about using source-highlight.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1527 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 20:19:54 +00:00
cmpilato 473b853a5b Add optional integration with GNU source-highlight. Patch against
ViewVC 1.0.3 by Dirk Jagdmann <doj@tigris.org>, tweaked to adhere to
ViewVC 1.1-dev code and conventions by myself.

* viewvc.conf.dist
  (utilities.source_highlight, options.use_source_highlight,
   options.source_highlight_line_numbers): New.

* templates/docroot/styles.css
  Add new default styles for source-highlight output mode.

* lib/viewvc.py
  (MarkupSourceHighlight): New.

* lib/config.py
  (set_defaults): Set default values for utilities.source_highlight,
    options.use_source_highlight, and options.source_highlight_line_numbers.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1526 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 16:42:48 +00:00
cmpilato 77446e313a * lib/vclib/svn_ra/__init__.py
(created_rev): Because the way ra.svn_ra_get_dir() seems to work
    differently across versions of the Subversion Python bindings,
    build in some fault tolerance.  
    Tested by Eric Hanchrow <offby1@blarg.net>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1525 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-31 21:08:45 +00:00
cmpilato 310db99e62 * lib/vclib/svn_ra/__init__.py
(created_rev): Update use of ra.svn_ra_get_dir().

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1524 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-31 19:39:13 +00:00
cmpilato b597b6a485 Minor comment tweaks.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1523 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-26 20:03:03 +00:00
cmpilato e7014db4cf Update the INSTALL file.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1521 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-26 16:49:13 +00:00
cmpilato 8f5e381f21 Fix issue #284 - Regression: "Modify query" link no longer functions.
* lib/viewvc.py
  (view_query): Restore a queryform_href calculation incorrect
    abstracted out (probably by me).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1520 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 20:56:28 +00:00
cmpilato b7af5fc568 * bin/loginfo-handler
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
2007-01-23 19:51:05 +00:00
cmpilato 7e0d117de8 * bin/loginfo-handler
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
2007-01-23 19:50:05 +00:00
cmpilato 95f5f3bc9c * CHANGES
Note the fix for issue #234, committed in r1515.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1516 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 19:46:13 +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 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 c8645305c5 * CHANGES
Add the bugfix for issue #221 completed in r1512.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1513 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:33:20 +00:00
cmpilato 4750fd345c Finish issue #221 - Annotate confused by long author names
* lib/vclib/svn/__init__.py
  (_rootpath2url): New helper, cored from BlameSource.__init__().
  (BlameSource): Rework this class to use the Subversion client Python
    bindings, specifically a call to svn_client_blame2().
  (SubversionRepository.annotate): Use new _rootpath2url(), and
    update the called to BlameSource().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1512 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:31:02 +00:00
cmpilato 4f1259d64d * lib/vclib/svn/__init__.py
(_rev2optrev): Moved here from the svn_ra module.

* lib/vclib/svn_ra/__init__.py
  (_rev2optrev): Moved to the svn module (now pulled in indirectly).
  (SubversionRepository.__init__): Fix a leftover instance of a pool.
    Also, add a comment about svn_cmdline_setup_auth_baton().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1511 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 17:22:17 +00:00
cmpilato ead2d603a2 * CHANGES
Note new search-by-log-message feature, committed in r1509.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1510 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 16:24:49 +00:00
cmpilato 79fe3a2919 Finish issue #22 - Query on Log Messages.
Add the ability to query the commit database by log message comment in
addition to the existing query parameters.

Patch by: David Skyba <davidskyba@users.sourceforge.net>

* lib/cvsdb.py
  (CheckinDatabase.CreateSQLQueryString): Add support for filtering
    query results by log message.
  (CheckinDatabaseQuery.__init__): Add new comment_list member.
  (CheckinDatabaseQuery.SetComment): New.

* lib/viewvc.py
  (_legal_params): Add 'comment' and 'comment_match' as valid query
    parameters.
  (view_queryform): Populate new 'comment' and 'comment_match' data
    dictionary items.
  (english_query, view_query): Handle the new 'comment' and
    'comment_match' query items.

* templates/query_form.ezt
  Add UI for filtering queries by log message.

* docs/url-reference.html
  (Query View): Note new comment= and comment_match= URL parameters.

* docs/template-authoring-guide.html
  (variables-query_form): Note new comment and comment_match data
    dictionary items.





git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1509 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 16:22:40 +00:00
cmpilato c3aabd8b7c Finish issue #12 -- Long paths in tarballs get truncated.
Use a GNU tar extension when path names longer than 100 characters are
being packaged in our tarball output.  

Patch by: Klaus Rennecke <marion@users.sourceforge.net>

I tested this on a Solaris box that had both the native tar program
and GNU tar.  Without the patch, but the native and GNU tar programs
created files with truncated filenames.  With the patch, GNU tar worked as
expected; the native tar program created a '././@LongLink' file
whose contents were the long path, and additionally created the
file with the truncated path.

* lib/viewvc.py
  (generate_tarball_header): For paths longer than 100 characters, use
    a GNU tar extension which allows arbitrary path links.  Also, fix
    the "version" header item to be '00', not \0.
    
* templates/include/dir_footer.ezt
  Change the "download tarball" link text to indicate that we are
  now generating GNU tarballs.

  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1507 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-23 15:35:44 +00:00
cmpilato 5977b3c4fe * lib/compat.py
(mkdtemp): Fix the compatibility implementation's use of mktemp(),
    which prior to Python 2.3 (the same release that mkdtemp() shows
    up) only supported a single "suffix" argument.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1506 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-22 17:25:07 +00:00
cmpilato 59ecb71c51 * lib/viewvc.py
(view_directory): Initialize file.size, too.  A follow-up to r1504.
  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1505 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-22 17:15:24 +00:00
cmpilato ed664972cb Optimize directory displays where paging is enabled and sorting by
filename by first sorting, then only fetching the extended revision
metadata information for the items that would survive the page
filtering.

Patch by: Gustavo De Nardin <gustavodn@mandriva.com>
          (Tweaked by me.)

* lib/viewvc.py
  (view_directory): Only fetch dirlogs for directory entries that will be 
    on "this page".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1504 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-18 20:38:03 +00:00
cmpilato 9b625017bb * viewvc.org/faq.html
Drop a skeletal FAQ page into place, but don't hook it into the rest
  of the site, seein' as how there's no real content here yet.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1503 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-11 13:29:41 +00:00
cmpilato e0221b21bf Provide another hint to folks for whom ViewVC can't find Subversion bindings.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1502 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-08 21:28:19 +00:00
cmpilato 04cb1cd74d Finish issue #262 - svndbadmin doesn't commit data to MySQL InnoDB tables
* 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
2007-01-05 23:05:14 +00:00
cmpilato cf862e4e68 * lib/cvsdb.py
(CheckinDatabase.AddCommit): Add some newlines, to purty up the
    Exception string.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1499 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-05 16:07:05 +00:00
cmpilato 497cc24bbe * lib/cvsdb.py
(CheckinDatabase.AddCommit): Add some more information to any Exceptions
    received while adding commits to the database.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1498 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-04 23:05:39 +00:00
cmpilato 39eab459b4 * lib/viewvc.py
(MarkupHighlight.__call__): Minor indentation fix.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1497 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-04 19:22:35 +00:00
cmpilato 942d84818e Fix issue #280. Follow-up to r1493 with tweaks to INSTALL for the new
svndbadmin usage.

* INSTALL
  (SQL CHECKIN DATABASE): Recommend the use of 'svndbadmin update REV'
    in post-commit hooks, and 'svndbadmin update --force REV' in
    post-revprop-change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1496 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-03 14:37:25 +00:00
cmpilato 6a03c7a4dd Add a new "uri" format to EZT.
NOTE: This is not currently used in ViewVC.  I needed it in another
piece of software, but wanted the tweaks to be publicly available
somewhere.

* lib/ezt.py
  (FORMAT_URI, _uri_printer): New.
  (_printers): Add mapping for new URI-formatting code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1495 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-02 15:39:51 +00:00
cmpilato dbf67f4c0b Add some missing issue IDs to CHANGES entries.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1494 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-21 21:44:42 +00:00
cmpilato a1c093ca2c For Issue #271, implement 'purge' commands for both cvsdbadmin and
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
2006-12-21 20:51:24 +00:00
cmpilato c6db566501 Finish issue #276.
* 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
2006-12-21 16:54:41 +00:00
cmpilato 1d2b2d9c35 Allow highlight to choose the syntax language based on the file's
extension and contents.

Patch by: Christophe Delmon <cdelmon@tigris.org>

(Now, if only we could make highlight stop telling us via Apache's
error_log every time it doesn't recognize a filetype...)

* lib/viewvc.py
  (MarkupHighlight.__init__): No longer calculate the file extension,
    and drop the --syntax argument to highlight.
  (MarkupHighlight.__call__): New.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1491 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-21 16:26:03 +00:00
cmpilato 862d5b7132 Make viewvc-install able to be run from an arbitrary location (instead
of requiring that you run it while sitting in its containing directory).

* viewvc-install
  (_actual_src_path): New helper function.
  (replace_file): Move this functionality into...
  (install_file): ...here.  Also, normalize some variable names for
    consistency with...
  (install_tree): ...this.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1488 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-20 18:08:44 +00:00
rey4 bc295fb361 Interpret relative paths in viewvc.conf as being relative to the
directory where that file resides, instead of being relative to the
grandparent directory of viewvc.py. 

This change lets you set up multiple installations of ViewVC that 
share a common library directory, but are otherwise independent. It
also allows ViewVC to work more nicely with Gentoo's webapp-config.

Warning: This change may break ViewVC installations that use
VIEWVC_CONF_PATHNAME settings pointing at configuration files outside
the ViewVC install directory.

* lib/config.py
  (Config.path): new method returning paths relative to config file

* lib/viewvc.py
  (_install_path): removed function
  (get_view_template, view_cvsgraph_image, view_cvsgraph, view_doc):
    call cfg.path instead of _install_path
  (load_config): replace call to _install_path with equivalent inline
    code

* viewvc.conf.dist
    update comments referring to ViewVC install directory

* CHANGES
    document this change


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1487 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-20 16:37:34 +00:00