# HG changeset patch # User Matt Mackall # Date 2005-07-10 18:38:50 # Node ID f8098ae9f5b6d7686863df68f5e4da210490e103 # Parent 22bc6fb9aefc43c3a29db13f0d5fbe1790aeede5 Generate a friendlier except for failed lookups -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Generate a friendlier except for failed lookups manifest hash: 1a4384b791bba2107604e56168166dfcbfb54086 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFC0Ws6ywK+sNU5EO8RArBGAJ9EA0mCNGqO+w6LaO358sVe19o7lQCdGffF MmQ/ZIvxoJOjYTo+PLBWMqI= =4VIg -----END PGP SIGNATURE----- diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -608,7 +608,10 @@ class localrepository: try: return self.tags()[key] except KeyError: - return self.changelog.lookup(key) + try: + return self.changelog.lookup(key) + except: + raise RepoError("unknown revision '%s'" % key) def dev(self): if self.remote: return -1