[PATCH 1 of 2] hghave: matchoutput needs to use bytes for regexp
timeless
timeless at fmr.im
Thu May 5 09:13:40 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1462439221 0
# Thu May 05 09:07:01 2016 +0000
# Node ID b5d88fd58b39e6b96ce18a001494113195cfe43c
# Parent e0e72d67a8cd370218453ca0444e02aadabd56a8
# Available At bb://timeless/mercurial-crew
# hg pull bb://timeless/mercurial-crew -r b5d88fd58b39
hghave: matchoutput needs to use bytes for regexp
file output is bytes in py3, so we need to convert the regexp to bytes
diff -r e0e72d67a8cd -r b5d88fd58b39 tests/hghave.py
--- a/tests/hghave.py Sun Apr 17 13:06:44 2016 +0900
+++ b/tests/hghave.py Thu May 05 09:07:01 2016 +0000
@@ -90,7 +90,7 @@
"""Return the match object if cmd executes successfully and its output
is matched by the supplied regular expression.
"""
- r = re.compile(regexp)
+ r = re.compile(regexp.encode('utf-8'))
try:
p = subprocess.Popen(
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
More information about the Mercurial-devel
mailing list