diff tests/test-merge1 @ 7080:a6477aa893b8

tests: Windows compatibility fixes - printenv.py, md5sum.py, simplemerge, test-archive, test-merge1, test-merge-symlinks: set standard streams to binary mode - test-encode: replace "gunzip" by "gzip -d" - test-hup: requires fifo
author Patrick Mezard <pmezard@gmail.com>
date Sun, 12 Oct 2008 19:11:59 +0200
parents ccfe423d3d0a
children 50b6af595e0c
line wrap: on
line diff
--- a/tests/test-merge1	Sun Oct 12 19:11:56 2008 +0200
+++ b/tests/test-merge1	Sun Oct 12 19:11:59 2008 +0200
@@ -2,6 +2,14 @@
 
 cat <<EOF > merge
 import sys, os
+
+try:
+    import msvcrt
+    msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
+    msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
+except ImportError:
+    pass
+
 print "merging for", os.path.basename(sys.argv[1])
 EOF
 HGMERGE="python ../merge"; export HGMERGE