diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -553,6 +553,8 @@ class changectx(basectx): anc = cahs[0] else: for r in self._repo.ui.configlist('merge', 'preferancestor'): + if r == '*': + continue ctx = changectx(self._repo, r) anc = ctx.node() if anc in cahs: diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t --- a/tests/test-merge-criss-cross.t +++ b/tests/test-merge-criss-cross.t @@ -341,4 +341,15 @@ http://stackoverflow.com/questions/93500 b c +Verify that the old context ancestor works with / despite preferancestor: + + $ hg log -r 'ancestor(head())' --config merge.preferancestor=1 -T '{rev}\n' + 1 + $ hg log -r 'ancestor(head())' --config merge.preferancestor=2 -T '{rev}\n' + 2 + $ hg log -r 'ancestor(head())' --config merge.preferancestor=3 -T '{rev}\n' + 1 + $ hg log -r 'ancestor(head())' --config merge.preferancestor='*' -T '{rev}\n' + 1 + $ cd ..