# HG changeset patch # User Anton Shestakov # Date 1559984254 -28800 # Node ID d9016946ec691b791db1efc475cf73513e09a113 # Parent 36c2bac8cab36de800758f4fd8485e5c6d00afa1 pick: reduce configoverride() scope Merge tool is only needed for merge.graft() (it's what graft in core hg does), so let's make the scope of the ui.configoverride() narrower. diff -r 36c2bac8cab3 -r d9016946ec69 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Sat Jun 08 16:09:37 2019 +0800 +++ b/hgext3rd/evolve/cmdrewrite.py Sat Jun 08 16:57:34 2019 +0800 @@ -1430,8 +1430,7 @@ if opts.get('rev'): revs.append(opts['rev']) - overrides = {('ui', 'forcemerge'): opts.get('tool', '')} - with repo.wlock(), repo.lock(), repo.transaction('pick'), ui.configoverride(overrides, 'pick'): + with repo.wlock(), repo.lock(), repo.transaction('pick'): pickstate = state.cmdstate(repo, path='pickstate') pctx = repo['.'] @@ -1453,8 +1452,10 @@ ui.status(_('picking %d:%s "%s"\n') % (origctx.rev(), origctx, origctx.description().split("\n", 1)[0])) - stats = merge.graft(repo, origctx, origctx.p1(), ['local', - 'destination']) + overrides = {('ui', 'forcemerge'): opts.get('tool', '')} + with ui.configoverride(overrides, 'pick'): + stats = merge.graft(repo, origctx, origctx.p1(), + ['local', 'destination']) if compat.hasconflict(stats): pickstate.addopts({'orignode': origctx.node(), 'oldpctx': pctx.node()})