Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 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 | d3a2344446e6 |
children | 47aea60d114d |
comparison
equal
deleted
inserted
replaced
37386:167b22a906f3 | 37387:83d537162894 |
---|---|
246 MODE_REVSET: (revsetsearch, 'revset expression search'), | 246 MODE_REVSET: (revsetsearch, 'revset expression search'), |
247 } | 247 } |
248 | 248 |
249 def getsearchmode(query): | 249 def getsearchmode(query): |
250 try: | 250 try: |
251 ctx = web.repo[query] | 251 ctx = scmutil.revsymbol(web.repo, query) |
252 except (error.RepoError, error.LookupError): | 252 except (error.RepoError, error.LookupError): |
253 # query is not an exact revision pointer, need to | 253 # query is not an exact revision pointer, need to |
254 # decide if it's a revset expression or keywords | 254 # decide if it's a revset expression or keywords |
255 pass | 255 pass |
256 else: | 256 else: |