[Request] [+ ] D9471: procutil: correctly convert to bytes when shell=False
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Dec 1 06:18:58 UTC 2020
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9471
AFFECTED FILES
mercurial/utils/procutil.py
CHANGE DETAILS
diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py
+++ b/mercurial/utils/procutil.py
@@ -654,9 +654,13 @@
stdin.write(stdin_bytes)
stdin.flush()
stdin.seek(0)
+ if shell:
+ script = tonativestr(script)
+ else:
+ script = [tonativestr(s) for s in script]
p = subprocess.Popen(
- tonativestr(script),
+ script,
shell=shell,
env=tonativeenv(env),
close_fds=True,
To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20201201/69cd6f9b/attachment.html>
More information about the Mercurial-patches
mailing list