D3156: githelp: use revsymbol() for looking up symbol
This revision was automatically updated to reflect the committed changes. Closed by commit rHG764ada920db5: githelp: use revsymbol() for looking up symbol (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3156?vs=7771&id=7778 REVISION DETAIL https://phab.mercurial-scm.org/D3156 AFFECTED FILES hgext/githelp.py CHANGE DETAILS diff --git a/hgext/githelp.py b/hgext/githelp.py --- a/hgext/githelp.py +++ b/hgext/githelp.py @@ -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 To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3156: githelp: use revsymbol() for looking up symbol
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I don't know if we should be using revsingle() here, so I was conservative and switched to revsymbol(). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3156 AFFECTED FILES hgext/githelp.py CHANGE DETAILS diff --git a/hgext/githelp.py b/hgext/githelp.py --- a/hgext/githelp.py +++ b/hgext/githelp.py @@ -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 To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel