static-http: disable lazy parsing
This only hits if you're crazy enough to use static-http on a
repository with revlogs larger than 1M. Don't do it.
--- a/mercurial/revlog.py Sun May 02 21:56:25 2010 -0400
+++ b/mercurial/revlog.py Tue May 11 16:28:09 2010 -0500
@@ -444,7 +444,10 @@
i = ''
try:
f = self.opener(self.indexfile)
- i = f.read(_prereadsize)
+ if "nonlazy" in getattr(self.opener, 'options', {}):
+ i = f.read()
+ else:
+ i = f.read(_prereadsize)
if len(i) > 0:
v = struct.unpack(versionformat, i[:4])[0]
except IOError, inst:
--- a/mercurial/statichttprepo.py Sun May 02 21:56:25 2010 -0400
+++ b/mercurial/statichttprepo.py Tue May 11 16:28:09 2010 -0500
@@ -77,6 +77,7 @@
return httprangereader(f, urlopener)
return o
+ opener.options = {'nonlazy': 1}
return opener
class statichttprepository(localrepo.localrepository):