Patchwork D7221: hghave: fix bytes/string issue on Python 3

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 9:20 p.m.
Message ID <differential-rev-PHID-DREV-b3e5dipm6vflseks5qsn-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42730/
State New
Headers show

Comments

phabricator - Nov. 4, 2019, 9:20 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 11, 2019, 11:36 a.m.
pulkit added a comment.


  This has already been pushed as https://www.mercurial-scm.org/repo/hg-committed/rev/c3bca833cb92

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7221/new/

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

To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -987,4 +987,4 @@ 
     version_regex = b'black, version ([0-9a-b.]+)'
     version = matchoutput(blackcmd, version_regex)
     sv = distutils.version.StrictVersion
-    return version and sv(version.group(1)) >= sv('19.10b0')
+    return version and sv(_strpath(version.group(1))) >= sv('19.10b0')