tags:

views:

920

answers:

1

I am working with a SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history. I've been able to use svnadmin dump to dump the entire repository and svnadmin load it into another repository, but I can find a way of dumping only one project from the original repository so I can load it into the new one. Is this possible? If so how?

Edit: Thanks, svnadmin dump with svndumpfilter worked perfectly.

+9  A: 

You can use the svndumpfilter utility to do this. The SVN book has a good explanation of how to do this.

For instance, one way would be:


$ svnadmin dump /path/to/repo 
     | svndumpfilter include /proj > dump-file
$ svnadmin create /new/proj/repo
$ svnadmin load --ignore-uuid /new/proj/repo < dump-file
$ svn rm file:///path/to/repo/proj
Avi
Thanks Avi, I've just read the docs and it look like that's what I needed.
Stacey Richards
you forgot to input the dumpfile to the svnadmin load command.
Wimmel
Thanks, Wimmel. I didn't actually forget; I forgot to escape the less-than sign. Fixed now.
Avi
it might be worth noting that the args --drop-empty-revs and --renumber-revs can be used with svndumpfilter to clean up gaps in the revision numbers
Kit Roed