mercurial/merge.py
changeset 5059 8d9bdcbb2b18
parent 5042 f191bc3916f7
child 5060 2ef14e29e538
child 5096 ad6b97132b81
--- a/mercurial/merge.py	Thu Aug 02 13:03:25 2007 +0200
+++ b/mercurial/merge.py	Thu Aug 02 12:29:10 2007 -0500
@@ -415,10 +415,10 @@
                     updated += 1
                 else:
                     merged += 1
-            if f != fd and move:
+            util.set_exec(repo.wjoin(fd), "x" in flags)
+            if f != fd and move and util.lexists(repo.wjoin(f)):
                 repo.ui.debug(_("removing %s\n") % f)
                 os.unlink(repo.wjoin(f))
-            util.set_exec(repo.wjoin(fd), "x" in flags)
         elif m == "g": # get
             flags = a[2]
             repo.ui.note(_("getting %s\n") % f)