mercurial/bundle2.py
changeset 21600 5e08f3b65510
parent 21599 57cd844d7a5b
child 21601 7ff01befc7ec
--- a/mercurial/bundle2.py	Fri May 23 15:54:18 2014 -0700
+++ b/mercurial/bundle2.py	Fri May 23 15:59:19 2014 -0700
@@ -321,11 +321,10 @@
                 if output is not None:
                     output = op.ui.popbuffer()
             if output:
-                outpart = bundlepart('b2x:output',
-                                     advisoryparams=[('in-reply-to',
-                                                      str(part.id))],
-                                     data=output)
-                op.reply.addpart(outpart)
+                op.reply.newpart('b2x:output',
+                                 advisoryparams=[('in-reply-to',
+                                                  str(part.id))],
+                                 data=output)
             part.read()
     except Exception, exc:
         if part is not None:
@@ -409,7 +408,7 @@
         self._parts.append(part)
 
     def newpart(self, typeid, *args, **kwargs):
-        """create a new part for the containers"""
+        """create a new part and add it to the containers"""
         part = bundlepart(typeid, *args, **kwargs)
         self.addpart(part)
         return part