Mercurial > hg-stable
changeset 11155:245a67fe2574
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 11 May 2010 16:28:09 -0500 |
parents | 9936ed1d04f4 |
children | b203a95fe68b |
files | mercurial/revlog.py mercurial/statichttprepo.py |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: