changeset 30859:086c37652735 stable

merge: more safe detection of criss cross merge conflict between dm and r 41f6af50c0d8 introduced handling of a crash in this case. A review comment suggested that it was not entirely obvious that a 'dm' always would have a 'r' for the source file. To mitigate that risk, make the code more conservative and make less assumptions.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 01 Feb 2017 02:10:30 +0100
parents 2d6b86cadc10
children e1526da1e6d8
files mercurial/merge.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Jan 30 18:03:17 2017 -0500
+++ b/mercurial/merge.py	Wed Feb 01 02:10:30 2017 +0100
@@ -1039,8 +1039,7 @@
         for f in dms:
             dm, (f0, flags), msg = actions[f]
             assert dm == 'dm', dm
-            m, args, msg = actions[f0]
-            if m == 'r':
+            if f0 in actions and actions[f0][0] == 'r':
                 # We have one bid for removing a file and another for moving it.
                 # These two could be merged as first move and then delete ...
                 # but instead drop moving and just delete.