Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/sshserver.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 | abaee83ce0a6 |
line wrap: on
line diff
--- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -51,7 +51,13 @@ class sshserver(object): def do_lookup(self): arg, key = self.getarg() assert arg == 'key' - self.respond(hex(self.repo.lookup(key)) + "\n") + try: + r = hex(self.repo.lookup(key)) + success = 1 + except Exception,inst: + r = str(inst) + success = 0 + self.respond("%s %s\n" % (success, r)) def do_heads(self): h = self.repo.heads()