# HG changeset patch # User Pierre-Yves David # Date 1400223201 25200 # Node ID 565d45919db8ef3d814cd055829c1814f6040904 # Parent 667df8f478d14335e65b4cf2395709666c2acf61 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. diff -r 667df8f478d1 -r 565d45919db8 tests/test-bundle2.t --- 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