Show More
@@ -3,6 +3,7 b'' | |||||
3 | from __future__ import absolute_import |
|
3 | from __future__ import absolute_import | |
4 |
|
4 | |||
5 | import os |
|
5 | import os | |
|
6 | import shlex | |||
6 | import subprocess |
|
7 | import subprocess | |
7 | import sys |
|
8 | import sys | |
8 |
|
9 | |||
@@ -23,5 +24,12 b' hgcmd = sys.argv[2]' | |||||
23 | if os.name == 'nt': |
|
24 | if os.name == 'nt': | |
24 | # hack to make simple unix single quote quoting work on windows |
|
25 | # hack to make simple unix single quote quoting work on windows | |
25 | hgcmd = hgcmd.replace("'", '"') |
|
26 | hgcmd = hgcmd.replace("'", '"') | |
|
27 | cmds = shlex.split(hgcmd) | |||
|
28 | if cmds[0].endswith('.py'): | |||
|
29 | python_exe = os.environ['PYTHON'] | |||
|
30 | cmds.insert(0, python_exe) | |||
|
31 | hgcmd = shlex.join(cmds) | |||
|
32 | # shlex generate windows incompatible string... | |||
|
33 | hgcmd = hgcmd.replace("'", '"') | |||
26 | r = subprocess.call(hgcmd, shell=True) |
|
34 | r = subprocess.call(hgcmd, shell=True) | |
27 | sys.exit(bool(r)) |
|
35 | sys.exit(bool(r)) |
General Comments 0
You need to be logged in to leave comments.
Login now