--- a/mercurial/changegroup.py Wed Aug 25 15:33:06 2010 -0500
+++ b/mercurial/changegroup.py Wed Aug 25 16:53:06 2010 -0500
@@ -138,6 +138,12 @@
raise util.Abort("unknown bundle compression '%s'" % alg)
return generator(fh)
+class unbundle10(object):
+ def __init__(self, fh, alg):
+ self._stream = util.chunkbuffer(decompressor(fh, alg))
+ def read(self, l):
+ return self._stream.read(l)
+
def readbundle(fh, fname):
header = fh.read(6)
@@ -158,4 +164,4 @@
raise util.Abort(_('%s: not a Mercurial bundle') % fname)
if version != '10':
raise util.Abort(_('%s: unknown bundle version %s') % (fname, version))
- return util.chunkbuffer(decompressor(fh, alg))
+ return unbundle10(fh, alg)