# HG changeset patch # User Gregory Szorc # Date 1539353961 -7200 # Node ID ba70e3acf58a6a929a23f5b80e08c98a4ad776d4 # Parent b843356d4ae1edff311d7c4ba52ca021f6aeaed1 revlog: update pure nodecache start lookup offset on insertion test-storage.py is failing in pure builds because the population of the node cache isn't accounting for the new starting offset after a revlog insertion. This commit updates the node cache start offset to account for insertions. I'm not 100% convinced this is the ideal solution. But it works and seems correct. Differential Revision: https://phab.mercurial-scm.org/D4996 diff -r b843356d4ae1 -r ba70e3acf58a mercurial/revlog.py --- a/mercurial/revlog.py Wed Oct 03 13:57:42 2018 -0700 +++ b/mercurial/revlog.py Fri Oct 12 16:19:21 2018 +0200 @@ -1937,6 +1937,11 @@ self.index.append(e) self.nodemap[node] = curr + # Reset the pure node cache start lookup offset to account for new + # revision. + if self._nodepos is not None: + self._nodepos = curr + entry = self._io.packentry(e, self.node, self.version, curr) self._writeentry(transaction, ifh, dfh, entry, deltainfo.data, link, offset)