mercurial/sshrepo.py
changeset 11369 02a4373ca5cd
parent 11366 1765897fc497
child 11586 ddaaaa23bb8f
equal deleted inserted replaced
11368:b9eb005c54ad 11369:02a4373ca5cd
   271             self.abort(error.ResponseError(_("unexpected response:"), r))
   271             self.abort(error.ResponseError(_("unexpected response:"), r))
   272 
   272 
   273     def stream_out(self):
   273     def stream_out(self):
   274         return self.do_cmd('stream_out')
   274         return self.do_cmd('stream_out')
   275 
   275 
       
   276     def pushkey(self, namespace, key, old, new):
       
   277         if not self.capable('pushkey'):
       
   278             return False
       
   279         d = self.call("pushkey",
       
   280                       namespace=namespace, key=key, old=old, new=new)
       
   281         return bool(int(d))
       
   282 
       
   283     def listkeys(self, namespace):
       
   284         if not self.capable('pushkey'):
       
   285             return {}
       
   286         d = self.call("listkeys", namespace=namespace)
       
   287         r = {}
       
   288         for l in d.splitlines():
       
   289             k, v = l.split('\t')
       
   290             r[k.decode('string-escape')] = v.decode('string-escape')
       
   291         return r
       
   292 
   276 instance = sshrepository
   293 instance = sshrepository