There is a project projectA in repoX (http://server/repoA/turnk/projectA), now you need to migrate projectA from repoX to repoY.
1. Dump projectA from repoX
svnrdump dump http://server/repoX/turnk/projectA > projectA.dump
2. Filter the dump file, remove the empty revision, and remove the /trunk directory
cat projectA.dump | svndumpfilter --drop-all-empty-revs --renumber-revs include /trunk/projectA > projectA.dump.new
3. Import into the new repoB
svnadmin load --bypass-prop-validation http://server/repoY < projectA.dump.new
Problems encountered during the migration process,
- When #2 filters empty revisions, I don't know why, svndumpfilter will also filter out some non-empty revisions. You must use cat plus pipe character to correctly filter empty revisions.
- In #2 filtering, if the directory after inclde specifies "/" instead of "/trunk/projectA", the error "/trunk" aleady exists will be reported when #3 is imported.
- Before the formal import, you can use the command svnadmin create testRepo to create a local repo locally for testing. For example, if this command is executed in the /Users/shqu/svn directory, the SVN address of testRepo is file:///Users/shqu/svn/testRepo