Mercurial > hg
comparison mercurial/changegroup.py @ 26706:8c0c3059f478
changegroup: note why a few methods on cg1unpacker exist
I'm not sure what to do abstraction-wise here. It might be more
sensible to make a memoryrepo that could apply a bundle in-memory and
then we could make the changegroup data be strictly an applyable
stream, but that's an idea for Later.
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 14 Oct 2015 11:58:35 -0400 |
parents | d7e614513413 |
children | 5ee6bd529300 |
comparison
equal
deleted
inserted
replaced
26705:2f5c45fe3a3b | 26706:8c0c3059f478 |
---|---|
180 if alg == 'BZ': | 180 if alg == 'BZ': |
181 alg = '_truncatedBZ' | 181 alg = '_truncatedBZ' |
182 self._stream = util.decompressors[alg](fh) | 182 self._stream = util.decompressors[alg](fh) |
183 self._type = alg | 183 self._type = alg |
184 self.callback = None | 184 self.callback = None |
185 | |
186 # These methods (compressed, read, seek, tell) all appear to only | |
187 # be used by bundlerepo, but it's a little hard to tell. | |
185 def compressed(self): | 188 def compressed(self): |
186 return self._type is not None | 189 return self._type is not None |
187 def read(self, l): | 190 def read(self, l): |
188 return self._stream.read(l) | 191 return self._stream.read(l) |
189 def seek(self, pos): | 192 def seek(self, pos): |