I am currently migrating a repo from Linux to windows. The problem I am having is that when load the new repository the hierarchy is [reponame]\[reponame]
. Is there a way to move all the folders up one level?
UPDATE
used the following command to get the repo load svnadmin load [repo] > [repofile].dump
What was the repository hierarchy under Unix? Were you using http there?
I'm not 100% sure what you you mean. Are you saying that the repository contains a directory that contains the name of the repository? Or, are you saying that when you do a checkout, you now do something like this:
What does a checkout command now look like?
When you say repository are you talking about a single repository directory you created with the
svnadmin create
command, or are you talking about multiple projects in a single repository?Let's say I'm using
svnserve
to serve my repository. We'll call my repositorymyproj
and I want to serve my repository on my machinesoftserve
. When I want to do a checkout, I do this:Notice I only have the name of my server. The URL doesn't even include the name of my repository . That's because
svnserve
can only serve a single repository. If I have multiple repositories, I'll either have to have separate machines, merge all the repositories into a single repository, or use different ports.Apache can service multiple repositories, but each repository needs a virtual web directory for access, so Apache know when it sees the URL it's a Subversion repository and not a directory out of the httpdocs directory. Thus, there's at least one more directory in the Apache URL.
There are two separate ways of specifying an Apache Subversion repository. You can specify a single repository like this:
In this case, each Apache virtual directory has a single repository. Thus, when I do a checkout, my command looks like this:
Notice that there's an extra directory in this URL over the svn URL. That's because I now not only have to specify the server, but also the Apache virtual directory. In this case, I made my virtual directory names agree with my repository name. There's no reason I need to do that, but it would be silly otherwise.
As far as the user is concerned, they're just adding the repository name into the URL. It still makes sense. If I want to checkout from
myproj
, I usehttp://softserve/myproj
and if I want to checkout fromproject_two
, I usehttp://softserve/project_two
.However, sometimes a company may have hundreds of Subversion repositories they're serving off their Subversion server. Specifying each and every repository in the Apache configuration is tough, especially if they keep adding in new projects and eliminating old ones.
To get around this issue, you can use the
SVNParentPath
specification instead ofSVNPath
. This allows you to specify not the Subversion repository directory, but the parent directory where it should reside:Now, I can put all of my repositories under a single directory on my server, and Apache will automatically serve them all. When a new repository is created, I only have to put it under my
SVNParentPath
. I don't have to modify my Apache configuration.The problem is now I have to specify not only the Apache virtual directory, but also the repository name. Thus, my URL has another directory in it. (In this case, I called my Apache Parent virtual directory
source
).I just downloaded VisualSVN Server and looked at it. VisualSVN Server runs Apache in the back end. It just automatically configures it for you and creates a nice simple front end. Looking at the created Apache configuration under
C:\Program Files\VisualSVN Source\conf\httpd.conf
, I see this:I can imagine when you setup VisualSVN, it does the latter automatically. After all, that's why people will pay for VisualSVN -- it takes care of all the Apache repository handling for you. And, in your case, you did something that resulted in something like this:
And, the only repository under
C:/path/to/repository
is yourfoo
repository. Thus, your URL looks like this:So, if you put your
foo
repository underC:\Repositories
, your checkout looks like this:I didn't play around with VisualSVN Server to see if I can change the
svn
Apache virtual directory name from the front end, but I can imagine that you bought the full version that allows for more configuration, and you named your directory the same name as your repository name. Thus, you haveAnd, when you check out from
foo
, you get this:The double repository name you mentioned.
I can imagine you can hack the raw
http.conf
file to useSVNPath
instead ofSVNParentPath
, and thus your URL would be something like this:But, I don't know how Visual SVN would handle that. I suspect your best bet would be to just change your Apache virtual directory name back to the default
svn
or change it tosource
orsrc
.