# HG changeset patch # User Augie Fackler # Date 1505519045 14400 # Node ID 310c151a07055a0d209bb7b63c241fa3cb2af808 # Parent 112f118ecb00c9ba265ecceac22c17a0d23b537b posix: use slicing to grab a single byte out of a bytes in HFS+ normcase code diff -r 112f118ecb00 -r 310c151a0705 mercurial/posix.py --- a/mercurial/posix.py Fri Sep 15 19:43:32 2017 -0400 +++ b/mercurial/posix.py Fri Sep 15 19:44:05 2017 -0400 @@ -372,7 +372,7 @@ c = encoding.getutf8char(path, pos) pos += len(c) except ValueError: - c = '%%%02X' % ord(path[pos]) + c = '%%%02X' % ord(path[pos:pos + 1]) pos += 1 s += c