Patchwork [STABLE] hghave: fix bytes/string issue on Python 3

login
register
mail settings
Submitter Augie Fackler
Date Nov. 4, 2019, 5:20 p.m.
Message ID <1ea0fc92eb401c90f544.1572888019@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/42735/
State New
Headers show

Comments

Augie Fackler - Nov. 4, 2019, 5:20 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1572888011 18000
#      Mon Nov 04 12:20:11 2019 -0500
# Branch stable
# Node ID 1ea0fc92eb401c90f544ac5251d4d6ff51cf72bb
# Parent  40bf3d7ecc42b7f7cf8004f346b6fe304ffe7a59
hghave: fix bytes/string issue on Python 3

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -987,4 +987,4 @@  def has_black():
     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')