Patchwork D11853: simplemerge: set `conflicts` earlier for :union tool

login
register
mail settings
Submitter phabricator
Date Dec. 4, 2021, 7:06 a.m.
Message ID <differential-rev-PHID-DREV-xtw4bcphpip66k2neyvh-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50179/
State Superseded
Headers show

Comments

phabricator - Dec. 4, 2021, 7:06 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11853

AFFECTED FILES
  mercurial/simplemerge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -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