Mercurial > hg
changeset 43536:bf6fa330e0a5
index: use `index.has_node` in `revlog.addgroup`
Differential Revision: https://phab.mercurial-scm.org/D7328
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 03 Nov 2019 00:49:55 +0100 |
parents | 8b533de0429d |
children | 7f489b9a79a1 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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') )