Mercurial > hg
comparison hgext/histedit.py @ 41729:4d5f48782921
chistedit: ensure a locale is set
My paternal surname was showing incorrectly without this fix.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 15 Feb 2019 14:56:07 -0500 |
parents | a22321f2b1ee |
children | aaad36b88298 |
comparison
equal
deleted
inserted
replaced
41728:36b62a522814 | 41729:4d5f48782921 |
---|---|
946 return repo[roots[0]].node() | 946 return repo[roots[0]].node() |
947 | 947 |
948 # Curses Support | 948 # Curses Support |
949 try: | 949 try: |
950 import curses | 950 import curses |
951 | |
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 | |
954 # locale. | |
955 import locale | |
956 locale.setlocale(locale.LC_ALL, u'') | |
951 except ImportError: | 957 except ImportError: |
952 curses = None | 958 curses = None |
953 | 959 |
954 KEY_LIST = ['pick', 'edit', 'fold', 'drop', 'mess', 'roll'] | 960 KEY_LIST = ['pick', 'edit', 'fold', 'drop', 'mess', 'roll'] |
955 ACTION_LABELS = { | 961 ACTION_LABELS = { |