merge: make merge.preferancestor type and default consistent
authorMatt Mackall <mpm@selenic.com>
Thu, 25 Jun 2015 17:54:55 -0500
changeset 25844 18541e9510c5
parent 25843 bf9ea348b487
child 25845 7e3bb3e1bfa7
merge: make merge.preferancestor type and default consistent (and mark it)
mercurial/context.py
mercurial/merge.py
--- a/mercurial/context.py	Thu Jun 25 17:53:16 2015 -0500
+++ b/mercurial/context.py	Thu Jun 25 17:54:55 2015 -0500
@@ -576,7 +576,8 @@
         elif len(cahs) == 1:
             anc = cahs[0]
         else:
-            for r in self._repo.ui.configlist('merge', 'preferancestor'):
+            # experimental config: merge.preferancestor
+            for r in self._repo.ui.configlist('merge', 'preferancestor', ['*']):
                 try:
                     ctx = changectx(self._repo, r)
                 except error.RepoLookupError:
--- a/mercurial/merge.py	Thu Jun 25 17:53:16 2015 -0500
+++ b/mercurial/merge.py	Thu Jun 25 17:54:55 2015 -0500
@@ -1011,7 +1011,7 @@
 
         p2 = repo[node]
         if pas[0] is None:
-            if repo.ui.config('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: