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

== Case 1 ==

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:


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:

–| 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 :wink:

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…

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

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.

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 …

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.