comparison mercurial/bundle2.py @ 40372:81c80ed7c991

bundle2: fix broken compression engine assertion bundletype() is a function, so it needs to be called, and it is documented to return a 2-tuple. This code is untested, so that's why we haven't noticed the bad assertion. Differential Revision: https://phab.mercurial-scm.org/D5155
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 17 Nov 2016 15:51:33 -0800
parents 2c5835b4246b
children 0ac794e0e285
comparison
equal deleted inserted replaced
40371:5a81c4aa6313 40372:81c80ed7c991
837 yield _pack(_fstreamparamsize, paramssize) 837 yield _pack(_fstreamparamsize, paramssize)
838 if paramssize: 838 if paramssize:
839 params = self._readexact(paramssize) 839 params = self._readexact(paramssize)
840 self._processallparams(params) 840 self._processallparams(params)
841 yield params 841 yield params
842 assert self._compengine.bundletype == 'UN' 842 assert self._compengine.bundletype()[1] == 'UN'
843 # From there, payload might need to be decompressed 843 # From there, payload might need to be decompressed
844 self._fp = self._compengine.decompressorreader(self._fp) 844 self._fp = self._compengine.decompressorreader(self._fp)
845 emptycount = 0 845 emptycount = 0
846 while emptycount < 2: 846 while emptycount < 2:
847 # so we can brainlessly loop 847 # so we can brainlessly loop