##// END OF EJS Templates
bundle20: extract core payload generation in its own function...
Pierre-Yves David -
r26396:d90c3080 default
parent child Browse files
Show More
@@ -530,14 +530,8 b' class bundle20(object):'
530 yield _pack(_fstreamparamsize, len(param))
530 yield _pack(_fstreamparamsize, len(param))
531 if param:
531 if param:
532 yield param
532 yield param
533
533 for chunk in self._getcorechunk():
534 outdebug(self.ui, 'start of parts')
534 yield chunk
535 for part in self._parts:
536 outdebug(self.ui, 'bundle part: "%s"' % part.type)
537 for chunk in part.getchunks(ui=self.ui):
538 yield chunk
539 outdebug(self.ui, 'end of bundle')
540 yield _pack(_fpartheadersize, 0)
541
535
542 def _paramchunk(self):
536 def _paramchunk(self):
543 """return a encoded version of all stream parameters"""
537 """return a encoded version of all stream parameters"""
@@ -550,6 +544,19 b' class bundle20(object):'
550 blocks.append(par)
544 blocks.append(par)
551 return ' '.join(blocks)
545 return ' '.join(blocks)
552
546
547 def _getcorechunk(self):
548 """yield chunk for the core part of the bundle
549
550 (all but headers and parameters)"""
551 outdebug(self.ui, 'start of parts')
552 for part in self._parts:
553 outdebug(self.ui, 'bundle part: "%s"' % part.type)
554 for chunk in part.getchunks(ui=self.ui):
555 yield chunk
556 outdebug(self.ui, 'end of bundle')
557 yield _pack(_fpartheadersize, 0)
558
559
553 def salvageoutput(self):
560 def salvageoutput(self):
554 """return a list with a copy of all output parts in the bundle
561 """return a list with a copy of all output parts in the bundle
555
562
General Comments 0
You need to be logged in to leave comments. Login now