Mercurial > hg
changeset 34479:99c3dee3f6ce
configitems: register the 'merge.preferancestor' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:43:13 +0200 |
parents | ef303daefdf7 |
children | cbda631c1dde |
files | mercurial/configitems.py mercurial/context.py mercurial/merge.py |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py Fri Jun 30 03:39:10 2017 +0200 +++ b/mercurial/configitems.py Fri Jun 30 03:43:13 2017 +0200 @@ -302,6 +302,9 @@ coreconfigitem('merge', 'followcopies', default=True, ) +coreconfigitem('merge', 'preferancestor', + default=lambda: ['*'], +) coreconfigitem('pager', 'ignore', default=list, )
--- a/mercurial/context.py Fri Jun 30 03:39:10 2017 +0200 +++ b/mercurial/context.py Fri Jun 30 03:43:13 2017 +0200 @@ -659,7 +659,7 @@ anc = cahs[0] else: # experimental config: merge.preferancestor - for r in self._repo.ui.configlist('merge', 'preferancestor', ['*']): + for r in self._repo.ui.configlist('merge', 'preferancestor'): try: ctx = changectx(self._repo, r) except error.RepoLookupError:
--- a/mercurial/merge.py Fri Jun 30 03:39:10 2017 +0200 +++ b/mercurial/merge.py Fri Jun 30 03:43:13 2017 +0200 @@ -1566,7 +1566,7 @@ p2 = repo[node] if pas[0] is None: - if repo.ui.configlist('merge', 'preferancestor', ['*']) == ['*']: + if repo.ui.configlist('merge', 'preferancestor') == ['*']: cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) pas = [repo[anc] for anc in (sorted(cahs) or [nullid])] else: