5

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?

3 Answers 3

3

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.

1
  • You can use svnrdump to dump a remote repository (i.e. using a svn:// URL). This works fine in conjunction with svndumpfilter. Feb 27, 2017 at 15:45
0

Okay, I've been hesitant to answer this question, because the solution is not for the faint of heart and could drive you mad.

Try altering the dump file's content manually by removing the revisions which are empty from the dump file. You may also find that you'll need to redo all the sequences of the revision-numbers and double check for copies that the revision being copied from actually exists and/or point it to the correct revision.

Here' the tricky part, be careful editing the dump file. One slip of a extra key could cause a revision to fail from loading as all content is is hashed for check sums.

Good Luck!

1
  • Yes, I agree that this is not the most suitable way, but it might be the only way since there are no additional answers
    – Palmin
    Jan 14, 2011 at 11:01
0

actually i think you need the '-renumber-revs' option from svndumpfilter (or is it svndumpfilter2) in addition to --drop-empty-revs

1
  • I tried this and it doesn't fix the issue
    – Palmin
    Jan 14, 2011 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .