Fix for svndumpfilter.
Problem Reproduction Sequence:
1. Get a dump of a repository with empty revisions (for example, by
pulling a subdirectory of a remote repo with svnsync).
2. Run svndumpfilter --drop-empty-revs to filter the dump.
Revisions that were initially empty are dropped. (As well as those
Only revisions that were filtered out are dropped. Revisions that
were initially empty - remain.
This also contradicts a comment in the related code.
The following patch fixes that.
--- subversion/svndumpfilter/main.c (revision 960348)
+++ subversion/svndumpfilter/main.c (working copy)
@@ -383,12 +383,12 @@
/* Revision is written out in the following cases:
1. No --drop-empty-revs has been supplied.
2. --drop-empty-revs has been supplied,
- but revision has not all nodes dropped
- 3. Revision had no nodes to begin with.
+ but revision has nodes (possibly after some were dropped)
+ 3. It is revision 0, which should be preserved
|| (! rb->pb->drop_empty_revs)
- || (! rb->had_dropped_nodes))
+ || rb->rev_orig == 0)
/* This revision is a keeper. */
Received on 2010-07-04 18:25:53 CEST