# HG changeset patch # User Pierre-Yves David # Date 2019-11-08 12:24:54 # Node ID 5f347567589b679d3226b42fc707068a7ee77c34 # Parent 1944aaaecabf6f92fa8770b4d47d87f5ae862d09 index: use `index.has_node` in `bundlerepo.bundlerevlog` Differential Revision: https://phab.mercurial-scm.org/D7339 diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -64,18 +64,18 @@ class bundlerevlog(revlog.revlog): 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') )