Re: [PATCH 1 of 4 python3] posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3

2017-09-16 Thread Yuya Nishihara
On Fri, 15 Sep 2017 20:34:03 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler 
> # Date 1505518982 14400
> #  Fri Sep 15 19:43:02 2017 -0400
> # Node ID 34469e4e2187381259d78ec0a35c2dd5b0e9e85a
> # Parent  d08554602cdbd245ddd213af325473da037a240f
> posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3

Queued, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 1 of 4 python3] posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3

2017-09-15 Thread Augie Fackler
# HG changeset patch
# User Augie Fackler 
# Date 1505518982 14400
#  Fri Sep 15 19:43:02 2017 -0400
# Node ID 34469e4e2187381259d78ec0a35c2dd5b0e9e85a
# Parent  d08554602cdbd245ddd213af325473da037a240f
posix: fix HFS+ normcase doctest to produce valid bytes literals in Python 3

We were previously getting lucky on Python 2.

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -344,11 +344,11 @@ if pycompat.sysplatform == 'darwin':
 
 >>> normcase(b'UPPER')
 'upper'
->>> normcase(b'Caf\xc3\xa9')
+>>> normcase(b'Caf\\xc3\\xa9')
 'cafe\\xcc\\x81'
->>> normcase(b'\xc3\x89')
+>>> normcase(b'\\xc3\\x89')
 'e\\xcc\\x81'
->>> normcase(b'\xb8\xca\xc3\xca\xbe\xc8.JPG') # issue3918
+>>> normcase(b'\\xb8\\xca\\xc3\\xca\\xbe\\xc8.JPG') # issue3918
 '%b8%ca%c3\\xca\\xbe%c8.jpg'
 '''
 
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel