mirror of
https://github.com/golang/go
synced 2024-11-21 14:44:40 -07:00
codereview: use cmd.communicate.
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4145046
This commit is contained in:
parent
642c774081
commit
3108f3f4a0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user