# HG changeset patch # User Gregory Szorc # Date 2018-10-12 14:19:21 # 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 --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1937,6 +1937,11 @@ class revlog(object): 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)