Comments
Patch
@@ -654,10 +654,11 @@ class unbundle20(unpackermixin):
def __init__(self, ui, fp):
"""If header is specified, we do not read it out of the stream."""
self.ui = ui
self._decompressor = util.decompressors[None]
+ self._compressed = None
super(unbundle20, self).__init__(fp)
@util.propertycache
def params(self):
"""dictionary of stream level parameters"""
@@ -776,11 +777,12 @@ class unbundle20(unpackermixin):
if headersize:
return self._readexact(headersize)
return None
def compressed(self):
- return False
+ self.params # load params
+ return self._compressed
formatmap = {'20': unbundle20}
b2streamparamsmap = {}
@@ -797,10 +799,12 @@ def processcompression(unbundler, param,
"""read compression parameter and install payload decompression"""
if value not in util.decompressors:
raise error.BundleUnknownFeatureError(params=(param,),
values=(value,))
unbundler._decompressor = util.decompressors[value]
+ if value is not None:
+ unbundler._compressed = True
class bundlepart(object):
"""A bundle2 part contains application level payload
The part `type` is used to route the part to the application level