[PATCH 1 of 3 V2] py3: byteify strings in pycompat

Matt Harbison mharbison72 at gmail.com
Sat Sep 15 00:18:32 EDT 2018


On Fri, 14 Sep 2018 22:39:25 -0400, Matt Harbison <mharbison72 at gmail.com>  
wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1536813542 14400
> #      Thu Sep 13 00:39:02 2018 -0400
> # Node ID 26795e6d586896a0449ea8e7e78fc6ba33a04d68
> # Parent  6ecfd12f09cd4fe185ebbc98d254534ebd995b68
> py3: byteify strings in pycompat
>
> diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
> --- a/mercurial/pycompat.py
> +++ b/mercurial/pycompat.py

> @@ -346,8 +346,8 @@ else:
>      bytesurl = identity
>       # this can't be parsed on Python 3
> -    exec('def raisewithtb(exc, tb):\n'
> -         '    raise exc, None, tb\n')
> +    exec(r'def raisewithtb(exc, tb):\n'
> +         r'    raise exc, None, tb\n')
>       def fsencode(filename):
>          """

Now that I've cycled back around to py2, it looks like this part needs to  
be dropped.


More information about the Mercurial-devel mailing list