index: use `index.get_rev` in `unionrepo.unionrevlog`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 09 Nov 2019 13:23:52 +0100
changeset 43565 f212cc5ffceb
parent 43564 698e11f7be6a
child 43566 054846d213ba
index: use `index.get_rev` in `unionrepo.unionrevlog` Differential Revision: https://phab.mercurial-scm.org/D7338
mercurial/unionrepo.py
--- a/mercurial/unionrepo.py	Sat Nov 09 13:23:53 2019 +0100
+++ b/mercurial/unionrepo.py	Sat Nov 09 13:23:52 2019 +0100
@@ -62,9 +62,10 @@
             if linkmapper is not None:  # link is to same revlog
                 base = linkmapper(base)
 
-            if node in self.nodemap:
+            this_rev = self.index.get_rev(node)
+            if this_rev is not None:
                 # this happens for the common revlog revisions
-                self.bundlerevs.add(self.nodemap[node])
+                self.bundlerevs.add(this_rev)
                 continue
 
             p1node = self.revlog2.node(p1rev)