Mercurial > hg
diff contrib/simplemerge @ 48749:9ee70e175fed
simplemerge: replace `**opts` passed to `simplemerge()` by keyword arguments
The `simplemerge` module is library code; it should not get an
unmodified `opts` dict from the `simplemerge` extension.
Differential Revision: https://phab.mercurial-scm.org/D12152
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 10 Feb 2022 09:59:07 -0800 |
parents | 77e24ee8994b |
children | 109fec7bf7de |
line wrap: on
line diff
--- a/contrib/simplemerge Thu Feb 03 18:14:25 2022 +0100 +++ b/contrib/simplemerge Thu Feb 10 09:59:07 2022 -0800 @@ -13,7 +13,6 @@ context, error, fancyopts, - pycompat, simplemerge, ui as uimod, ) @@ -80,8 +79,9 @@ sys.exit(0) if len(args) != 3: raise ParseError(_(b'wrong number of arguments').decode('utf8')) + mode = b'merge' if len(opts[b'label']) > 2: - opts[b'mode'] = b'merge3' + mode = b'merge3' local, base, other = args overrides = opts[b'label'] if len(overrides) > 3: @@ -103,7 +103,10 @@ local_input, base_input, other_input, - **pycompat.strkwargs(opts) + mode, + quiet=opts.get(b'quiet'), + allow_binary=opts.get(b'text'), + print_result=opts.get(b'print'), ) ) except ParseError as e: