# HG changeset patch # User Yuya Nishihara # Date 1534478090 -32400 # Node ID 65d5de1169dd549a6fc0f8be6fa452ca4086e31e # Parent 13a1901176f11825cf21c51d167cd1a0908b1f92 revlog: fix pure nodemap to not access missing index entry This bug was revealed by a3dacabd476b and a1f934573c0b. diff -r 13a1901176f1 -r 65d5de1169dd mercurial/revlog.py --- a/mercurial/revlog.py Fri Aug 17 12:48:44 2018 +0900 +++ b/mercurial/revlog.py Fri Aug 17 12:54:50 2018 +0900 @@ -1107,7 +1107,9 @@ @util.propertycache def nodemap(self): - self.rev(self.node(0)) + if self.index: + # populate mapping down to the initial node + self.rev(self.node(0)) return self._nodecache def hasnode(self, node):