- repository rootTo dump the project1 history into a portable, re-creatable format, first you use svnadmin dump, like this:
| - project1
| - project2
| - project3
svnadmin dump [path to repo] > repo.dumpWhich creates a dump of the entire repository into a file called repo.dump. This might take some time and is CPU intensive so it would be best to perform this outside of normal work hours...
Then use svndumpfilter to filter just for the project1 folder (see folder tree above):
svndumpfilter include project1 < repo.dump > project1.dumpIf you have nested repositories, then it breaks with a syntax error. To get around this you need to run the dump multiple times using the ‘exclude’ directive until you have what you want:
svndumpfilter exclude project2 < repo.dump >> project1.dumpAt the end you get a full svn repository that could be re-created anywhere, like this:
svndumpfilter exclude project3 < project1.dump >> project1.dump
svnadmin create /var/svn/project1svnadmin load /var/svn/project1 < project1.dump
mkdir -p ~/workingcopies/project1svn co file:///var/svn/project1~/workingcopies/project1/
No comments:
Post a Comment