I'm trying to split an old SVN repository that contains multiple projects.
I tried to dump the whole repository, filter it, then load into a new repository, but because of previous copies and renames, svndumpfilter ends with an invalid copy source path error, unless I include more folders:
svnadmin dump OldRepository > OldRepository.dump
svndumpfilter include --drop-empty-revs --renumber-revs "/UnwantedFolder1" "/UnwantedFolder2" "/WantedFolder" < OldRepository.dump > WantedRepository.dump
As a workaround, I used exclude in svnadmin dump:
svnadmin dump OldRepository --exclude "/UnwantedFolder1" --exclude "/UnwantedFolder2" --exclude "/EvenMoreUnwantedFolders" > WantedRepository.dump
I can load this dump into a new repository, the only problem is that it is full of empty revisions. I tried using svndumpfilter to eliminate them, but from the output it looks like it keeps all these revisions (and renumbers them to their original number).
svndumpfilter --drop-empty-revs --renumber-revs include "/" < WantedRepository.dump > FilteredWantedRepository.dump
Another strange thing is that even if I filter without the switches, loading the resulting dump into a new repository ends with an error:
svndumpfilter include "/" < WantedRepository.dump > NotReallyFilteredWantedRepository.dump
svnadmin create NotReallyFilteredWantedRepository
svnadmin load NotReallyFilteredWantedRepository < NotReallyFilteredWantedRepository.dump
svnadmin: E140001: Dumpstream data appears to be malformed
The only difference I found between the two dump files is that in WantedRepository.dump there is
Revision-number: 1
Prop-content-length: 10
Content-length: 10
PROPS-END
Revision-number: 2
Prop-content-length: 10
Content-length: 10
PROPS-END
While in NotReallyFilteredWantedRepository.dump the PROPS-END rows are missing.
Revision-number: 1
Prop-content-length: 10
Content-length: 10
Revision-number: 2
Prop-content-length: 10
Content-length: 10
What is the problem with the svndumpfilter's output?
How can I remove the empty revisions?