Submitter | phabricator |
---|---|
Date | March 30, 2020, 1:30 a.m. |
Message ID | <differential-rev-PHID-DREV-l57uf4xn2ebaiugaswgq-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/45940/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/tests/filtertraceback.py b/tests/filtertraceback.py --- a/tests/filtertraceback.py +++ b/tests/filtertraceback.py @@ -4,8 +4,19 @@ from __future__ import absolute_import, print_function +import io import sys +if sys.version_info[0] >= 3: + # Prevent \r from being inserted on Windows. + sys.stdout = io.TextIOWrapper( + sys.stdout.buffer, + sys.stdout.encoding, + sys.stdout.errors, + newline="\n", + line_buffering=sys.stdout.line_buffering, + ) + state = 'none' for line in sys.stdin: