Commit 3108f3f4 authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Russ Cox

codereview: use cmd.communicate.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4145046
parent 642c7740
......@@ -1146,10 +1146,8 @@ def clpatch(ui, repo, clname, **opts):
except:
return "hgpatch: " + ExceptionDetail()
cmd.stdin.write(patch)
cmd.stdin.close()
out = cmd.stdout.read()
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
out, err = cmd.communicate(patch)
if cmd.returncode != 0 and not opts["ignore_hgpatch_failure"]:
return "hgpatch failed"
cl.local = True
cl.files = out.strip().split()
......
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