revlog: obtain the first node at the lowest layer while building pure nodemap
authorYuya Nishihara <yuya@tcha.org>
Fri, 17 Aug 2018 13:07:33 +0900
changeset 39144 5f924aa0567c
parent 39143 65d5de1169dd
child 39145 b623c7b23695
revlog: obtain the first node at the lowest layer while building pure nodemap Just for clarity. This doesn't matter in practice since changelog.nodemap is accessed *before* filtered revisions get ready.
mercurial/revlog.py
--- a/mercurial/revlog.py	Fri Aug 17 12:54:50 2018 +0900
+++ b/mercurial/revlog.py	Fri Aug 17 13:07:33 2018 +0900
@@ -1109,7 +1109,8 @@
     def nodemap(self):
         if self.index:
             # populate mapping down to the initial node
-            self.rev(self.node(0))
+            node0 = self.index[0][7]  # get around changelog filtering
+            self.rev(node0)
         return self._nodecache
 
     def hasnode(self, node):