Patchwork D6472: merge: simplify initialization of "pas"

login
register
mail settings
Submitter phabricator
Date June 3, 2019, 2:07 p.m.
Message ID <9af9ac45dd94d1d15cdca4cbe615e429@localhost.localdomain>
Download mbox | patch
Permalink /patch/40306/
State Not Applicable
Headers show

Comments

phabricator - June 3, 2019, 2:07 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa5b5ecff5f37: merge: simplify initialization of &quot;pas&quot; (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6472?vs=15320&id=15330

REVISION DETAIL
  https://phab.mercurial-scm.org/D6472

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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])]