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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Nov 9 03:40:28 EST 2019


Closed by commit rHG049c3560e235: index: use `index.has_node` in `phases.filterunknown` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7331?vs=17754&id=17870

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7331/new/

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

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS

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(



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


More information about the Mercurial-devel mailing list