D7348: index: use `index.has_node` in `exchangev2._pullchangesetdiscovery`

2019-11-09 Thread marmoute (Pierre-Yves David)
Closed by commit rHGe461d2e6d6aa: index: use `index.has_node` in 
`exchangev2._pullchangesetdiscovery` (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/D7348?vs=17771=17878

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

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

AFFECTED FILES
  mercurial/exchangev2.py

CHANGE DETAILS

diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py
--- a/mercurial/exchangev2.py
+++ b/mercurial/exchangev2.py
@@ -291,9 +291,9 @@
 # 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 = []



To: marmoute, #hg-reviewers, indygreg
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7348: index: use `index.has_node` in `exchangev2._pullchangesetdiscovery`

2019-11-08 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/exchangev2.py

CHANGE DETAILS

diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py
--- a/mercurial/exchangev2.py
+++ b/mercurial/exchangev2.py
@@ -291,9 +291,9 @@
 # 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 = []



To: marmoute, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel