# HG changeset patch # User Sune Foldager # Date 1305544008 -7200 # Node ID 85c82ebc96a3611890b716f2ca5534cb92c6dbd5 # Parent 31a5973fcf96ad9a7b9bb43296ee877c203b3e62 changelog: don't use generaldelta diff -r 31a5973fcf96 -r 85c82ebc96a3 mercurial/changelog.py --- a/mercurial/changelog.py Mon May 16 12:44:34 2011 +0200 +++ b/mercurial/changelog.py Mon May 16 13:06:48 2011 +0200 @@ -100,6 +100,10 @@ class changelog(revlog.revlog): def __init__(self, opener): revlog.revlog.__init__(self, opener, "00changelog.i") + if self._initempty: + # changelogs don't benefit from generaldelta + self.version &= ~revlog.REVLOGGENERALDELTA + self._generaldelta = False self._realopener = opener self._delayed = False self._divert = False diff -r 31a5973fcf96 -r 85c82ebc96a3 mercurial/revlog.py --- a/mercurial/revlog.py Mon May 16 12:44:34 2011 +0200 +++ b/mercurial/revlog.py Mon May 16 13:06:48 2011 +0200 @@ -234,12 +234,14 @@ v = 0 i = '' + self._initempty = True try: f = self.opener(self.indexfile) i = f.read() f.close() if len(i) > 0: v = struct.unpack(versionformat, i[:4])[0] + self._initempty = False except IOError, inst: if inst.errno != errno.ENOENT: raise