Reputation: 13788
I have a Subversion repository that has several projects in it. I would like to 'slice off' one or more of those projects and move them to their own repositories, ideally with full fidelity (i.e. keeping all the version history intact).
Is this even possible? If so, what's the technique?
EDIT/Clarification: I know about branches and tags. That's not what I'm asking. I want to take an existing repository and split it into several smaller repositories, possibly on different physical media.
Upvotes: 2
Views: 261
Reputation: 52778
First get an up to date dump of your SVN repository:
svnadmin dump repo/
Next, filter the repository, using something like
svndumpfilter include --drop-empty-revs --renumber-revs trunk/myProj1 trunk/myProj2
Then, create the new repo, and add in trunk, tags, and branches directories (the step after this will fail without those 3 dirs):
svnadmin create newRepo
svn co file:///tmp/newRepo newRepo-checkout
svn mkdir newRepo-checkout/trunk/ newRepo-checkout/branches/ newRepo-checkout/tags
svn commit -m "Core directory structures created" newRepo-checkout/
With those 3 directories in place one can now load the dump:
svnadmin load newRepo
Once the load is complete, you can start using your new repo!
A few tutorial links:
http://grumbel.blogspot.com/2008/09/splitting-svn-repository.html
http://2tbsp.com/node/88
Upvotes: 2