--- a/hgext/histedit.py Sun Jun 28 17:52:29 2020 +0200
+++ b/hgext/histedit.py Mon Jun 29 20:53:32 2020 +0900
@@ -201,7 +201,6 @@
termios = None
import functools
-import locale
import os
import struct
@@ -1711,11 +1710,8 @@
ctxs = []
for i, r in enumerate(revs):
ctxs.append(histeditrule(ui, repo[r], i))
- # Curses requires setting the locale or it will default to the C
- # locale. This sets the locale to the user's default system
- # locale.
- locale.setlocale(locale.LC_ALL, '')
- rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs))
+ with util.with_lc_ctype():
+ rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs))
curses.echo()
curses.endwin()
if rc is False: