Generate a friendlier except for failed lookups
authorMatt Mackall <mpm@selenic.com>
Sun, 10 Jul 2005 10:38:50 -0800
changeset 658 f8098ae9f5b6
parent 657 22bc6fb9aefc
child 659 3662e3d6b690
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-----
mercurial/hg.py
--- a/mercurial/hg.py	Sun Jul 10 10:06:54 2005 -0800
+++ b/mercurial/hg.py	Sun Jul 10 10:38:50 2005 -0800
@@ -608,7 +608,10 @@
         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