diff mercurial/merge.py @ 7066:865c5be0f8df

merge: fix bug going backwards for already reverted files (issue1303)
author Matt Mackall <mpm@selenic.com>
date Wed, 08 Oct 2008 16:22:08 -0500
parents 63b5f4c73c98
children 89207edf3973
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Oct 03 00:07:38 2008 +0300
+++ b/mercurial/merge.py	Wed Oct 08 16:22:08 2008 -0500
@@ -185,8 +185,9 @@
                 if overwrite:
                     act("clobbering", "g", f, rflags)
                 # or are we going back in time and clean?
-                elif backwards and not n[20:]:
-                    act("reverting", "g", f, rflags)
+                elif backwards:
+                    if not n[20:] or not p2[f].cmp(p1[f].data()):
+                        act("reverting", "g", f, rflags)
                 # are both different from the ancestor?
                 elif n != a and m2[f] != a:
                     act("versions differ", "m", f, f, f, rflags, False)