Mercurial > hg
changeset 166:39624c47060f
hgweb: don't blow up on search for unknown keys
author | mpm@selenic.com |
---|---|
date | Thu, 26 May 2005 10:11:05 -0800 |
parents | 7fc8385df514 |
children | fad9ad1ec7c7 |
files | mercurial/hgweb.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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))