--- 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
--- 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