Mercurial > hg-stable
changeset 41842:82d9728ace95
global: use raw string for setlocale() argument
Otherwise Python 2 will coerce a unicode to str, which fails
on HGUNICODEPEDANTRY=1.
Differential Revision: https://phab.mercurial-scm.org/D6052
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 02 Mar 2019 13:15:53 -0800 |
parents | 25694a78e4a4 |
children | dcbb1b4dc93a |
files | hgext/histedit.py mercurial/crecord.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Sat Mar 02 13:07:58 2019 -0800 +++ b/hgext/histedit.py Sat Mar 02 13:15:53 2019 -0800 @@ -953,7 +953,7 @@ # locale. This sets the locale to the user's default system # locale. import locale - locale.setlocale(locale.LC_ALL, u'') + locale.setlocale(locale.LC_ALL, r'') except ImportError: curses = None
--- a/mercurial/crecord.py Sat Mar 02 13:07:58 2019 -0800 +++ b/mercurial/crecord.py Sat Mar 02 13:15:53 2019 -0800 @@ -30,7 +30,7 @@ # This is required for ncurses to display non-ASCII characters in default user # locale encoding correctly. --immerrr -locale.setlocale(locale.LC_ALL, u'') +locale.setlocale(locale.LC_ALL, r'') # patch comments based on the git one diffhelptext = _("""# To remove '-' lines, make them ' ' lines (context).