comparison mercurial/changegroup.py @ 12044:bcc7139521b7

bundlerepo: remove duplication of bundle decompressors
author Matt Mackall <mpm@selenic.com>
date Wed, 25 Aug 2010 16:55:54 -0500
parents bef5effb3db0
children 7458de933f26
comparison
equal deleted inserted replaced
12043:bef5effb3db0 12044:bcc7139521b7
139 return generator(fh) 139 return generator(fh)
140 140
141 class unbundle10(object): 141 class unbundle10(object):
142 def __init__(self, fh, alg): 142 def __init__(self, fh, alg):
143 self._stream = util.chunkbuffer(decompressor(fh, alg)) 143 self._stream = util.chunkbuffer(decompressor(fh, alg))
144 self._type = alg
145 def compressed(self):
146 return self._type != 'UN'
144 def read(self, l): 147 def read(self, l):
145 return self._stream.read(l) 148 return self._stream.read(l)
146 149
147 def readbundle(fh, fname): 150 def readbundle(fh, fname):
148 header = fh.read(6) 151 header = fh.read(6)