Honour the exec bit when we go back in time.
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 05 Nov 2007 18:49:35 -0200
changeset 5489 3ab405e070bb
parent 5488 247af577fe29
child 5490 bf2bb53e5d2b
Honour the exec bit when we go back in time. Fixes issue801.
mercurial/merge.py
--- a/mercurial/merge.py	Mon Nov 05 20:15:33 2007 +0100
+++ b/mercurial/merge.py	Mon Nov 05 18:49:35 2007 -0200
@@ -401,7 +401,10 @@
                     act("update permissions", "e", f, m2.flags(f))
             # contents same, check mode bits
             elif m1.flags(f) != m2.flags(f):
-                if overwrite or fmerge(f) != m1.flags(f):
+                # are we clobbering?
+                # is remote's version newer?
+                # or are we going back?
+                if overwrite or fmerge(f) != m1.flags(f) or backwards:
                     act("update permissions", "e", f, m2.flags(f))
         elif f in copied:
             continue