Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/httprepo.py @ 3551:9073d7366776
Use the new UnexpectedOutput exception in httprepo, too.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 27 Oct 2006 18:20:28 +0200 |
parents | 88b4755fa48f |
children | ca24144ed850 |
comparison
equal
deleted
inserted
replaced
3550:eda9e7c9300d | 3551:9073d7366776 |
---|---|
273 def heads(self): | 273 def heads(self): |
274 d = self.do_read("heads") | 274 d = self.do_read("heads") |
275 try: | 275 try: |
276 return map(bin, d[:-1].split(" ")) | 276 return map(bin, d[:-1].split(" ")) |
277 except: | 277 except: |
278 self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n") | 278 raise util.UnexpectedOutput(_("unexpected response:"), d) |
279 raise | |
280 | 279 |
281 def branches(self, nodes): | 280 def branches(self, nodes): |
282 n = " ".join(map(hex, nodes)) | 281 n = " ".join(map(hex, nodes)) |
283 d = self.do_read("branches", nodes=n) | 282 d = self.do_read("branches", nodes=n) |
284 try: | 283 try: |
285 br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] | 284 br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] |
286 return br | 285 return br |
287 except: | 286 except: |
288 self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n") | 287 raise util.UnexpectedOutput(_("unexpected response:"), d) |
289 raise | |
290 | 288 |
291 def between(self, pairs): | 289 def between(self, pairs): |
292 n = "\n".join(["-".join(map(hex, p)) for p in pairs]) | 290 n = "\n".join(["-".join(map(hex, p)) for p in pairs]) |
293 d = self.do_read("between", pairs=n) | 291 d = self.do_read("between", pairs=n) |
294 try: | 292 try: |
295 p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] | 293 p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] |
296 return p | 294 return p |
297 except: | 295 except: |
298 self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n") | 296 raise util.UnexpectedOutput(_("unexpected response:"), d) |
299 raise | |
300 | 297 |
301 def changegroup(self, nodes, kind): | 298 def changegroup(self, nodes, kind): |
302 n = " ".join(map(hex, nodes)) | 299 n = " ".join(map(hex, nodes)) |
303 f = self.do_cmd("changegroup", roots=n) | 300 f = self.do_cmd("changegroup", roots=n) |
304 | 301 |