[PATCH 2 of 2] run-tests: convert hghave output to text

Yuya Nishihara yuya at tcha.org
Thu Mar 31 09:27:48 EDT 2016


On Wed, 30 Mar 2016 03:20:34 -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1459324954 0
> #      Wed Mar 30 08:02:34 2016 +0000
> # Node ID bc149b7f13ad842e7945704a6b27467a1481dab4
> # Parent  d5a110d3c09a84a41c977e33f07eaa0f14003dfd
> run-tests: convert hghave output to text
> 
> Before this, Python3 generated:
> b'skipped: unknown feature: not-py3k\n'
> 
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -1010,7 +1010,7 @@
>          if wifexited(ret):
>              ret = os.WEXITSTATUS(ret)
>          if ret == 2:
> -            print(stdout)
> +            print(stdout.decode('utf-8'))

Queued these, thanks.

As the output never be non-ascii, printing a unicode object on Python 2
should be safe.


More information about the Mercurial-devel mailing list