changeset 37387:83d537162894

hgweb: use revsymbol() to determine if query is a revision repo.__getitem__ is about to get dumber. Differential Revision: https://phab.mercurial-scm.org/D3155
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 05 Apr 2018 21:32:59 -0700
parents 167b22a906f3
children 764ada920db5
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Thu Apr 05 14:03:33 2018 -0700
+++ b/mercurial/hgweb/webcommands.py	Thu Apr 05 21:32:59 2018 -0700
@@ -248,7 +248,7 @@
 
     def getsearchmode(query):
         try:
-            ctx = web.repo[query]
+            ctx = scmutil.revsymbol(web.repo, query)
         except (error.RepoError, error.LookupError):
             # query is not an exact revision pointer, need to
             # decide if it's a revset expression or keywords