Patchwork D7346: index: use `index.has_node` in `exchange._pulldiscoverychangegroup`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 5:20 a.m.
Message ID <0e86df67f52e74415b8b23db4d9c67b3@localhost.localdomain>
Download mbox | patch
Permalink /patch/43034/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 5:20 a.m.
marmoute updated this revision to Diff 17848.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7346?vs=17769&id=17848

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

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -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)):