diff mercurial/bundle2.py @ 21600:5e08f3b65510

bundle2: update all ``addpart`` callers to ``newpart`` The new method is what we want in all current cases.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 23 May 2014 15:59:19 -0700
parents 57cd844d7a5b
children 7ff01befc7ec
line wrap: on
line diff
--- 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