changeset 3764:6652209d104d

Don't show traceback on 'hg clone -r unknown ssh://hg.example.com/'.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 02 Dec 2006 21:57:20 +0100
parents b9d3e12da485
children 768ba23c948e
files mercurial/sshrepo.py
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sshrepo.py	Sat Dec 02 16:08:00 2006 -0200
+++ b/mercurial/sshrepo.py	Sat Dec 02 21:57:20 2006 +0100
@@ -134,14 +134,10 @@
     def lookup(self, key):
         d = self.call("lookup", key=key)
         success, data = d[:-1].split(" ", 1)
-        try:
-            if int(success):
-                return bin(data)
-            else:
-                raise data
-        except:
-            raise
-            raise hg.RepoError("unexpected response '%s'" % (d[:400] + "..."))
+        if int(success):
+            return bin(data)
+        else:
+            self.repoerror(data)
 
     def heads(self):
         d = self.call("heads")