As I mentioned yesterday, I’ve been working on splitting projects out of a single repository into separate repositories. I ran into a new error:
svndumpfilter --drop-empty-revs --renumber-revs include trunk/source/project \ < old_repo.dumpfile > project.dumpfile Revision 0 committed as 0. Revision 1 skipped. Revision 2 skipped. Revision 3 skipped. Revision 4 skipped. Revision 5 skipped. Revision 6 skipped. Revision 7 skipped. Revision 8 skipped. svndumpfilter: Invalid copy source path 'trunk/source/prject'
I had to go examine the log for the repository to realize what had happened. When I originally created the project directory in the old repository, I mistyped its name. I didn’t notice until after committing the change, so I renamed it using svn rename and that was that.
Fast forward to the present, when I want to capture only the revisions that apply to the current project. I supplied the path to that project only, in its current, renamed form. svndumpfilter did exactly what I asked it to do. However, it also found a problem that resulted from my instructions: it was trying to rename a directory that didn’t exist in the newly filtered dump file, because the old name didn’t match the path that I’d specified and thus had been filtered out. The key is to include both the original path and the renamed path, thus:
svndumpfilter --drop-empty-revs --renumber-revs include trunk/source/prject \ trunk/source/project < old_repo.dumpfile > project.dumpfile
By including the old name, svndumpfilter will pick up those revisions as well, so that there is a a directory to be renamed in revision 9.