mercurial/bundle2.py
changeset 21622 457492741007
parent 21620 6eaa71b2a3cc
child 21623 5b26d82e4e2a
equal deleted inserted replaced
21621:b6eb56a9335d 21622:457492741007
   829     raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
   829     raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint'))
   830 
   830 
   831 @parthandler('b2x:error:unsupportedcontent')
   831 @parthandler('b2x:error:unsupportedcontent')
   832 def handlereplycaps(op, inpart):
   832 def handlereplycaps(op, inpart):
   833     """Used to transmit unknown content error over the wire"""
   833     """Used to transmit unknown content error over the wire"""
   834     parttype = inpart.params['parttype']
   834     kwargs = {}
   835     raise error.BundleValueError(parttype=parttype)
   835     kwargs['parttype'] = inpart.params['parttype']
       
   836     params = inpart.params.get('params')
       
   837     if params is not None:
       
   838         kwargs['params'] = params.split('\0')
       
   839 
       
   840     raise error.BundleValueError(**kwargs)
   836 
   841 
   837 @parthandler('b2x:error:pushraced')
   842 @parthandler('b2x:error:pushraced')
   838 def handlereplycaps(op, inpart):
   843 def handlereplycaps(op, inpart):
   839     """Used to transmit push race error over the wire"""
   844     """Used to transmit push race error over the wire"""
   840     raise error.ResponseError(_('push failed:'), inpart.params['message'])
   845     raise error.ResponseError(_('push failed:'), inpart.params['message'])