Svn – How to remove empty revisions from existing svn dump file

svn

I have an svn dump file which includes "empty" revisions (these were created by svnsync when synching only a subdirectory of an existing repository).

Since I'd like to use the svnsync'd repository as the new master (no need to sync again), I wanted to get rid of all the empty revisions.

Unfortunately, running the dump through svndumpfilter does not seem to remove the empty revisions, probably because svndumpfilter only looks at revisions it cleaned up by itself with the –exclude option (see also here)

I was also looking into svndumptool, but it does not seem to provide this functionality.

Is it possible to filter these revisions in any other way?

Best Answer

this is the command line that i use.. it seems to work pretty well.

svnadmin dump <path_to_repo> | svndumpfilter2 <path_to_repo> [list of paths to keep] --renumber-revs --drop-empty-revs  |bzip2 --best > svn_dumpfile_full.bz

the "list of path to keep" can be as simple as trunk

but it does require you to have access to the svn server directly.

Related Topic