mercurial/bundle2.py
changeset 25484 a5192774e925
parent 25481 6de96cb31176
child 25491 8cd0159207df
equal deleted inserted replaced
25483:fb04372d7b38 25484:a5192774e925
  1328     if op.reply is not None:
  1328     if op.reply is not None:
  1329         rpart = op.reply.newpart('reply:pushkey')
  1329         rpart = op.reply.newpart('reply:pushkey')
  1330         rpart.addparam('in-reply-to', str(inpart.id), mandatory=False)
  1330         rpart.addparam('in-reply-to', str(inpart.id), mandatory=False)
  1331         rpart.addparam('return', '%i' % ret, mandatory=False)
  1331         rpart.addparam('return', '%i' % ret, mandatory=False)
  1332     if inpart.mandatory and not ret:
  1332     if inpart.mandatory and not ret:
  1333         raise util.Abort(_('failed to update value for "%s/%s"')
  1333         kwargs = {}
  1334                          % (namespace, key))
  1334         for key in ('namespace', 'key', 'new', 'old', 'ret'):
       
  1335             if key in inpart.params:
       
  1336                 kwargs[key] = inpart.params[key]
       
  1337         raise error.PushkeyFailed(partid=str(inpart.id), **kwargs)
  1335 
  1338 
  1336 @parthandler('reply:pushkey', ('return', 'in-reply-to'))
  1339 @parthandler('reply:pushkey', ('return', 'in-reply-to'))
  1337 def handlepushkeyreply(op, inpart):
  1340 def handlepushkeyreply(op, inpart):
  1338     """retrieve the result of a pushkey request"""
  1341     """retrieve the result of a pushkey request"""
  1339     ret = int(inpart.params['return'])
  1342     ret = int(inpart.params['return'])