# HG changeset patch # User Yuya Nishihara # Date 1521720811 -32400 # Node ID 736024df4498ccd3421c4840ade8d8785a458a3b # Parent b3079fea38386e480eb35c82b8efbd7056089113 util: mark MBTextWrapper as private Makes porting slightly easier. diff -r b3079fea3838 -r 736024df4498 mercurial/util.py --- a/mercurial/util.py Thu Mar 22 21:10:42 2018 +0900 +++ b/mercurial/util.py Thu Mar 22 21:13:31 2018 +0900 @@ -2774,7 +2774,7 @@ return pycompat.byterepr(pycompat.bytestr(s)).replace(b'\\\\', b'\\') # delay import of textwrap -def MBTextWrapper(**kwargs): +def _MBTextWrapper(**kwargs): class tw(textwrap.TextWrapper): """ Extend TextWrapper for width-awareness. @@ -2873,8 +2873,8 @@ return lines - global MBTextWrapper - MBTextWrapper = tw + global _MBTextWrapper + _MBTextWrapper = tw return tw(**kwargs) def wrap(line, width, initindent='', hangindent=''): @@ -2888,9 +2888,9 @@ pycompat.sysstr(encoding.encodingmode)) hangindent = hangindent.decode(pycompat.sysstr(encoding.encoding), pycompat.sysstr(encoding.encodingmode)) - wrapper = MBTextWrapper(width=width, - initial_indent=initindent, - subsequent_indent=hangindent) + wrapper = _MBTextWrapper(width=width, + initial_indent=initindent, + subsequent_indent=hangindent) return wrapper.fill(line).encode(pycompat.sysstr(encoding.encoding)) if (pyplatform.python_implementation() == 'CPython' and