Mercurial > public > mercurial-scm > hg-stable
diff mercurial/simplemerge.py @ 48758:6ae3c97a0919
simplemerge: move printing of merge result to extension
The `mercurial.simplemerge` module still has some command-lines
processing that doesn't belong in such a low-level module. This patch
moves the handling of `hg simplemerge --print` to the extension by
having `mercurial.simplemerge.simplemerge()` return the merged text.
Differential Revision: https://phab.mercurial-scm.org/D12148
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 14 Jan 2022 08:17:13 -0800 |
parents | d9602f0df4f3 |
children | 7dad4665d223 |
line wrap: on
line diff
--- a/mercurial/simplemerge.py Thu Feb 10 15:48:01 2022 -0800 +++ b/mercurial/simplemerge.py Fri Jan 14 08:17:13 2022 -0800 @@ -532,11 +532,4 @@ lines, conflicts = render_minimized(m3, *labels) mergedtext = b''.join(lines) - if print_result: - ui.fout.write(mergedtext) - else: - # local.fctx.flags() already has the merged flags (done in - # mergestate.resolve()) - local.fctx.write(mergedtext, local.fctx.flags()) - - return conflicts + return mergedtext, conflicts