merge: simplify initialization of "pas"
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 09 Mar 2019 22:13:06 -0800
changeset 42410 a5b5ecff5f37
parent 42409 72522fe7fb95
child 42411 4738c292a520
merge: simplify initialization of "pas" Differential Revision: https://phab.mercurial-scm.org/D6472
mercurial/merge.py
--- a/mercurial/merge.py	Sat Mar 09 22:11:27 2019 -0800
+++ b/mercurial/merge.py	Sat Mar 09 22:13:06 2019 -0800
@@ -1978,10 +1978,9 @@
         pl = wc.parents()
         p1 = pl[0]
         p2 = repo[node]
-        pas = [None]
         if ancestor is not None:
             pas = [repo[ancestor]]
-        if pas[0] is None:
+        else:
             if repo.ui.configlist('merge', 'preferancestor') == ['*']:
                 cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node())
                 pas = [repo[anc] for anc in (sorted(cahs) or [nullid])]