mercurial/merge.py
branchstable
changeset 23420 902554884335
parent 22966 ff93aa006e6a
child 23426 19ebd2f88fc7
child 23478 30b602168c3b
--- a/mercurial/merge.py	Mon Dec 01 02:11:29 2014 +0100
+++ b/mercurial/merge.py	Mon Dec 01 02:30:21 2014 +0100
@@ -827,7 +827,10 @@
 
     # Prompt and create actions. TODO: Move this towards resolve phase.
     for f, args, msg in actions['cd']:
-        if repo.ui.promptchoice(
+        if f in ancestors[0] and not wctx[f].cmp(ancestors[0][f]):
+            # local did change but ended up with same content
+            actions['r'].append((f, None, "prompt same"))
+        elif repo.ui.promptchoice(
             _("local changed %s which remote deleted\n"
               "use (c)hanged version or (d)elete?"
               "$$ &Changed $$ &Delete") % f, 0):
@@ -838,7 +841,10 @@
 
     for f, args, msg in actions['dc']:
         flags, = args
-        if repo.ui.promptchoice(
+        if f in ancestors[0] and not mctx[f].cmp(ancestors[0][f]):
+            # remote did change but ended up with same content
+            pass # don't get = keep local deleted
+        elif repo.ui.promptchoice(
             _("remote changed %s which local deleted\n"
               "use (c)hanged version or leave (d)eleted?"
               "$$ &Changed $$ &Deleted") % f, 0) == 0: