Re: [viewvc-users] multiple repositories and checkout view for 1 repo

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <4CED76DF.5000802__13259.2799295255$1290630898$gmane$org@collab.net>
On 11/24/2010 04:46 AM, Phil Jeary wrote:
> Excellent thanks, the multiple repositories bit worked perfectly.

Excellent.

> The repository specific options returned the error below, would you
> happen to know if this is due to the version?
> 
> Having said that, I found your post
> http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4252&dsMessageId=2435508
> that features the text WARNING: Do not use per-root overrides if your
> ViewVC instance is served via the standalone.py server option!  By
> any chance is that what I'm doing here (as I have root specific options
> and use standalone.py to start it)?
> 
> An Exception Has Occurred
> Python Traceback
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/viewvc.py", line 4396, in main
>     request.run_viewvc()
>   File "/usr/lib/python2.4/site-packages/viewvc.py", line 233, in run_viewvc
>     cfg.overlay_root_options(self.rootname)
>   File "/usr/lib/python2.4/site-packages/config.py", line 297, in overlay_root_options
>     assert(self.root_options_overlayed == 0)
> AssertionError

Yes, I'm afraid you've run into a known limitation with standalone.py.
(Though obviously not known-enough, or I might have remembered this *before*
giving you all that previous advice.)

> Any help would be much appreciated.

Well, if you must use standalone.py (instead of, say, Apache), then is it
feasible for you to run two different standalone.py instances, one which
uses a viewvc.conf that allows the "co" view (for all repositories), and one
with a viewvc.conf that doesn't?

Alternatively, you could avoid per-root overrides in your viewvc.conf
altogether, and patch your lib/viewvc.py code to do the root-specific stuff
you want done:

Index: lib/viewvc.py
===================================================================
--- lib/viewvc.py	(revision 2474)
+++ lib/viewvc.py	(working copy)
@@ -231,6 +231,11 @@
         # Overlay root-specific options.
         cfg.overlay_root_options(self.rootname)

+        ### CUSTOMIZATION ###
+        cfg.option.allowed_views = ['annotate', 'diff', 'markup', 'roots']
+        if self.rootname == 'Environments':
+          cfg.options.allowed_views.append('co')
+
         # Setup an Authorizer for this rootname and username
         self.auth = setup_authorizer(cfg, self.username)



-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2685452

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkztduUACgkQokEGqRcG/W49nwCeNcKiyWrZkT44/KP6hqEv/Xck
L94AoJ6hX/HT1ueu6RlcG1tZfEtZTBKA
=Yzic
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.