# HG changeset patch # User Pierre-Yves David # Date 2019-11-08 12:25:25 # Node ID a166fadf5c3b46855e9dd11f80896a5601824f90 # Parent 9c1f4e2f1fc4ba643d94ea0ceee605f2731d25f2 index: use `index.has_node` in `exchangev2._pullchangesetdiscovery` Differential Revision: https://phab.mercurial-scm.org/D7348 diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py --- a/mercurial/exchangev2.py +++ b/mercurial/exchangev2.py @@ -291,9 +291,9 @@ def _pullchangesetdiscovery(repo, remote # See the comment in exchange._pulldiscoverychangegroup() for more. if fetch and remoteheads: - nodemap = repo.unfiltered().changelog.nodemap + has_node = repo.unfiltered().changelog.index.has_node - common |= {head for head in remoteheads if head in nodemap} + common |= {head for head in remoteheads if has_node(head)} if set(remoteheads).issubset(common): fetch = []