# HG changeset patch # User Siddharth Agarwal # Date 1378582966 25200 # Node ID 0e07c0b5fb1c98f758bda54623a88ea692e1bac9 # Parent c2e27e57d250703aa386c3d638087da1f17169d2 revlog.revision: fix cache preload for inline revlogs Previously the length of data preloaded did not account for the interleaved io contents. This meant that we'd sometimes have cache misses in _chunks despite the preloading. Having a correctly filled out cache will become essential in an upcoming patch. diff -r c2e27e57d250 -r 0e07c0b5fb1c mercurial/revlog.py --- a/mercurial/revlog.py Fri Sep 06 16:31:35 2013 -0700 +++ b/mercurial/revlog.py Sat Sep 07 12:42:46 2013 -0700 @@ -845,9 +845,11 @@ def _chunkraw(self, startrev, endrev): start = self.start(startrev) - length = self.end(endrev) - start + end = self.end(endrev) if self._inline: start += (startrev + 1) * self._io.size + end += (endrev + 1) * self._io.size + length = end - start return self._getchunk(start, length) def _chunk(self, rev):