equal
deleted
inserted
replaced
654 |
654 |
655 def __init__(self, ui, fp): |
655 def __init__(self, ui, fp): |
656 """If header is specified, we do not read it out of the stream.""" |
656 """If header is specified, we do not read it out of the stream.""" |
657 self.ui = ui |
657 self.ui = ui |
658 self._decompressor = util.decompressors[None] |
658 self._decompressor = util.decompressors[None] |
|
659 self._compressed = None |
659 super(unbundle20, self).__init__(fp) |
660 super(unbundle20, self).__init__(fp) |
660 |
661 |
661 @util.propertycache |
662 @util.propertycache |
662 def params(self): |
663 def params(self): |
663 """dictionary of stream level parameters""" |
664 """dictionary of stream level parameters""" |
776 if headersize: |
777 if headersize: |
777 return self._readexact(headersize) |
778 return self._readexact(headersize) |
778 return None |
779 return None |
779 |
780 |
780 def compressed(self): |
781 def compressed(self): |
781 return False |
782 self.params # load params |
|
783 return self._compressed |
782 |
784 |
783 formatmap = {'20': unbundle20} |
785 formatmap = {'20': unbundle20} |
784 |
786 |
785 b2streamparamsmap = {} |
787 b2streamparamsmap = {} |
786 |
788 |
797 """read compression parameter and install payload decompression""" |
799 """read compression parameter and install payload decompression""" |
798 if value not in util.decompressors: |
800 if value not in util.decompressors: |
799 raise error.BundleUnknownFeatureError(params=(param,), |
801 raise error.BundleUnknownFeatureError(params=(param,), |
800 values=(value,)) |
802 values=(value,)) |
801 unbundler._decompressor = util.decompressors[value] |
803 unbundler._decompressor = util.decompressors[value] |
|
804 if value is not None: |
|
805 unbundler._compressed = True |
802 |
806 |
803 class bundlepart(object): |
807 class bundlepart(object): |
804 """A bundle2 part contains application level payload |
808 """A bundle2 part contains application level payload |
805 |
809 |
806 The part `type` is used to route the part to the application level |
810 The part `type` is used to route the part to the application level |