mercurial/merge.py
branchstable
changeset 20415 e4d7cbc94219
parent 20280 95b9c6149e17
child 20588 4c4cd64c754b
--- a/mercurial/merge.py	Wed Feb 05 17:23:35 2014 -0600
+++ b/mercurial/merge.py	Mon Feb 10 00:43:54 2014 +0100
@@ -343,7 +343,12 @@
                 else:
                     actions.append((f, "g", (fl2,), "remote created"))
         elif n2 and n2 != ma[f]:
-            prompts.append((f, "dc")) # prompt deleted/changed
+            different = _checkunknownfile(repo, wctx, p2, f)
+            if not force and different:
+                aborts.append((f, "ud"))
+            else:
+                # if different: old untracked f may be overwritten and lost
+                prompts.append((f, "dc")) # prompt deleted/changed
 
     for f, m in sorted(aborts):
         if m == "ud":