tests/test-archive
changeset 7080 a6477aa893b8
parent 7029 b84d27386285
child 7344 58fd3c718ca4
--- a/tests/test-archive	Sun Oct 12 19:11:56 2008 +0200
+++ b/tests/test-archive	Sun Oct 12 19:11:59 2008 +0200
@@ -46,6 +46,13 @@
 QTIP=`hg id -q`
 cat > getarchive.py <<EOF
 import os, sys, urllib2
+try:
+    # Set stdout to binary mode for win32 platforms
+    import msvcrt
+    msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
+except ImportError:
+    pass
+    
 node, archive = sys.argv[1:]
 f = urllib2.urlopen('http://127.0.0.1:%s/?cmd=archive;node=%s;type=%s'
                     % (os.environ['HGPORT'], node, archive))