[PATCH STABLE] util: work around behavior change in Python 2.7.1

Steve Borho steve at borho.org
Mon Dec 13 13:41:13 CST 2010


On Mon, Dec 13, 2010 at 12:07 PM,  <steve.borho at gmail.com> wrote:
> # HG changeset patch
> # User Steve Borho <steve at borho.org>
> # Date 1292262661 21600
> # Branch stable
> # Node ID b2f65bfbf115afaadf1b24633c06b8d0e04d3168
> # Parent  6e79a3bb8c790549fbd916d5f89f2ac25a2cbb34
> util: work around behavior change in Python 2.7.1
>
> diff -r 6e79a3bb8c79 -r b2f65bfbf115 mercurial/util.py
> --- a/mercurial/util.py Tue Dec 07 20:03:04 2010 +1100
> +++ b/mercurial/util.py Mon Dec 13 11:51:01 2010 -0600
> @@ -391,7 +391,8 @@
>             return '1'
>         return str(val)
>     origcmd = cmd
> -    if os.name == 'nt':
> +    if os.name == 'nt' and sys.version_info < (2, 7, 1):
> +        # Python versions since 2.7.1 do this extra quoting themselves
>         cmd = '"%s"' % cmd
>     env = dict(os.environ)
>     env.update((k, py2shell(v)) for k, v in environ.iteritems())

This has been pushed to crew-stable.  Sorry for the noise.

-- 
Steve Borho


More information about the Mercurial-devel mailing list