##// END OF EJS Templates
bundle2: extract a _payloadchunks method for part...
Pierre-Yves David -
r21000:4cae06ae default
parent child Browse files
Show More
@@ -549,13 +549,20 b' class part(object):'
549 yield _pack(_fpartheadersize, len(headerchunk))
549 yield _pack(_fpartheadersize, len(headerchunk))
550 yield headerchunk
550 yield headerchunk
551 ## payload
551 ## payload
552 for chunk in self._payloadchunks():
553 yield _pack(_fpayloadsize, len(chunk))
554 yield chunk
555 # end of payload
556 yield _pack(_fpayloadsize, 0)
557
558 def _payloadchunks(self):
559 """yield chunks of a the part payload
560
561 Exists to handle the different methods to provide data to a part."""
552 # we only support fixed size data now.
562 # we only support fixed size data now.
553 # This will be improved in the future.
563 # This will be improved in the future.
554 if len(self.data):
564 if len(self.data):
555 yield _pack(_fpayloadsize, len(self.data))
556 yield self.data
565 yield self.data
557 # end of payload
558 yield _pack(_fpayloadsize, 0)
559
566
560 @parthandler('changegroup')
567 @parthandler('changegroup')
561 def handlechangegroup(op, inpart):
568 def handlechangegroup(op, inpart):
General Comments 0
You need to be logged in to leave comments. Login now