comparison mercurial/util.py @ 36266:1fa33bd848ee

py3: fix bytes-unicode dance while building docstring of extdiff
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Feb 2018 18:14:51 +0900
parents d879aab17786
children 01e29e885600
comparison
equal deleted inserted replaced
36265:b44fac3a49fb 36266:1fa33bd848ee
2425 # non-ascii string, may be lossy 2425 # non-ascii string, may be lossy
2426 return pycompat.bytestr(encoding.strtolocal(str(obj))) 2426 return pycompat.bytestr(encoding.strtolocal(str(obj)))
2427 2427
2428 def uirepr(s): 2428 def uirepr(s):
2429 # Avoid double backslash in Windows path repr() 2429 # Avoid double backslash in Windows path repr()
2430 return repr(s).replace('\\\\', '\\') 2430 return pycompat.byterepr(pycompat.bytestr(s)).replace(b'\\\\', b'\\')
2431 2431
2432 # delay import of textwrap 2432 # delay import of textwrap
2433 def MBTextWrapper(**kwargs): 2433 def MBTextWrapper(**kwargs):
2434 class tw(textwrap.TextWrapper): 2434 class tw(textwrap.TextWrapper):
2435 """ 2435 """