Avoid negative block sizes in lazyparser.
This fixes a bug introduced by changeset
baa3873eb387 .
--- a/mercurial/revlog.py Thu Sep 14 15:35:55 2006 +0200
+++ b/mercurial/revlog.py Wed Sep 13 14:37:51 2006 -0300
@@ -143,7 +143,7 @@
# 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 = self.datasize - blockstart
+ blocksize = max(self.datasize - blockstart, 0)
data = self.dataf.read(blocksize)
lend = len(data) / self.s
i = blockstart / self.s