Use UnexpectedOutput exception instead of RepoError in sshrepo, too.
authorThomas Arendsen Hein <thomas@intevation.de>
Sat, 02 Dec 2006 22:16:00 +0100
changeset 3766 581665242c07
parent 3765 768ba23c948e
child 3767 1861fa38a6a7
Use UnexpectedOutput exception instead of RepoError in sshrepo, too.
mercurial/sshrepo.py
--- a/mercurial/sshrepo.py	Sat Dec 02 22:15:18 2006 +0100
+++ b/mercurial/sshrepo.py	Sat Dec 02 22:16:00 2006 +0100
@@ -121,7 +121,7 @@
         try:
             l = int(l)
         except:
-            self.raise_(hg.RepoError(_("unexpected response '%s'") % l))
+            self.raise_(util.UnexpectedOutput(_("unexpected response:"), l))
         return r.read(l)
 
     def lock(self):
@@ -144,7 +144,7 @@
         try:
             return map(bin, d[:-1].split(" "))
         except:
-            self.raise_(hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")))
+            self.raise_(util.UnexpectedOutput(_("unexpected response:"), d))
 
     def branches(self, nodes):
         n = " ".join(map(hex, nodes))
@@ -153,7 +153,7 @@
             br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
             return br
         except:
-            self.raise_(hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")))
+            self.raise_(util.UnexpectedOutput(_("unexpected response:"), d))
 
     def between(self, pairs):
         n = "\n".join(["-".join(map(hex, p)) for p in pairs])
@@ -162,7 +162,7 @@
             p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
             return p
         except:
-            self.raise_(hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")))
+            self.raise_(util.UnexpectedOutput(_("unexpected response:"), d))
 
     def changegroup(self, nodes, kind):
         n = " ".join(map(hex, nodes))