If you have a subfolder that you’d like to migrate from one repository to another SVN has some built in tools that allow you to do that.
- Open a command prompt and point it to the directory SVN is installed. For Windows that is C:\Program Files\VisualSVN Server\bin. The default Repository directory is C:\Repositories.
- Type: svnadmin dump “path to Repository” > repoDumpFile.dmp
- You’ll then to filter out everything but the sub directory you want to migrate.
Type: svndumpfilter include “Path to Subfolder” < repoDumpFile.dmp > Filtered-repoDumpFile.dmp - The above command will include all revisions even those not relevant to the subfolder you are migrating. If you’d like to remove the non relevant revisions and/or re number them you can use the below command instead of the above.
Type: svndumpfilter include “Path to Subfolder” –drop-empty-revs –renumber-revs < repoDumpFile.dmp > Filtered-repoDumpFile.dmp - Let’s create the new Repository.
Type: svnadmin create “Path to Repositories\New Repository Name” - Now we import the file.
Type: svnadmin load –ignore-uuid “Path to Repositories\New Repository Name” < Filtered-repoDumpFile.dmp
References: http://svnbook.red-bean.com