Author: cmpilato
Date: 2007-04-16 16:59:09-0700
New Revision: 1609
Modified:
trunk/CHANGES
trunk/docs/upgrading-howto.html
trunk/lib/config.py
trunk/viewvc.conf.dist
Log:
Use forward-slash (/) as the separator in config section names between
override groupings and the base configuration section that is being
overridden. Why? Besides revealing a clear heirachy of information
(which seems more intuitive to me, at least), I anticipate it being
helpful for disambiguation later, especially since neither vhosts nor
root names should have forward slashes in them.
* viewvc.conf.dist
(vhosts): Tweak the inline comments in accordance with this new plan.
* lib/config.py
(Config._process_vhost, Config._process_root_options): Expect a
forward slash (/) character where a hyphen (-) was previously
expected.
* docs/upgrading-howto.html
Update upgrade documentation with these changes.
Modified: trunk/CHANGES
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/CHANGES?view=diff&rev=1609&p1=trunk/CHANGES&p2=trunk/CHANGES&r1=1608&r2=1609
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES 2007-04-16 16:59:09-0700
@@ -17,6 +17,7 @@
* add support for disabling the checkout view (now the default state)
* add support for ranges of revisions to svndbadmin (issue #224)
* make the query handling more forgiving of malformatted subdirs (issue #244)
+ * add support for per-root configuration overrides
Version 1.0.4 (released 10-Apr-2007)
Modified: trunk/docs/upgrading-howto.html
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/docs/upgrading-howto.html?view=diff&rev=1609&p1=trunk/docs/upgrading-howto.html&p2=trunk/docs/upgrading-howto.html&r1=1608&r2=1609
==============================================================================
--- trunk/docs/upgrading-howto.html (original)
+++ trunk/docs/upgrading-howto.html 2007-04-16 16:59:09-0700
@@ -178,9 +178,11 @@
section to the "options" section.</p>
<p>Custom sections which define per-virtual-host configuration option
- overrides must now have their names prefixed with "vhost-". For
- example, the following configuration which was valid in ViewVC 1.0
- is no longer valid:</p>
+ overrides must now have their names prefixed with "vhost-". Also,
+ instead of a hyphen (-) between the virtual host name and the base
+ configuration section being overridden, now there should be a
+ forward slash character (/). For example, the following
+ configuration which was valid in ViewVC 1.0 is no longer valid:</p>
<blockquote><pre>[vhosts]
all = viewvc.*
@@ -195,7 +197,7 @@
<blockquote><pre>[vhosts]
all = viewvc.*
-[vhost-all-options]
+[vhost-all/options]
allow_tar = 1
</pre>
</blockquote>
Modified: trunk/lib/config.py
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/lib/config.py?view=diff&rev=1609&p1=trunk/lib/config.py&p2=trunk/lib/config.py&r1=1608&r2=1609
==============================================================================
--- trunk/lib/config.py (original)
+++ trunk/lib/config.py 2007-04-16 16:59:09-0700
@@ -122,7 +122,7 @@
return
# overlay any option sections associated with this vhost name
- cv = 'vhost-%s-' % (canon_vhost)
+ cv = 'vhost-%s/' % (canon_vhost)
lcv = len(cv)
for section in parser.sections():
if section[:lcv] == cv:
@@ -144,7 +144,7 @@
return None
def _process_root_options(self, parser, rootname):
- rn = 'root-%s-' % (rootname)
+ rn = 'root-%s/' % (rootname)
lrn = len(rn)
for section in parser.sections():
if section[:lrn] == rn:
Modified: trunk/viewvc.conf.dist
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/viewvc.conf.dist?view=diff&rev=1609&p1=trunk/viewvc.conf.dist&p2=trunk/viewvc.conf.dist&r1=1608&r2=1609
==============================================================================
--- trunk/viewvc.conf.dist (original)
+++ trunk/viewvc.conf.dist 2007-04-16 16:59:09-0700
@@ -666,7 +666,7 @@
#
# After you've named and defined your vhosts, you may then create new
# configuration sections whose names are of the form
-# vhost-VHOSTNAME-CONFIGSECTION. Inside those configuration sections, you
+# vhost-VHOSTNAME/CONFIGSECTION. Inside those configuration sections, you
# override the standard ViewVC options typically found in the base
# configuration section named CONFIGSECTION ("general", "option", etc.)
#
@@ -676,15 +676,15 @@
# svn = svn.yourdomain.*, viewvc.*
# cvs = cvs.yourdomain.*
#
-# [vhost-svn-general]
+# [vhost-svn/general]
# cvs_roots =
# svn_roots = svnroot: /var/svn/repos
# default_root = svnroot
#
-# [vhost-svn-options]
+# [vhost-svn/options]
# show_logs = 1
#
-# [vhost-cvs-general]
+# [vhost-cvs/general]
# cvs_roots = cvsroot: /var/cvs/cvsroot
# svn_roots =
# default_root = cvsroot
|