mercurial/bundle2.py
changeset 21624 d61066d787c8
parent 21623 5b26d82e4e2a
child 21625 511f5fa63aa2
--- a/mercurial/bundle2.py	Tue May 27 11:49:48 2014 -0700
+++ b/mercurial/bundle2.py	Wed May 28 11:40:07 2014 -0700
@@ -179,7 +179,7 @@
 
     eg::
 
-        @parthandler('myparttype')
+        @parthandler('myparttype', ('mandatory', 'param', 'handled'))
         def myparttypehandler(...):
             '''process a part of type "my part".'''
             ...
@@ -787,7 +787,7 @@
         part.addparam('return', '%i' % ret, mandatory=False)
     assert not inpart.read()
 
-@parthandler('b2x:reply:changegroup')
+@parthandler('b2x:reply:changegroup', ('return', 'in-reply-to'))
 def handlechangegroup(op, inpart):
     ret = int(inpart.params['return'])
     replyto = int(inpart.params['in-reply-to'])
@@ -824,12 +824,12 @@
     if op.reply is None:
         op.reply = bundle20(op.ui, caps)
 
-@parthandler('b2x:error:abort')
+@parthandler('b2x:error:abort', ('message', 'hint'))
 def handlereplycaps(op, inpart):
     """Used to transmit abort error over the wire"""
     raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
 
-@parthandler('b2x:error:unsupportedcontent')
+@parthandler('b2x:error:unsupportedcontent', ('parttype', 'params'))
 def handlereplycaps(op, inpart):
     """Used to transmit unknown content error over the wire"""
     kwargs = {}