##// END OF EJS Templates
bundle2: use the new ``part.params`` dictionary...
Pierre-Yves David -
r21611:71b7b3f7 default
parent child Browse files
Show More
@@ -794,9 +794,9 b' def handlechangegroup(op, inpart):'
794
794
795 @parthandler('b2x:reply:changegroup')
795 @parthandler('b2x:reply:changegroup')
796 def handlechangegroup(op, inpart):
796 def handlechangegroup(op, inpart):
797 p = dict(inpart.advisoryparams)
797 ret = int(inpart.params['return'])
798 ret = int(p['return'])
798 replyto = int(inpart.params['in-reply-to'])
799 op.records.add('changegroup', {'return': ret}, int(p['in-reply-to']))
799 op.records.add('changegroup', {'return': ret}, replyto)
800
800
801 @parthandler('b2x:check:heads')
801 @parthandler('b2x:check:heads')
802 def handlechangegroup(op, inpart):
802 def handlechangegroup(op, inpart):
@@ -832,18 +832,14 b' def handlereplycaps(op, inpart):'
832 @parthandler('b2x:error:abort')
832 @parthandler('b2x:error:abort')
833 def handlereplycaps(op, inpart):
833 def handlereplycaps(op, inpart):
834 """Used to transmit abort error over the wire"""
834 """Used to transmit abort error over the wire"""
835 manargs = dict(inpart.mandatoryparams)
835 raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
836 advargs = dict(inpart.advisoryparams)
837 raise util.Abort(manargs['message'], hint=advargs.get('hint'))
838
836
839 @parthandler('b2x:error:unknownpart')
837 @parthandler('b2x:error:unknownpart')
840 def handlereplycaps(op, inpart):
838 def handlereplycaps(op, inpart):
841 """Used to transmit unknown part error over the wire"""
839 """Used to transmit unknown part error over the wire"""
842 manargs = dict(inpart.mandatoryparams)
840 raise UnknownPartError(inpart.params['parttype'])
843 raise UnknownPartError(manargs['parttype'])
844
841
845 @parthandler('b2x:error:pushraced')
842 @parthandler('b2x:error:pushraced')
846 def handlereplycaps(op, inpart):
843 def handlereplycaps(op, inpart):
847 """Used to transmit push race error over the wire"""
844 """Used to transmit push race error over the wire"""
848 manargs = dict(inpart.mandatoryparams)
845 raise error.ResponseError(_('push failed:'), inpart.params['message'])
849 raise error.ResponseError(_('push failed:'), manargs['message'])
General Comments 0
You need to be logged in to leave comments. Login now