Don't show traceback on 'hg clone -r unknown ssh://hg.example.com/'.
--- 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")