summaryrefslogtreecommitdiff
path: root/lib/codereview
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2011-02-02 22:43:40 -0500
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2011-02-02 22:43:40 -0500
commit6b94369c41e12c09372ed6393eb7bdfb4a86d59e (patch)
tree1ea59dda26b8a22bdd68de45ed6071039027a96a /lib/codereview
parent7acb7ffb6b1761fb5d2d35ed6c779e850d78b6fd (diff)
downloadgo-6b94369c41e12c09372ed6393eb7bdfb4a86d59e.tar.gz
codereview: fix hgpatch on windows
R=rsc CC=golang-dev http://codereview.appspot.com/3989059 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'lib/codereview')
-rw-r--r--lib/codereview/codereview.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index cd0c7a876..94270f840 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -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"]: