can we setup multiple repositories?

5 views
Skip to first unread message

Amit

unread,
Oct 8, 2007, 7:45:04 PM10/8/07
to Repos Server
Hello,

I have recently discovered ReposServer. i have installed the latest
version.

I wanted to setup multiple repositories on the server. (one is Test
repository and one is Prod repository) i have configured the Test
repository during the installation. I am now wondering how to
configure / setup the next repository.

I am not sure if i could use this group like a user-forum.

With Regards,
-Amit

Staffan Olsson

unread,
Oct 9, 2007, 1:29:14 PM10/9/07
to repos...@googlegroups.com
Hi Amit,

Yes, this group works as a support forum too.

There are two steps invlved to set up a new repository: 1) create the
repository with svnadmin, 2) add a new repository Location to the
Apache configuration.

To create a new repository, use the tool svnadmin in a command prompt:
> svnadmin create C:\Repositories\prod
(where C:\Repositories is the parent of your current repository)

Then update your apache configuration. The first repository is by
default configured in repos-httpd.conf (see start menu), included from
the main httpd.conf. The part you need to duplicate is the Location
entry.

------ repos-httpd.conf ------
...
# Configure the subversion repository
<Location /prod>

DAV svn
SVNIndexXSLT "/repos/view/repos.xsl"
SVNPath "C:/Repositories/prod"
SVNAutoversioning on

# Basic HTTP authentication with htpasswd users file
AuthName "production repository"
AuthType Basic
AuthUserFile "C:/ReposServer/admin/repos-users"

# Access Control List according to Subversion standard
AuthzSVNAccessFile "C:/ReposServer/admin/repos-access-prod"

...authentication settings...

</Location>
...
---------------------

Your paths may of course be different, but the only thing you must
change from the first repository is SVNPath. Login settings can be
identical. If you want custom access control for the prod repository
you need to set a new AuthzSVNAccessFile. You may also want to change
the AuthName (displayed to users in the login box).
More about these settings can be found in the Httpd section of the
subversion book:
http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html

Hope this helps. If not I'm happy to clarify.

/Staffan

Staffan Olsson

unread,
Oct 9, 2007, 1:32:29 PM10/9/07
to repos...@googlegroups.com
I forgot one thing: If you want to use the log viewer, the repository
setting in the php file will be tricky. Let me know if you need it and
I'll try to figure something out.

/Staffan

Amit

unread,
Oct 10, 2007, 6:29:06 PM10/10/07
to Repos Server
Hi Staffan,

I used the additional <Location> block for my second repository as you
showed and it works good.

Thanks a lot.

Currently we are not using the logs. We are using the basic check-in
check-out feature of SVN. Occasionally we need to see the revision
history.

Thanks again,
-Amit


On Oct 10, 3:32 am, "Staffan Olsson" <sols...@gmail.com> wrote:
> I forgot one thing: If you want to use the log viewer, the repository
> setting in the php file will be tricky. Let me know if you need it and
> I'll try to figure something out.
>
> /Staffan
>

> > On 10/9/07, Amit <amitrajpur...@gmail.com> wrote:
>
> > > Hello,
>
> > > I have recently discovered ReposServer. i have installed the latest
> > > version.
>
> > > I wanted to setup multiple repositories on the server. (one is Test
> > > repository and one is Prod repository) i have configured the Test
> > > repository during the installation. I am now wondering how to
> > > configure / setup the next repository.
>
> > > I am not sure if i could use this group like a user-forum.
>
> > > With Regards,

> > > -Amit- Hide quoted text -
>
> - Show quoted text -

skitheo

unread,
Oct 30, 2007, 7:26:54 PM10/30/07
to Repos Server
I've emailed Staffan the code to modify the style sheets to work fully
with multiple repositories from a single <Location> directive.
Hopefully, he'll roll it into the next distribution. Learned XSLT,
XML, JavaScript, XPath and XSL-FO in the process :)

Staffan Olsson

unread,
Oct 31, 2007, 12:31:40 PM10/31/07
to repos...@googlegroups.com
Great. I'll have a look at it right away. Hope you liked XSLT - it is
really an art form :)

I apologize if the homepage has had some downtime lately. I switched
to a different server and it took some time to get the DNS records
right.

/Staffan

Staffan Olsson

unread,
Nov 11, 2007, 3:18:30 AM11/11/07
to repos...@googlegroups.com
Hi,

There is now a branch of the Style project containing Theo's solution
for supporting multiple repositories at
https://labs.repos.se/data/style/branches/. It should work with the
SVNParentPath directive in Apache, see
http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig.httpd.basic.

Maybe the next version of Repos Server should be configured to work
with SVNParentPath. After all you enter a common parent folder for
repositories during the installation. I still prefer extra Location
sections because URLs are shorter, but it should be possible to
support both. We're always glad to see testimonials and contributions
to the project.

/Staffan

ucshenni

unread,
Nov 16, 2007, 12:51:09 PM11/16/07
to Repos Server
Hi. I am NEW here. I am not sure if I am 'posting' correctly.

> I forgot one thing: If you want to use the log viewer, the repository
> setting in the php file will be tricky. Let me know if you need it and
> I'll try to figure something out.

Is this somehow related to "The log script must be configured with a
root URL"
error whenever I clicked on 'Folder History' ?

I am trying to figure out to to set this correctly. Any hints??
Btw, I am configuring multiple repositories each having different user
access.

Thanks.

Staffan Olsson

unread,
Nov 17, 2007, 3:10:20 AM11/17/07
to repos...@googlegroups.com
On Nov 16, 2007 6:51 PM, ucshenni <auru...@gmail.com> wrote:
>
> Hi. I am NEW here. I am not sure if I am 'posting' correctly.
>
Hi, I don't think there is a correct way to post :)

> > I forgot one thing: If you want to use the log viewer, the repository
> > setting in the php file will be tricky. Let me know if you need it and
> > I'll try to figure something out.
>
> Is this somehow related to "The log script must be configured with a
> root URL"
> error whenever I clicked on 'Folder History' ?
>

I'll try to describe the problem with the log script and maybe you can
use Theo's solution discussed in this thread or find a different one.
The log script was a quick hack I made that runs an svn commands from
php (Funny how quick hacks never remain quick). The difficulty is that
the repository index XSLT does not know the URL to the repository (all
you see in the XML is paths relative to root). So when you click on
history, the page can't send the full url as parameter.

So the log script must have the URL hard coded. The Repos Server
installation does that for the first repository. If you check out the
source, for example the multi-repo branch, you have to enter the url
in the php script or you'll get the "must be configured" error.

Theo's solution is a javascript that reads the current URL, being in
any repository under an SVNParentPath path, and sends different
"target" to the log script depending on repository. It is the best
solution now.

You can also simply disable the log by emptying the "logUrl" parameter
in the XSLT.

> I am trying to figure out to to set this correctly. Any hints??
> Btw, I am configuring multiple repositories each having different user
> access.
>

That would be another reason to disable the log, unless all
repositories are publicly readable. You can also configure the log
with Apache's "require valid-user" which would allow all authenticated
users to see the logs from all repositories.

> Thanks.
>
I think a new version of Repos Server is not too far away (there is a
new bugfix release of PHP now and svn 1.4.6 is coming quite soon I
think), and for that version i'd like a solution to the multi-repo
scenario, including some kind of script to create new repositories.
All contributions are appreciated.

/Staffan

> >
>

ucshenni

unread,
Nov 18, 2007, 9:41:00 AM11/18/07
to Repos Server
Thanks. I managed to get the history view now. :)
I'd modified to the \repos\open\log\index.php. I hardcoded a few
stuff.

..... snip....

// 20071118: Need to hardcode the repository root. NOTE: With trailing
slash
$repo = 'file:///C:/Repositories/';
$limit = 20; // limit log length for performance reasons, advice users
to run svn client for more entries

... snip ....

isset($_REQUEST['target']) or die("Parameter 'target' is required");
// 20071118: Form the request URL: <repository>/<request history
path>. Example: 'file:///C:/Repositories/project/trunk'
//$url = $repo . $_REQUEST['target'];
$url = str_replace('tps://localhost/', $repo, $_REQUEST['target']);

I allow all user (authenticated/not authenticated) to view the
history.
Reply all
Reply to author
Forward
0 new messages