test-bundle2: move file mode setting after sys import

This commit is contained in:
Matt Mackall 2014-07-30 18:28:37 -05:00
parent 023b57a106
commit 888b6892dd

View File

@ -8,14 +8,6 @@ Create an extension to test bundle2 API
> 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
@ -24,6 +16,15 @@ Create an extension to test bundle2 API
> from mercurial import discovery
> from mercurial import changegroup
> from mercurial import error
>
> 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
>
> cmdtable = {}
> command = cmdutil.command(cmdtable)
>