##// END OF EJS Templates
bundle2: declare supported parameters for all handlers...
Pierre-Yves David -
r21624:d61066d7 default
parent child Browse files
Show More
@@ -179,7 +179,7 b' def parthandler(parttype, params=()):'
179
179
180 eg::
180 eg::
181
181
182 @parthandler('myparttype')
182 @parthandler('myparttype', ('mandatory', 'param', 'handled'))
183 def myparttypehandler(...):
183 def myparttypehandler(...):
184 '''process a part of type "my part".'''
184 '''process a part of type "my part".'''
185 ...
185 ...
@@ -787,7 +787,7 b' def handlechangegroup(op, inpart):'
787 part.addparam('return', '%i' % ret, mandatory=False)
787 part.addparam('return', '%i' % ret, mandatory=False)
788 assert not inpart.read()
788 assert not inpart.read()
789
789
790 @parthandler('b2x:reply:changegroup')
790 @parthandler('b2x:reply:changegroup', ('return', 'in-reply-to'))
791 def handlechangegroup(op, inpart):
791 def handlechangegroup(op, inpart):
792 ret = int(inpart.params['return'])
792 ret = int(inpart.params['return'])
793 replyto = int(inpart.params['in-reply-to'])
793 replyto = int(inpart.params['in-reply-to'])
@@ -824,12 +824,12 b' def handlereplycaps(op, inpart):'
824 if op.reply is None:
824 if op.reply is None:
825 op.reply = bundle20(op.ui, caps)
825 op.reply = bundle20(op.ui, caps)
826
826
827 @parthandler('b2x:error:abort')
827 @parthandler('b2x:error:abort', ('message', 'hint'))
828 def handlereplycaps(op, inpart):
828 def handlereplycaps(op, inpart):
829 """Used to transmit abort error over the wire"""
829 """Used to transmit abort error over the wire"""
830 raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
830 raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
831
831
832 @parthandler('b2x:error:unsupportedcontent')
832 @parthandler('b2x:error:unsupportedcontent', ('parttype', 'params'))
833 def handlereplycaps(op, inpart):
833 def handlereplycaps(op, inpart):
834 """Used to transmit unknown content error over the wire"""
834 """Used to transmit unknown content error over the wire"""
835 kwargs = {}
835 kwargs = {}
General Comments 0
You need to be logged in to leave comments. Login now