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 | <[email protected]> |
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
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2685113
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) iEYEARECAAYFAkzr7e4ACgkQokEGqRcG/W4qYACgr+WGpvRPNxUofE2XGmN6FRO1 OLgAn19PTewNKajSynLg5qAHThFs9JQ8 =U90N -----END PGP SIGNATURE-----