# HG changeset patch # User Boris Feld # Date 2017-06-30 01:43:13 # Node ID 99c3dee3f6cea9f33606d853ed809b8e2cc23de4 # Parent ef303daefdf77ff14b934ecc5225eb6670419675 configitems: register the 'merge.preferancestor' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -302,6 +302,9 @@ coreconfigitem('http_proxy', 'user', coreconfigitem('merge', 'followcopies', default=True, ) +coreconfigitem('merge', 'preferancestor', + default=lambda: ['*'], +) coreconfigitem('pager', 'ignore', default=list, ) diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -659,7 +659,7 @@ class changectx(basectx): 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: diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -1566,7 +1566,7 @@ def update(repo, node, branchmerge, forc 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: