comparison mercurial/hgweb/webcommands.py @ 19436:f5abfa08fb09

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.
author Alexander Plavin <me@aplavin.ru>
date Fri, 12 Jul 2013 01:58:48 +0400
parents 55b9d98a1ef4
children a87d9102f7af
comparison
equal deleted inserted replaced
19435:d3611374b50d 19436:f5abfa08fb09
194 hi = query 194 hi = query
195 else: 195 else:
196 hi = 'tip' 196 hi = 'tip'
197 try: 197 try:
198 ctx = web.repo[hi] 198 ctx = web.repo[hi]
199 except error.RepoError: 199 except (error.RepoError, error.LookupError):
200 return _search(web, req, tmpl) # XXX redirect to 404 page? 200 return _search(web, req, tmpl) # XXX redirect to 404 page?
201 201
202 def changelist(latestonly, **map): 202 def changelist(latestonly, **map):
203 l = [] # build a list in forward order for efficiency 203 l = [] # build a list in forward order for efficiency
204 revs = [] 204 revs = []