Mercurial > hg
comparison hgext/histedit.py @ 41837: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 | aaad36b88298 |
children | 550a172a603b |
comparison
equal
deleted
inserted
replaced
41836:25694a78e4a4 | 41837:82d9728ace95 |
---|---|
951 | 951 |
952 # Curses requires setting the locale or it will default to the C | 952 # Curses requires setting the locale or it will default to the C |
953 # locale. This sets the locale to the user's default system | 953 # locale. This sets the locale to the user's default system |
954 # locale. | 954 # locale. |
955 import locale | 955 import locale |
956 locale.setlocale(locale.LC_ALL, u'') | 956 locale.setlocale(locale.LC_ALL, r'') |
957 except ImportError: | 957 except ImportError: |
958 curses = None | 958 curses = None |
959 | 959 |
960 KEY_LIST = ['pick', 'edit', 'fold', 'drop', 'mess', 'roll'] | 960 KEY_LIST = ['pick', 'edit', 'fold', 'drop', 'mess', 'roll'] |
961 ACTION_LABELS = { | 961 ACTION_LABELS = { |