index: use `index.has_node` in `revlog.addrevision`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 03 Nov 2019 00:05:20 +0100
changeset 43535 8b533de0429d
parent 43534 0c659fc20207
child 43536 bf6fa330e0a5
index: use `index.has_node` in `revlog.addrevision` Differential Revision: https://phab.mercurial-scm.org/D7323
mercurial/revlog.py
--- a/mercurial/revlog.py	Sun Nov 03 00:01:09 2019 +0100
+++ b/mercurial/revlog.py	Sun Nov 03 00:05:20 2019 +0100
@@ -1995,7 +1995,7 @@
             )
 
         node = node or self.hash(rawtext, p1, p2)
-        if node in self.nodemap:
+        if self.index.has_node(node):
             return node
 
         if validatehash: