Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/revlog.py @ 3105:ef4e5d05bac4
Merge with mainline
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 17 Sep 2006 16:02:09 -0500 |
parents | e7fc04dc6349 |
children | cff3c58a5766 |
line wrap: on
line diff
--- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -139,6 +139,11 @@ class lazyparser(object): if self.all: return if data is None: self.dataf.seek(blockstart) + if blockstart + blocksize > self.datasize: + # the revlog may have grown since we've started running, + # but we don't have space in self.index for more entries. + # limit blocksize so that we don't get too much data. + blocksize = max(self.datasize - blockstart, 0) data = self.dataf.read(blocksize) lend = len(data) / self.s i = blockstart / self.s