merge: display modify/delete conflict prompts in sorted order
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 26 Nov 2014 10:25:27 -0800
changeset 23448 6a92b5fcfba8
parent 23447 815e76a45b24
child 23449 eeecf29cc397
merge: display modify/delete conflict prompts in sorted order The order is determined by manifest.diff(), which currently is not sorted. There are currently no tests for this, but we will soon add some that would be flaky without this patch.
mercurial/merge.py
--- a/mercurial/merge.py	Sun Nov 09 00:10:29 2014 -0800
+++ b/mercurial/merge.py	Wed Nov 26 10:25:27 2014 -0800
@@ -601,7 +601,7 @@
         repo.ui.note(_('end of auction\n\n'))
 
     # Prompt and create actions. TODO: Move this towards resolve phase.
-    for f, args, msg in actions['cd']:
+    for f, args, msg in sorted(actions['cd']):
         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"))
@@ -614,7 +614,7 @@
             actions['a'].append((f, None, "prompt keep"))
     del actions['cd'][:]
 
-    for f, args, msg in actions['dc']:
+    for f, args, msg in sorted(actions['dc']):
         flags, = args
         if f in ancestors[0] and not mctx[f].cmp(ancestors[0][f]):
             # remote did change but ended up with same content