Mercurial > public > mercurial-scm > hg-stable
diff mercurial/encoding.py @ 34223:1c601df9894c
py3: wrap bytes in encoding.from/toutf8b() with bytestr
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 15:54:29 +0900 |
parents | 112f118ecb00 |
children | aa877860d4d7 |
line wrap: on
line diff
--- a/mercurial/encoding.py Sun Sep 03 17:28:47 2017 +0900 +++ b/mercurial/encoding.py Sun Sep 03 15:54:29 2017 +0900 @@ -508,6 +508,7 @@ except UnicodeDecodeError: pass + s = pycompat.bytestr(s) r = "" pos = 0 l = len(s) @@ -560,6 +561,7 @@ # points to be escaped. Instead, we use our handy getutf8char # helper again to walk the string without "decoding" it. + s = pycompat.bytestr(s) r = "" pos = 0 l = len(s)