diff mercurial/merge.py @ 23426:19ebd2f88fc7

merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 01 Dec 2014 19:34:11 -0600
parents cd9e5e57064d 902554884335
children 6a92b5fcfba8
line wrap: on
line diff
--- 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: