Mercurial > evolve
changeset 4679:d9016946ec69
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.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 08 Jun 2019 16:57:34 +0800 |
parents | 36c2bac8cab3 |
children | 52c1809f35c1 |
files | hgext3rd/evolve/cmdrewrite.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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()})