diff mercurial/sshrepo.py @ 3447:ef1032c223e7

sshrepo: add passing of lookup exceptions
author Eric Hopper <hopper@omnifarious.org>
date Sat, 09 Sep 2006 18:25:06 -0700
parents 0b450267cf47
children e00920b4f1cb
line wrap: on
line diff
--- a/mercurial/sshrepo.py	Sat Sep 09 18:25:06 2006 -0700
+++ b/mercurial/sshrepo.py	Sat Sep 09 18:25:06 2006 -0700
@@ -133,9 +133,14 @@
 
     def lookup(self, key):
         d = self.call("lookup", key=key)
+        success, data = d[:-1].split(" ", 1)
         try:
-            return bin(d[:-1])
+            if int(success):
+                return bin(data)
+            else:
+                raise data
         except:
+            raise
             raise hg.RepoError("unexpected response '%s'" % (d[:400] + "..."))
 
     def heads(self):