mercurial/merge.py
changeset 23426 19ebd2f88fc7
parent 23410 cd9e5e57064d
parent 23420 902554884335
child 23448 6a92b5fcfba8
--- a/mercurial/merge.py	Fri Nov 28 20:16:15 2014 +0100
+++ b/mercurial/merge.py	Mon Dec 01 19:34:11 2014 -0600
@@ -602,7 +602,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):
@@ -613,7 +616,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: