equal
deleted
inserted
replaced
571 yield _pack(_fstreamparamsize, len(param)) |
571 yield _pack(_fstreamparamsize, len(param)) |
572 if param: |
572 if param: |
573 yield param |
573 yield param |
574 # starting compression |
574 # starting compression |
575 for chunk in self._getcorechunk(): |
575 for chunk in self._getcorechunk(): |
576 yield self._compressor.compress(chunk) |
576 data = self._compressor.compress(chunk) |
|
577 if data: |
|
578 yield data |
577 yield self._compressor.flush() |
579 yield self._compressor.flush() |
578 |
580 |
579 def _paramchunk(self): |
581 def _paramchunk(self): |
580 """return a encoded version of all stream parameters""" |
582 """return a encoded version of all stream parameters""" |
581 blocks = [] |
583 blocks = [] |
1322 z = util.compressors[comp]() |
1324 z = util.compressors[comp]() |
1323 subchunkiter = cg.getchunks() |
1325 subchunkiter = cg.getchunks() |
1324 def chunkiter(): |
1326 def chunkiter(): |
1325 yield header |
1327 yield header |
1326 for chunk in subchunkiter: |
1328 for chunk in subchunkiter: |
1327 yield z.compress(chunk) |
1329 data = z.compress(chunk) |
|
1330 if data: |
|
1331 yield data |
1328 yield z.flush() |
1332 yield z.flush() |
1329 chunkiter = chunkiter() |
1333 chunkiter = chunkiter() |
1330 |
1334 |
1331 # parse the changegroup data, otherwise we will block |
1335 # parse the changegroup data, otherwise we will block |
1332 # in case of sshrepo because we don't know the end of the stream |
1336 # in case of sshrepo because we don't know the end of the stream |