mercurial/util.py
changeset 36266 1fa33bd848ee
parent 36235 d879aab17786
child 36362 01e29e885600
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         """