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

Phil Jeary <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Message-ID <7998DD9B7D36F144802D0A0C3FBCBCE1044CDDFC__38883.9603205726$1290591983$gmane$org@galemail02.Galleon.local>
Excellent thanks, the multiple repositories bit worked perfectly.

Apologies though, I lacked a bit of info there didn't I!  We’re using ViewVC 1.1.7 with python2.4 on a linux box.

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

The repositories are set up as;

svn_roots = Applications: /usr/local/subversion/repos/apps,
            Environments: /usr/local/subversion/repos/Envs,
        Websites: /usr/local/subversion/repos/sites

The standard options only has;

allowed_views = annotate, diff, markup, roots
template_dir = /usr/lib/python2.4/templates/

Then at the end of the config file I added (with the additional co);

[root-Environments/options]
allowed_views = annotate, diff, markup, roots, co
template_dir = /usr/lib/python2.4/templates/

Any help would be much appreciated.

Regards,
Phil




-----Original Message-----
From: C. Michael Pilato [mailto:[email protected]] 
Sent: 23 November 2010 16:38
To: Phil Jeary
Cc: [email protected]
Subject: Re: [viewvc-users] multiple repositories and checkout view for 1 repo

On 11/23/2010 11:18 AM, Phil Jeary wrote:
> Hi all,
> 
> I’m new to Viewvc and also don’t know python.  Someone else installed 
> it and it is set up to show 2 repositories.  In a file called 
> standalone.py there is a section that gives the first repository it 
> finds the alias “Available Builds” and a subsequent one 
> “Environments”, thus clearly catering for 2 repositories;
> 
>       elif opt in ('-r', '--repository'):
>         if options.repositories: # option may be used more than once:
>           num = len(options.repositories.keys())+1
>           """symbolic_name = "Builds"+str(num)"""
>           symbolic_name = "Available builds"
>           options.repositories[symbolic_name] = val
>         else:
>           options.repositories["Environments"] = val
> 
> Is it possible to show more repositories in single instance of Viewvc, 
> or do I need to set up multiple instances of it?

The code you're looking at has been changed from what ViewVC offers by default.  The original code looks like this:

      if opt in ('-r', '--repository'):
        if options.repositories: # option may be used more than once:
          num = len(options.repositories.keys())+1
          symbolic_name = "Repository"+str(num)
          options.repositories[symbolic_name] = val
        else:
          options.repositories["Development"] = val

So, you can use -r as much as you want, resulting in repositories with such exciting names as "Repository1" and "Repository2" and "Repository423".  :-)

That said, if you can do so, I'd strongly suggest that you just use a static viewvc.conf with your repositories ("roots") defined therein, and dispense with all the -r command-line stuff.

> While searching for the answer to that I came across the fact that a 
> Checkout view existed.  Ours must be new enough that it is turned off 
> by default.  I found the allowed_views configuration to turn it on, 
> however, I was wondering if it’s possible to set it so it’s only 
> active for a specific repository?  In short, we have a repo that 
> non-IT people use for version information, it would be helpful if they 
> could download the change log from it – but I wouldn’t want them 
> downloading content from the code repositories, which they view to see 
> details of the latest bug fixes.

I believe you can do this by amending your viewvc.conf file to add a root-specific configuration section for that one repository and, in that section, define the allowed_views= option they way you want it:

   [root-ROOTNAME/options]
   allowed_views = ...

(assuming you are using a new enough ViewVC release.)

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


______________________________________________________________________

This email (and any attachments) is confidential and may contain
personal opinions which are not the views of Dovetail Services (UK)
Limited unless specifically stated.  If you have received it in error,
please delete it from your system.  Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.  Please note that:  * Dovetail Services (UK) Limited
monitors all emails sent or received, any further communication will
signify your consent to this.

Dovetail Services (UK) Ltd Registered in England and Wales Number 5412224
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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

To unsubscribe from this discussion, e-mail: [[email protected]].
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.