Mercurial > hg
changeset 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 | 9bc46d069a76 |
children | 40d105a12cac |
files | mercurial/merge.py tests/test-execute-bit.out |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
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)
--- a/tests/test-execute-bit.out Fri Oct 03 00:07:38 2008 +0300 +++ b/tests/test-execute-bit.out Wed Oct 08 16:22:08 2008 -0500 @@ -3,6 +3,6 @@ % 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