Patchwork D7339: index: use `index.has_node` in `bundlerepo.bundlerevlog`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 8:41 a.m.
Message ID <7893752cd50389d61cc158088b33e3df@localhost.localdomain>
Download mbox | patch
Permalink /patch/43057/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 8:41 a.m.
Closed by commit rHGed9b0abce624: index: use `index.has_node` in `bundlerepo.bundlerevlog` (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/D7339?vs=17845&id=17873

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

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

AFFECTED FILES
  mercurial/bundlerepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -64,18 +64,18 @@ 
             start = cgunpacker.tell() - size
 
             link = linkmapper(cs)
-            if node in self.nodemap:
+            if self.index.has_node(node):
                 # this can happen if two branches make the same change
                 self.bundlerevs.add(self.nodemap[node])
                 continue
 
             for p in (p1, p2):
-                if p not in self.nodemap:
+                if not self.index.has_node(p):
                     raise error.LookupError(
                         p, self.indexfile, _(b"unknown parent")
                     )
 
-            if deltabase not in self.nodemap:
+            if not self.index.has_node(deltabase):
                 raise LookupError(
                     deltabase, self.indexfile, _(b'unknown delta base')
                 )