# HG changeset patch # User Matt Mackall # Date 2008-10-08 21:22:08 # Node ID 865c5be0f8dfa9ad1f6567c5ab0327def19efcf7 # Parent 9bc46d069a76fca828379a08cc28751885f4e2bd merge: fix bug going backwards for already reverted files (issue1303) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -185,8 +185,9 @@ def manifestmerge(repo, p1, p2, pa, over 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) diff --git a/tests/test-execute-bit.out b/tests/test-execute-bit.out --- a/tests/test-execute-bit.out +++ b/tests/test-execute-bit.out @@ -3,6 +3,6 @@ 79abf14474dc tip % make sure we notice the change of mode if the cached size == -1 n 0 -1 unset a M a -0 files updated, 0 files merged, 0 files removed, 0 files unresolved +1 files updated, 0 files merged, 0 files removed, 0 files unresolved d69afc33ff8a not executable -- whew