changeset 37388:764ada920db5

githelp: use revsymbol() for looking up symbol I don't know if we should be using revsingle() here, so I was conservative and switched to revsymbol(). Differential Revision: https://phab.mercurial-scm.org/D3156
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 05 Apr 2018 23:23:48 -0700
parents 83d537162894
children bef863a09acd
files hgext/githelp.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/githelp.py	Thu Apr 05 21:32:59 2018 -0700
+++ b/hgext/githelp.py	Thu Apr 05 23:23:48 2018 -0700
@@ -26,6 +26,7 @@
     error,
     fancyopts,
     registrar,
+    scmutil,
 )
 from mercurial.utils import (
     procutil,
@@ -253,7 +254,7 @@
     too many ways to spell revisions in git for us to reasonably catch all of
     them, so let's be conservative.
     """
-    if string in repo:
+    if scmutil.isrevsymbol(repo, string):
         # if it's definitely a revision let's not even check if a file of the
         # same name exists.
         return False