On Mon, 24 Sep 2018 22:25:42 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbi...@yahoo.com>
> # Date 1537678024 14400
> #      Sun Sep 23 00:47:04 2018 -0400
> # Node ID 4527f507eb09ea26c9a419886c9e680ce1040642
> # Parent  efe8b55207d20747f7083aa66976f9bbbd52fe27
> py3: convert arguments, cwd and env to native strings when spawning subprocess

Fixed missing import reported by pyflakes, and queued. Thanks.

> @@ -58,6 +58,10 @@ from mercurial.i18n import _
>  from mercurial.node import nullrev
>  from mercurial.node import wdirrev
>  
> +from mercurial.utils import (
> +    procutil,
> +)
> +
>  from mercurial import (
>      cmdutil,
>      context,
> @@ -448,9 +452,9 @@ def fixfile(ui, opts, fixers, fixctx, pa
>                  continue
>              ui.debug('subprocess: %s\n' % (command,))
>              proc = subprocess.Popen(
> -                command,
> +                pycompat.rapply(procutil.tonativestr, command),
>                  shell=True,

Here command is a byte string, so rapply() wouldn't be needed. Basically,
if shell=True is set, the command is unlikely to be a list.

There are a couple more instances. Can you send a follow up?
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to