mirror of
https://github.com/golang/go
synced 2024-11-22 01:24:42 -07:00
codereview: fix hgpatch on windows
R=rsc CC=golang-dev https://golang.org/cl/3989059
This commit is contained in:
parent
34336bd9f3
commit
27191b558c
@ -1142,12 +1142,11 @@ def clpatch(ui, repo, clname, **opts):
|
|||||||
if err != "":
|
if err != "":
|
||||||
return err
|
return err
|
||||||
try:
|
try:
|
||||||
cmd = subprocess.Popen(argv, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None, close_fds=True)
|
cmd = subprocess.Popen(argv, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None, close_fds=sys.platform != "win32")
|
||||||
except:
|
except:
|
||||||
return "hgpatch: " + ExceptionDetail()
|
return "hgpatch: " + ExceptionDetail()
|
||||||
if os.fork() == 0:
|
|
||||||
cmd.stdin.write(patch)
|
cmd.stdin.write(patch)
|
||||||
os._exit(0)
|
|
||||||
cmd.stdin.close()
|
cmd.stdin.close()
|
||||||
out = cmd.stdout.read()
|
out = cmd.stdout.read()
|
||||||
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
|
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user