Patchwork D7331: index: use `index.has_node` in `phases.filterunknown`

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:24 p.m.
Message ID <differential-rev-PHID-DREV-obhumazgfbme2qtksf7l-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42935/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 4:24 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -512,9 +512,9 @@ 
         Nothing is lost as unknown nodes only hold data for their descendants.
         """
         filtered = False
-        nodemap = repo.changelog.nodemap  # to filter unknown nodes
+        has_node = repo.changelog.index.has_node  # to filter unknown nodes
         for phase, nodes in enumerate(self.phaseroots):
-            missing = sorted(node for node in nodes if node not in nodemap)
+            missing = sorted(node for node in nodes if not has_node(node))
             if missing:
                 for mnode in missing:
                     repo.ui.debug(