From patchwork Fri Jul 12 22:16:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: hgweb: run search instead of showing wrong error for ambigious identifier From: Alexander Plavin X-Patchwork-Id: 1852 Message-Id: To: mercurial-devel@selenic.com Date: Sat, 13 Jul 2013 02:16:39 +0400 # HG changeset patch # User Alexander Plavin # Date 1373579928 -14400 # Fri Jul 12 01:58:48 2013 +0400 # Node ID f6775d51fb76b4f393050eb1350d42b2c4676784 # Parent 85e44ad965f6141de53e78a5bcf64486489c3604 hgweb: run search instead of showing wrong error for ambigious identifier Before this when multiple changesets hashes in the repos started with the search query string, error was given that the revision isn't found, and it was misleading. Now a simple keyword search runs in this case. diff -r 85e44ad965f6 -r f6775d51fb76 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Jul 09 02:08:24 2013 +0400 +++ b/mercurial/hgweb/webcommands.py Fri Jul 12 01:58:48 2013 +0400 @@ -194,7 +194,7 @@ hi = 'tip' try: ctx = web.repo[hi] - except error.RepoError: + except (error.RepoError, error.LookupError): return _search(web, req, tmpl) # XXX redirect to 404 page? def changelist(latestonly, **map):