##// END OF EJS Templates
tests: force `dumbhttp.py` to write its log file with '\n' on Windows...
Matt Harbison -
r53007:7332eae3 default
parent child Browse files
Show More
@@ -5,6 +5,7
5 Small and dumb HTTP server for use in tests.
5 Small and dumb HTTP server for use in tests.
6 """
6 """
7
7
8 import io
8 import optparse
9 import optparse
9 import os
10 import os
10 import signal
11 import signal
@@ -21,6 +22,20 from mercurial import (
21 httpserver = util.httpserver
22 httpserver = util.httpserver
22 OptionParser = optparse.OptionParser
23 OptionParser = optparse.OptionParser
23
24
25 if pycompat.iswindows:
26 sys.stdout = io.TextIOWrapper(
27 sys.stdout.buffer,
28 sys.stdout.encoding,
29 sys.stdout.errors,
30 newline="\n",
31 )
32 sys.stderr = io.TextIOWrapper(
33 sys.stderr.buffer,
34 sys.stderr.encoding,
35 sys.stderr.errors,
36 newline="\n",
37 )
38
24 if os.environ.get('HGIPV6', '0') == '1':
39 if os.environ.get('HGIPV6', '0') == '1':
25
40
26 class simplehttpserver(httpserver.httpserver):
41 class simplehttpserver(httpserver.httpserver):
General Comments 0
You need to be logged in to leave comments. Login now