Patchwork D3155: hgweb: use revsymbol() to determine if query is a revision

login
register
mail settings
Submitter phabricator
Date April 6, 2018, 7:08 a.m.
Message ID <differential-rev-PHID-DREV-lqlsmlhcnh4ifewg5lkf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30426/
State Superseded
Headers show

Comments

phabricator - April 6, 2018, 7:08 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  repo.__getitem__ is about to get dumber.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3155

AFFECTED FILES
  mercurial/hgweb/webcommands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -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