Mercurial > public > mercurial-scm > hg
comparison mercurial/simplemerge.py @ 48425:9e1f174d305b
simplemerge: set `conflicts` earlier for :union tool
Differential Revision: https://phab.mercurial-scm.org/D11853
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 29 Nov 2021 23:00:29 -0800 |
parents | 728d89f6f9b1 |
children | 58a3be48ddd2 |
comparison
equal
deleted
inserted
replaced
48423:fff5942d445f | 48425:9e1f174d305b |
---|---|
542 lines = list( | 542 lines = list( |
543 m3.merge_lines( | 543 m3.merge_lines( |
544 name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs) | 544 name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs) |
545 ) | 545 ) |
546 ) | 546 ) |
547 conflicts = m3.conflicts | 547 conflicts = m3.conflicts and not mode == b'union' |
548 | 548 |
549 # merge flags if necessary | 549 # merge flags if necessary |
550 flags = localctx.flags() | 550 flags = localctx.flags() |
551 localflags = set(pycompat.iterbytestr(flags)) | 551 localflags = set(pycompat.iterbytestr(flags)) |
552 otherflags = set(pycompat.iterbytestr(otherctx.flags())) | 552 otherflags = set(pycompat.iterbytestr(otherctx.flags())) |
560 if opts.get('print'): | 560 if opts.get('print'): |
561 ui.fout.write(mergedtext) | 561 ui.fout.write(mergedtext) |
562 else: | 562 else: |
563 localctx.write(mergedtext, flags) | 563 localctx.write(mergedtext, flags) |
564 | 564 |
565 if conflicts and not mode == b'union': | 565 if conflicts: |
566 return 1 | 566 return 1 |