In http://lists.zooko.com/pipermail/revctrl/2005-August/000049.html,
zooko identified a mismerge case with Subversion. I'll append the
three files below.
The case is perhaps a little unfair to Subversion, because it relies
on a situation where Subversion's internal diff produces a funny (but
valid) diff between ancestor and target1:
--- init (.../init) (revision 1)
+++ init (.../1) (revision 1)
@@ -1,5 +1,10 @@
-int square(int x) {
+int fast_square(int x) {
int y = x;
+ return y * x;
+}
+
+int slow_square(int x) {
+ int y = x;
for (int i = 0; i < x; i++) y += x;
return y;
}
while gnu diff happens to produce a more natural diff. However, I
think it's also the case that diff3 requires some unmodified context
between changed lines in order to perform a clean merge, and we are
not requiring any context, which is kind of unsafe. Can anyone more
knowledgeable about libsvn_diff speak to that?
--- Ancestor ---
int square(int x) {
int y = x;
for (int i = 0; i < x; i++) y += x;
return y;
}
----------------
--- Target 1 ---
int fast_square(int x) {
int y = x;
return y * x;
}
int slow_square(int x) {
int y = x;
for (int i = 0; i < x; i++) y += x;
return y;
}
----------------
--- Target 2 ---
int square(int x) {
int y = 0;
for (int i = 0; i < x; i++) y += x;
return y;
}
----------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 10 20:47:51 2005