Mercurial > hg
diff mercurial/sshrepo.py @ 3766:581665242c07
Use UnexpectedOutput exception instead of RepoError in sshrepo, too.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 02 Dec 2006 22:16:00 +0100 |
parents | 768ba23c948e |
children | abaee83ce0a6 |
line wrap: on
line diff
--- 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))