[PATCH 1 of 2] py3: make the string unicode so its iterable in py3k
Pulkit Goyal
7895pulkit at gmail.com
Sat Oct 8 12:00:38 EDT 2016
On Sat, Oct 8, 2016 at 5:55 PM, Mateusz Kwapich <mitrandir at fb.com> wrote:
> # HG changeset patch
> # User Mateusz Kwapich <mitrandir at fb.com>
> # Date 1475941528 25200
> # Sat Oct 08 08:45:28 2016 -0700
> # Node ID 225efa4bf7f497e55f0ba57f64a33dce39eaeb29
> # Parent 8f34e217338be6a1b997807521e95f9f7409d722
> py3: make the string unicode so its iterable in py3k
>
> diff --git a/mercurial/store.py b/mercurial/store.py
> --- a/mercurial/store.py
> +++ b/mercurial/store.py
> @@ -65,7 +65,7 @@ def _reserved():
>
> these characters will be escaped by encodefunctions
> '''
> - winreserved = [ord(x) for x in '\\:*?"<>|']
> + winreserved = [ord(x) for x in u'\\:*?"<>|']
ord() accepts both unicode and bytes in Python 2 world. So its better
to prevent using pycompat.sysstr() here.
> for x in range(32):
> yield x
> for x in range(126, 256):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list