Mercurial > public > mercurial-scm > hg
diff mercurial/bundle2.py @ 21005:3d38ebb586fe
bundle2: rename part to bundlepart
We are going to introduce an `unbundlepart` dedicated to reading bundle. So we
need to rename the one used to create bundle. Even if dedicated to creation, this
is still used for unbundling until we get the new class.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 11 Apr 2014 07:36:14 -0700 |
parents | 27ab4b8d2503 |
children | a813caca89b3 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Fri Apr 11 16:43:01 2014 -0400 +++ b/mercurial/bundle2.py Fri Apr 11 07:36:14 2014 -0700 @@ -503,12 +503,12 @@ payloadsize = self._unpack(_fpayloadsize)[0] self.ui.debug('payload chunk size: %i\n' % payloadsize) payload = ''.join(payload) - current = part(parttype, manparams, advparams, data=payload) + current = bundlepart(parttype, manparams, advparams, data=payload) current.id = partid return current -class part(object): +class bundlepart(object): """A bundle2 part contains application level payload The part `type` is used to route the part to the application level @@ -598,9 +598,9 @@ if op.reply is not None: # This is definitly not the final form of this # return. But one need to start somewhere. - op.reply.addpart(part('reply:changegroup', (), - [('in-reply-to', str(inpart.id)), - ('return', '%i' % ret)])) + op.reply.addpart(bundlepart('reply:changegroup', (), + [('in-reply-to', str(inpart.id)), + ('return', '%i' % ret)])) @parthandler('reply:changegroup') def handlechangegroup(op, inpart):