changeset 3103:e6818b0b8154

merge: move set_exec to actions
author Matt Mackall <mpm@selenic.com>
date Sun, 17 Sep 2006 15:59:59 -0500
parents 22336ad45cf2
children ef4e5d05bac4
files mercurial/merge.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: