[Services][Subversion] Top-level SVN at Sub-domain

5 posts / 0 new
Last post
#1 Thu, 12/03/2009 - 14:42
schivmeister

[Services][Subversion] Top-level SVN at Sub-domain

The summary should be self-explanatory. I want to be able to issue:

'svn co http://svn.foo.bar/ foo-toplevel_svn'

and get everything including trunk in the local directory "foo-toplevel_svn".

Right now what happens is that Virtualmin creates a new directory, so I end up having:

"http://svn.foo.bar/xyz"

Which would need me to issue, for the above cases respectively:

'svn co http://svn.foo.bar/xyz/trunk' 'svn co http://svn.foo.bar/xyz'

So what this does is add an extra directory level for nothing.

How would I go about doing this with Virtualmin?

== Case 2 ==

The subversion repository has specific permissions under trunk (largely because we deal with binaries under one of the dirs and we don't want the public checking them out), something like this:

trunk --| public -> access:anonymous --| private -> access:restricted --| others -> access:anonymous

I see that "Allow anonymous" is an option for when creating a subversion repository, so naturally the next logical step is to create different repositories for each dir under trunk, but I can't seem to be able to change the directory for a particular repository and neither do I see a way to create a repository and point to an existing dir.

Any and all aid greatly appreciated, thanks beforehand ;)

Mon, 12/07/2009 - 13:45
JamieCameron

For case 1, you might want to try the -d flag to svn co , which lets you set the directory files are checked out into.

For case 2, the only want to set the directory like this would be to edit the Apache configuration and change the SVNParentPath directive. I'm not sure how well SVN will take to two different repositories sharing the same directory tree though..

''

Tue, 12/08/2009 - 05:44
schivmeister

My bad, my questions are probably phrased incorrectly, because the first one is not related to Subversion at all and the second one is totally a Subversion issue.

(2) is unsolvable as apparently VirtualMin's Subversion capabilities are not "advanced". This is usually done by controlled limits set in the access file, for eg.:

[/] * = r

[/somerepo/restriced] mary = rw * =

But (1) still needs some love. The thing here is when creating a Subversion repo on a sub-server, VM adds an "svn" dir under the sub-server/domain - I do not want that.

Tue, 12/08/2009 - 11:33 (Reply to #3)
JamieCameron

Interesting, I didn't know that you can setup per-directory restrictions like that .. I may add support for this in future.

As for putting SVN at the top level (so it is svn.domain.com instead of svn.domain.com/svn), the only way to do this currently would be to modify the Apache config manually. Or perhaps you could add an Apache redirect from / to /svn ..

''

Tue, 12/08/2009 - 14:10 (Reply to #4)
schivmeister

Thanks, we got it working finally. Just thought VM might have had a way to do it.

Per-directory restrictions does have its own shortcomings, so it wouldn't be good for the masses. However, it'd definitely be a cool addition.

http://svnbook.red-bean.com/en/1.4/svn.serverconfig.pathbasedauthz.html

Cheers!