Show More
@@ -138,6 +138,12 b' def decompressor(fh, alg):' | |||||
138 | raise util.Abort("unknown bundle compression '%s'" % alg) |
|
138 | raise util.Abort("unknown bundle compression '%s'" % alg) | |
139 | return generator(fh) |
|
139 | return generator(fh) | |
140 |
|
140 | |||
|
141 | class unbundle10(object): | |||
|
142 | def __init__(self, fh, alg): | |||
|
143 | self._stream = util.chunkbuffer(decompressor(fh, alg)) | |||
|
144 | def read(self, l): | |||
|
145 | return self._stream.read(l) | |||
|
146 | ||||
141 | def readbundle(fh, fname): |
|
147 | def readbundle(fh, fname): | |
142 | header = fh.read(6) |
|
148 | header = fh.read(6) | |
143 |
|
149 | |||
@@ -158,4 +164,4 b' def readbundle(fh, fname):' | |||||
158 | raise util.Abort(_('%s: not a Mercurial bundle') % fname) |
|
164 | raise util.Abort(_('%s: not a Mercurial bundle') % fname) | |
159 | if version != '10': |
|
165 | if version != '10': | |
160 | raise util.Abort(_('%s: unknown bundle version %s') % (fname, version)) |
|
166 | raise util.Abort(_('%s: unknown bundle version %s') % (fname, version)) | |
161 |
return u |
|
167 | return unbundle10(fh, alg) |
General Comments 0
You need to be logged in to leave comments.
Login now