procutil: use rapply(tonativestr, ...) to preserve lists when they come in stable
authorAugie Fackler <augie@google.com>
Tue, 01 Dec 2020 01:18:21 -0500
branchstable
changeset 46019 fdd54a876213
parent 45851 81da6feb5000
child 46020 210f9b8d7bbd
procutil: use rapply(tonativestr, ...) to preserve lists when they come in This was broken when script was a list instead of a string. I caught this with an internal extension at Google, and I'm not really sure why it wasn't caught in any kind of CI. Differential Revision: https://phab.mercurial-scm.org/D9471
mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py	Tue Nov 03 11:24:21 2020 +0900
+++ b/mercurial/utils/procutil.py	Tue Dec 01 01:18:21 2020 -0500
@@ -640,7 +640,7 @@
         # we can't use close_fds *and* redirect stdin. I'm not sure that we
         # need to because the detached process has no console connection.
         p = subprocess.Popen(
-            tonativestr(script),
+            pycompat.rapply(tonativestr, script),
             shell=shell,
             env=tonativeenv(env),
             close_fds=True,