Mercurial > hg-stable
changeset 42532:9913fffd744b
py3: make catapult usable from the test runner in py3
Differential Revision: https://phab.mercurial-scm.org/D6577
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Tue, 25 Jun 2019 19:32:08 -0700 |
parents | f3fa10a5877d |
children | 0c0e54bcea9b |
files | tests/run-tests.py |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Jun 25 19:30:24 2019 -0700 +++ b/tests/run-tests.py Tue Jun 25 19:32:08 2019 -0700 @@ -1474,6 +1474,12 @@ script.append(b'alias pwd="pwd -W"\n') if hgcatapult and hgcatapult != os.devnull: + if PYTHON3: + hgcatapult = hgcatapult.encode('utf8') + cataname = self.name.encode('utf8') + else: + cataname = self.name + # Kludge: use a while loop to keep the pipe from getting # closed by our echo commands. The still-running file gets # reaped at the end of the script, which causes the while @@ -1490,9 +1496,9 @@ b'HGCATAPULTSESSION=%(session)s ; export HGCATAPULTSESSION\n' b'echo START %(session)s %(name)s >> %(catapult)s\n' % { - 'name': self.name, - 'session': session, - 'catapult': hgcatapult, + b'name': cataname, + b'session': session, + b'catapult': hgcatapult, } )