equal
deleted
inserted
replaced
4 import os |
4 import os |
5 import subprocess |
5 import subprocess |
6 import sys |
6 import sys |
7 import time |
7 import time |
8 |
8 |
9 # we cannot use mercurial.testing as long as python2 is not dropped as the test |
|
10 # will only install the mercurial module for python2 in python2 run |
|
11 if sys.version_info[0] < 3: |
|
12 ver = '.'.join(str(x) for x in sys.version_info) |
|
13 exe = sys.executable |
|
14 print('SIGPIPE-HELPER: script should run with Python 3', file=sys.stderr) |
|
15 print('SIGPIPE-HELPER: %s is running %s' % (exe, ver), file=sys.stderr) |
|
16 sys.exit(255) |
|
17 |
9 |
18 if isinstance(sys.stdout.buffer, io.BufferedWriter): |
10 if isinstance(sys.stdout.buffer, io.BufferedWriter): |
19 print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr) |
11 print('SIGPIPE-HELPER: script need unbuffered output', file=sys.stderr) |
20 sys.exit(255) |
12 sys.exit(255) |
21 |
13 |