changeset 43539:44f54b8f9f10

index: use `index.has_node` in `phases.filterunknown` Differential Revision: https://phab.mercurial-scm.org/D7331
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 08 Nov 2019 14:17:03 +0100
parents 9970412d2ce3
children c8f1e8412db4
files mercurial/phases.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Fri Nov 08 14:16:24 2019 +0100
+++ b/mercurial/phases.py	Fri Nov 08 14:17:03 2019 +0100
@@ -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(