mercurial/merge.py
changeset 2913 3cef09d12010
parent 2912 dd41ad984f71
child 2914 f28f4c850cd8
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -116,7 +116,8 @@ def update(repo, node, branchmerge=False
     umap = dict.fromkeys(unknown)
 
     for f in added + modified + unknown:
-        mw[f] = ""
+        mw[f] = None
+        if f in m1: mw[f] = "" # distinguish between changed and new
         mw.set(f, util.is_exec(repo.wjoin(f), mw.execf(f)))
 
     for f in deleted + removed:
@@ -138,8 +139,8 @@ def update(repo, node, branchmerge=False
         if f in m2:
             s = 0
 
-            # is the wfile new since m1, and match m2?
-            if f not in m1:
+            # is the wfile new and matches m2?
+            if mw[f] == None:
                 if not repo.file(f).cmp(m2[f], repo.wread(f)):
                     n = m2[f]