simplemerge: set `conflicts` earlier for :union tool
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 29 Nov 2021 23:00:29 -0800
changeset 48425 9e1f174d305b
parent 48423 fff5942d445f
child 48426 de8181c5414d
simplemerge: set `conflicts` earlier for :union tool Differential Revision: https://phab.mercurial-scm.org/D11853
mercurial/simplemerge.py
--- a/mercurial/simplemerge.py	Fri Nov 26 11:53:54 2021 +0100
+++ b/mercurial/simplemerge.py	Mon Nov 29 23:00:29 2021 -0800
@@ -544,7 +544,7 @@
                 name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs)
             )
         )
-        conflicts = m3.conflicts
+        conflicts = m3.conflicts and not mode == b'union'
 
     # merge flags if necessary
     flags = localctx.flags()
@@ -562,5 +562,5 @@
     else:
         localctx.write(mergedtext, flags)
 
-    if conflicts and not mode == b'union':
+    if conflicts:
         return 1