Reputation: 9908
I am working on a piece of software that has four different projects. Each of these projects is stored in a separate SVN repository, with a trunk and two branches.
So it looks like this
repo1
trunk
src
branches
branch1
src
branch2
src
etc...
repo4
trunk
src
branches
branch1
src
branch2
src
What I want to do is combine these repositories into a single repository so that I can do switches, merges, and history in a single repository and not have do deal with four different ones.
So I envision it looking like this in the end
repo
trunk
project1
src
etc...
project4
src
branches
branch1
project1
src
etc...
project4
src
branch2
project1
src
etc...
project4
src
Is it possible to do this? I have looked at Combining multiple SVN repositories into one which discusses how to have trunk
branches
tags
inside each project, but I would like the projects to be contained within the different standard SVN folders (unless there is a good reason not to).
Upvotes: 1
Views: 1306
Reputation: 9908
Using the answer on the question I linked and suggestions from Wrikken, I managed to get this working.
The first step is to dump the existing repositories
svnadmin dump > project1.dmp
now create a new folder in the combined repo
svn mkdir http://myserver/svn/repo/project1
then load them into the new repository
svnadmin load --parent-dir "project1" < project1.dmp
now go into project1
folder and move
svn mv http://myserver/svn/repo/project1/trunk http://myserver/svn/repo/trunk/project1
svn mv http://myserver/svn/repo/branches/branch1 http://myserver/svn/repo/branches/branch1/project1
now delete the project1
directory
svn delete http://myserver/svn/repo/project1
and do the same for the other repos you want to merge.
Upvotes: 1