From: Yasuhiro Matsumoto Date: Thu, 3 Feb 2011 03:43:40 +0000 (-0500) Subject: codereview: fix hgpatch on windows X-Git-Tag: weekly.2011-02-15~120 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=27191b558c74233da9b465249a295b8ac612647d;p=gostls13.git codereview: fix hgpatch on windows R=rsc CC=golang-dev https://golang.org/cl/3989059 --- diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index cd0c7a8761..94270f840d 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"]: