index: use `index.has_node` in `revlog.addgroup`
Differential Revision: https://phab.mercurial-scm.org/D7328
--- a/mercurial/revlog.py Sun Nov 03 00:05:20 2019 +0100
+++ b/mercurial/revlog.py Sun Nov 03 00:49:55 2019 +0100
@@ -2306,18 +2306,18 @@
nodes.append(node)
- if node in self.nodemap:
+ if self.index.has_node(node):
self._nodeduplicatecallback(transaction, node)
# this can happen if two branches make the same change
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 error.LookupError(
deltabase, self.indexfile, _(b'unknown delta base')
)