merge: move set_exec to actions
authorMatt Mackall <mpm@selenic.com>
Sun, 17 Sep 2006 15:59:59 -0500
changeset 3103 e6818b0b8154
parent 3102 22336ad45cf2
child 3104 ef4e5d05bac4
merge: move set_exec to actions
mercurial/merge.py
--- a/mercurial/merge.py	Sun Sep 17 15:54:51 2006 -0500
+++ b/mercurial/merge.py	Sun Sep 17 15:59:59 2006 -0500
@@ -163,12 +163,12 @@
             if not queued and m1.execf(f) != m2.execf(f):
                 if overwrite:
                     repo.ui.debug(_(" updating permissions for %s\n") % f)
-                    util.set_exec(repo.wjoin(f), m2.execf(f))
+                    action.append((f, "e", m2.execf(f)))
                 else:
                     if fmerge(f, m1, m2, ma) != m1.execf(f):
                         repo.ui.debug(_(" updating permissions for %s\n")
                                       % f)
-                        util.set_exec(repo.wjoin(f), mode)
+                        action.append((f, "e", m2.execf(f)))
             del m2[f]
         elif f in ma:
             if n != ma[f]:
@@ -263,6 +263,9 @@
             repo.wwrite(f, t)
             util.set_exec(repo.wjoin(f), flag)
             updated += 1
+        elif m == "e": # exec
+            flag = a[2:]
+            util.set_exec(repo.wjoin(f), flag)
 
     # update dirstate
     if not partial: