Use the new UnexpectedOutput exception in httprepo, too.
authorThomas Arendsen Hein <thomas@intevation.de>
Fri, 27 Oct 2006 18:20:28 +0200
changeset 3565 9073d7366776
parent 3564 eda9e7c9300d
child 3566 ca24144ed850
Use the new UnexpectedOutput exception in httprepo, too.
mercurial/httprepo.py
--- a/mercurial/httprepo.py	Fri Oct 27 18:17:12 2006 +0200
+++ b/mercurial/httprepo.py	Fri Oct 27 18:20:28 2006 +0200
@@ -275,8 +275,7 @@
         try:
             return map(bin, d[:-1].split(" "))
         except:
-            self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n")
-            raise
+            raise util.UnexpectedOutput(_("unexpected response:"), d)
 
     def branches(self, nodes):
         n = " ".join(map(hex, nodes))
@@ -285,8 +284,7 @@
             br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
             return br
         except:
-            self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n")
-            raise
+            raise util.UnexpectedOutput(_("unexpected response:"), d)
 
     def between(self, pairs):
         n = "\n".join(["-".join(map(hex, p)) for p in pairs])
@@ -295,8 +293,7 @@
             p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
             return p
         except:
-            self.ui.warn(_("unexpected response:\n") + d[:400] + "\n...\n")
-            raise
+            raise util.UnexpectedOutput(_("unexpected response:"), d)
 
     def changegroup(self, nodes, kind):
         n = " ".join(map(hex, nodes))