mercurial/httprepo.py
changeset 8563 f8ff65a83169
parent 8312 b87a50b7125c
child 9467 4c041f1ee1b4
equal deleted inserted replaced
8562:e3495c399006 8563:f8ff65a83169
   143         try:
   143         try:
   144             return map(bin, d[:-1].split(" "))
   144             return map(bin, d[:-1].split(" "))
   145         except:
   145         except:
   146             raise error.ResponseError(_("unexpected response:"), d)
   146             raise error.ResponseError(_("unexpected response:"), d)
   147 
   147 
       
   148     def branchmap(self):
       
   149         d = self.do_read("branchmap")
       
   150         try:
       
   151             branchmap = {}
       
   152             for branchpart in d.splitlines():
       
   153                 branchheads = branchpart.split(' ')
       
   154                 branchname = urllib.unquote(branchheads[0])
       
   155                 branchheads = [bin(x) for x in branchheads[1:]]
       
   156                 branchmap[branchname] = branchheads
       
   157             return branchmap
       
   158         except:
       
   159             raise error.ResponseError(_("unexpected response:"), d)
       
   160 
   148     def branches(self, nodes):
   161     def branches(self, nodes):
   149         n = " ".join(map(hex, nodes))
   162         n = " ".join(map(hex, nodes))
   150         d = self.do_read("branches", nodes=n)
   163         d = self.do_read("branches", nodes=n)
   151         try:
   164         try:
   152             br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
   165             br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]