views:

102

answers:

2

Hi all,

I've just installed Subversion on a Windows XP Pro box. Can I configure SVN in such a way that it always uses the same root directory to create a new repository with:

svnadmin create

?

So that if I do:

svnadmin create myrepository

it will automatically create a repository in for instance:

D:\data\svn\repositories\myrepository

?

Thanks in advance.

+2  A: 

We have script (which we named new-repo) in the system path that does just that. In fact, it not only creates a repository in a designated global location (which is what you are asking about) but it also creates a /trunk, /branches and /tags directory and sets up a common svn:ignore on /trunk. In our case, we also have some pre and post-commit triggers so the script automatically copies them in place automatically.

Adam Batkin
+1  A: 

According to the redbook, no.

The path argument to svnadmin is just a regular filesystem path and not a URL like the svn client program uses when referring to repositories.
Both svnadmin and svnlook are considered server-side utilities—they are used on the machine where the repository resides to examine or modify aspects of the repository, and are in fact unable to perform tasks across a network.
A common mistake made by Subversion newcomers is trying to pass URLs (even “local” file:// ones) to these two programs.

Only a custom script could achieve what you want.

VonC