Mercurial > hg-stable
changeset 5700:9cedc3fbbebb
merge: simplify merge tests, fix exec flag bug
If local changed exec bit and remote changed file contents, exec bit
change would be lost.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 27 Dec 2007 22:27:37 -0600 |
parents | 4cf5a4950fc9 |
children | 32c2832682a9 |
files | mercurial/merge.py |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Dec 27 22:28:41 2007 +0100 +++ b/mercurial/merge.py Thu Dec 27 22:27:37 2007 -0600 @@ -389,14 +389,18 @@ # are files different? if n != m2[f]: a = ma.get(f, nullid) + # are we clobbering? + if overwrite: + act("clobbering", "g", f, m2.flags(f)) + # or are we going back in time and clean? + elif backwards and not n[20:]: + act("reverting", "g", f, m2.flags(f)) # are both different from the ancestor? - if not overwrite and n != a and m2[f] != a: + elif n != a and m2[f] != a: act("versions differ", "m", f, f, f, fmerge(f), False) - # are we clobbering? # is remote's version newer? - # or are we going back in time and clean? - elif overwrite or m2[f] != a or (backwards and not n[20:]): - act("remote is newer", "g", f, m2.flags(f)) + elif m2[f] != a: + act("remote is newer", "g", f, fmerge(f)) # local is newer, not overwrite, check mode bits elif fmerge(f) != m1.flags(f): act("update permissions", "e", f, m2.flags(f))