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.
--- 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