mercurial/sshrepo.py
changeset 3446 0b450267cf47
parent 3379 8770b4870e22
child 3447 ef1032c223e7
equal deleted inserted replaced
3445:233c733e4af5 3446:0b450267cf47
   129         return remotelock(self)
   129         return remotelock(self)
   130 
   130 
   131     def unlock(self):
   131     def unlock(self):
   132         self.call("unlock")
   132         self.call("unlock")
   133 
   133 
       
   134     def lookup(self, key):
       
   135         d = self.call("lookup", key=key)
       
   136         try:
       
   137             return bin(d[:-1])
       
   138         except:
       
   139             raise hg.RepoError("unexpected response '%s'" % (d[:400] + "..."))
       
   140 
   134     def heads(self):
   141     def heads(self):
   135         d = self.call("heads")
   142         d = self.call("heads")
   136         try:
   143         try:
   137             return map(bin, d[:-1].split(" "))
   144             return map(bin, d[:-1].split(" "))
   138         except:
   145         except:
   157             self.repoerror(_("unexpected response '%s'") % (d[:400] + "..."))
   164             self.repoerror(_("unexpected response '%s'") % (d[:400] + "..."))
   158 
   165 
   159     def changegroup(self, nodes, kind):
   166     def changegroup(self, nodes, kind):
   160         n = " ".join(map(hex, nodes))
   167         n = " ".join(map(hex, nodes))
   161         return self.do_cmd("changegroup", roots=n)
   168         return self.do_cmd("changegroup", roots=n)
       
   169 
       
   170     def changegroupsubset(self, bases, heads, kind):
       
   171         bases = " ".join(map(hex, bases))
       
   172         heads = " ".join(map(hex, heads))
       
   173         return self.do_cmd("changegroupsubset", bases=bases, heads=heads)
   162 
   174 
   163     def unbundle(self, cg, heads, source):
   175     def unbundle(self, cg, heads, source):
   164         d = self.call("unbundle", heads=' '.join(map(hex, heads)))
   176         d = self.call("unbundle", heads=' '.join(map(hex, heads)))
   165         if d:
   177         if d:
   166             self.repoerror(_("push refused: %s") % d)
   178             self.repoerror(_("push refused: %s") % d)