changeset 5489:3ab405e070bb

Honour the exec bit when we go back in time. Fixes issue801.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 05 Nov 2007 18:49:35 -0200
parents 247af577fe29
children bf2bb53e5d2b
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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