##// END OF EJS Templates
bundle2: add a ``newpart`` method to ``bundle20``...
Pierre-Yves David -
r21598:1b0dbb91 default
parent child Browse files
Show More
@@ -408,6 +408,11 b' class bundle20(object):'
408 408 part.id = len(self._parts) # very cheap counter
409 409 self._parts.append(part)
410 410
411 def newpart(self, typeid, *args, **kwargs):
412 """create a new part for the containers"""
413 part = bundlepart(typeid, *args, **kwargs)
414 return part
415
411 416 # methods used to generate the bundle2 stream
412 417 def getchunks(self):
413 418 self.ui.debug('start emission of %s stream\n' % _magicstring)
@@ -707,9 +712,9 b' def handlechangegroup(op, inpart):'
707 712 if op.reply is not None:
708 713 # This is definitly not the final form of this
709 714 # return. But one need to start somewhere.
710 part = bundlepart('b2x:reply:changegroup', (),
711 [('in-reply-to', str(inpart.id)),
712 ('return', '%i' % ret)])
715 part = op.reply.newpart('b2x:reply:changegroup', (),
716 [('in-reply-to', str(inpart.id)),
717 ('return', '%i' % ret)])
713 718 op.reply.addpart(part)
714 719 assert not inpart.read()
715 720
General Comments 0
You need to be logged in to leave comments. Login now