Commit 27191b55 authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Russ Cox

codereview: fix hgpatch on windows

R=rsc
CC=golang-dev
https://golang.org/cl/3989059
parent 34336bd9
......@@ -1142,12 +1142,11 @@ def clpatch(ui, repo, clname, **opts):
if err != "":
return err
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:
return "hgpatch: " + ExceptionDetail()
if os.fork() == 0:
cmd.stdin.write(patch)
os._exit(0)
cmd.stdin.write(patch)
cmd.stdin.close()
out = cmd.stdout.read()
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment