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.
--- 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):