Author: philip
Date: Tue Feb 3 19:07:09 2015
New Revision: 1656893
URL: http://svn.apache.org/r1656893
Log:
Fix svnsync r0 filtering to handle svn:mergeinfo where not all
lines contain r0.
* subversion/svnsync/sync.c
(remove_r0_mergeinfo): Build up new string when r0 not present.
[In subversion/tests/cmdline/svnsync_tests_data/]
* mergeinfo-contains-r0.dump: Extend with svn:mergeinfo that has
only some, or no, lines with r0.
* mergeinfo-contains-r0.expected.dump: Adjust.
Modified:
subversion/trunk/subversion/svnsync/sync.c
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
Modified: subversion/trunk/subversion/svnsync/sync.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/sync.c?rev=1656893&r1=1656892&r2=1656893&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/sync.c (original)
+++ subversion/trunk/subversion/svnsync/sync.c Tue Feb 3 19:07:09 2015
@@ -158,6 +158,12 @@ remove_r0_mergeinfo(const svn_string_t *
svn_stringbuf_appendbytes(new_str, line, colon + 1 - line);
svn_stringbuf_appendcstr(new_str, rangelist);
}
+ else
+ {
+ if (new_str->len)
+ svn_stringbuf_appendbyte(new_str, '\n');
+ svn_stringbuf_appendcstr(new_str, line);
+ }
}
if (strcmp((*str)->data, new_str->data) != 0)
Modified:
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump?rev=1656893&r1=1656892&r2=1656893&view=diff
==============================================================================
---
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
(original)
+++
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
Tue Feb 3 19:07:09 2015
@@ -64,10 +64,10 @@ PROPS-END
Node-path: foo.txt
Node-kind: file
Node-action: add
-Prop-content-length: 86
-Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Text-content-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709
+Prop-content-length: 86
+Text-content-length: 0
Content-length: 86
K 13
@@ -83,3 +83,54 @@ V 51
PROPS-END
+Revision-number: 3
+Prop-content-length: 97
+Content-length: 97
+
+K 10
+svn:author
+V 2
+pm
+K 8
+svn:date
+V 27
+2015-02-03T18:38:47.017031Z
+K 7
+svn:log
+V 1
+m
+PROPS-END
+
+Node-path: zag
+Node-kind: dir
+Node-action: add
+Prop-content-length: 76
+Content-length: 76
+
+K 13
+svn:mergeinfo
+V 45
+/a:1,4
+/b:0,4
+/c:2-3
+/d:0-3
+/e:2,5-6
+/f:0,5-6
+PROPS-END
+
+
+Node-path: zig
+Node-kind: dir
+Node-action: add
+Prop-content-length: 55
+Content-length: 55
+
+K 13
+svn:mergeinfo
+V 20
+/a:1
+/b:2-3
+/c:4,7-8
+PROPS-END
+
+
Modified:
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump?rev=1656893&r1=1656892&r2=1656893&view=diff
==============================================================================
---
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
(original)
+++
subversion/trunk/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
Tue Feb 3 19:07:09 2015
@@ -64,10 +64,10 @@ PROPS-END
Node-path: foo.txt
Node-kind: file
Node-action: add
-Prop-content-length: 75
-Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Text-content-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709
+Prop-content-length: 75
+Text-content-length: 0
Content-length: 75
K 13
@@ -83,3 +83,54 @@ V 40
PROPS-END
+Revision-number: 3
+Prop-content-length: 97
+Content-length: 97
+
+K 10
+svn:author
+V 2
+pm
+K 8
+svn:date
+V 27
+2015-02-03T18:38:47.017031Z
+K 7
+svn:log
+V 1
+m
+PROPS-END
+
+Node-path: zag
+Node-kind: dir
+Node-action: add
+Prop-content-length: 76
+Content-length: 76
+
+K 13
+svn:mergeinfo
+V 41
+/a:1,4
+/b:4
+/c:2-3
+/d:1-3
+/e:2,5-6
+/f:5-6
+PROPS-END
+
+
+Node-path: zig
+Node-kind: dir
+Node-action: add
+Prop-content-length: 55
+Content-length: 55
+
+K 13
+svn:mergeinfo
+V 20
+/a:1
+/b:2-3
+/c:4,7-8
+PROPS-END
+
+