hgweb: don't blow up on search for unknown keys
authormpm@selenic.com
Thu, 26 May 2005 10:11:05 -0800
changeset 166 39624c47060f
parent 165 7fc8385df514
child 167 fad9ad1ec7c7
hgweb: don't blow up on search for unknown keys
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Thu May 26 10:08:47 2005 -0800
+++ b/mercurial/hgweb.py	Thu May 26 10:11:05 2005 -0800
@@ -525,7 +525,10 @@
             hi = self.repo.changelog.count()
             if args.has_key('rev'):
                 hi = args['rev'][0]
-                hi = self.repo.changelog.rev(self.repo.lookup(hi))
+                try:
+                    hi = self.repo.changelog.rev(self.repo.lookup(hi))
+                except KeyError:
+                    hi = self.repo.changelog.count()
 
             write(self.changelog(hi))