changeset 43545:9c1f4e2f1fc4

index: use `index.has_node` in `exchange._pulldiscoverychangegroup` Differential Revision: https://phab.mercurial-scm.org/D7346
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 08 Nov 2019 16:00:47 +0100
parents 886ec3962c66
children a166fadf5c3b
files mercurial/exchange.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri Nov 08 13:36:02 2019 +0100
+++ b/mercurial/exchange.py	Fri Nov 08 16:00:47 2019 +0100
@@ -1855,7 +1855,7 @@
         pullop.repo, pullop.remote, heads=pullop.heads, force=pullop.force
     )
     common, fetch, rheads = tmp
-    nm = pullop.repo.unfiltered().changelog.nodemap
+    has_node = pullop.repo.unfiltered().changelog.index.has_node
     if fetch and rheads:
         # If a remote heads is filtered locally, put in back in common.
         #
@@ -1868,7 +1868,7 @@
         # but are not including a remote heads, we'll not be able to detect it,
         scommon = set(common)
         for n in rheads:
-            if n in nm:
+            if has_node(n):
                 if n not in scommon:
                     common.append(n)
         if set(rheads).issubset(set(common)):