Mercurial > hg
changeset 21547:565d45919db8 stable
bundle2: make sure standard stream are binary
Python on Windows apparently use encoded stream by default. We use the same
trick than elsewhere in the code to make them binary.
This should fix the current buildbot failure on windows.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 15 May 2014 23:53:21 -0700 |
parents | 667df8f478d1 |
children | b4f0e15d1dab 5e13507a3b4e |
files | tests/test-bundle2.t |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bundle2.t Tue May 20 13:55:08 2014 -0700 +++ b/tests/test-bundle2.t Thu May 15 23:53:21 2014 -0700 @@ -8,6 +8,14 @@ > code. We still need to be able to test it while it grow up. > """ > + > try: + > import msvcrt + > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) + > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) + > except ImportError: + > pass + > > import sys > from mercurial import cmdutil > from mercurial import util