[[[
Fix for svndumpfilter.
* subversion/svndumpfilter/main.c
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.
Expected:
Revisions that were initially empty are dropped. (As well as those
filtered out.)
Observed:
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.
]]]
Index: subversion/svndumpfilter/main.c
===================================================================
--- 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
*/
if (rb->has_nodes
|| (! rb->pb->drop_empty_revs)
- || (! rb->had_dropped_nodes))
+ || rb->rev_orig == 0)
{
/* This revision is a keeper. */
SVN_ERR(svn_stream_write(rb->pb->out_stream,
[[[
Fix for svndumpfilter.
* subversion/svndumpfilter/main.c
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.
Expected:
Revisions that were initially empty are dropped. (As well as those filtered
out.)
Observed:
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.
]]]
Index: subversion/svndumpfilter/main.c
===================================================================
--- 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
*/
if (rb->has_nodes
|| (! rb->pb->drop_empty_revs)
- || (! rb->had_dropped_nodes))
+ || rb->rev_orig == 0)
{
/* This revision is a keeper. */
SVN_ERR(svn_stream_write(rb->pb->out_stream,