Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I dump one project out of an SVN repository which contains multiple projects?

I am working with an 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't 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?

like image 934
Stacey Richards Avatar asked Dec 03 '08 13:12

Stacey Richards


People also ask

What is SVN dump?

By default, the Subversion dump stream contains a single revision (the first revision in the requested revision range) in which every file and directory in the repository in that revision is presented as though that whole tree was added at once, followed by other revisions (the remainder of the revisions in the ...


1 Answers

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 
like image 148
Avi Avatar answered Sep 20 '22 16:09

Avi