equal
deleted
inserted
replaced
199 except ImportError: |
199 except ImportError: |
200 fcntl = None |
200 fcntl = None |
201 termios = None |
201 termios = None |
202 |
202 |
203 import functools |
203 import functools |
204 import locale |
|
205 import os |
204 import os |
206 import struct |
205 import struct |
207 |
206 |
208 from mercurial.i18n import _ |
207 from mercurial.i18n import _ |
209 from mercurial.pycompat import ( |
208 from mercurial.pycompat import ( |
1709 ) |
1708 ) |
1710 |
1709 |
1711 ctxs = [] |
1710 ctxs = [] |
1712 for i, r in enumerate(revs): |
1711 for i, r in enumerate(revs): |
1713 ctxs.append(histeditrule(ui, repo[r], i)) |
1712 ctxs.append(histeditrule(ui, repo[r], i)) |
1714 # Curses requires setting the locale or it will default to the C |
1713 with util.with_lc_ctype(): |
1715 # locale. This sets the locale to the user's default system |
1714 rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs)) |
1716 # locale. |
|
1717 locale.setlocale(locale.LC_ALL, '') |
|
1718 rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs)) |
|
1719 curses.echo() |
1715 curses.echo() |
1720 curses.endwin() |
1716 curses.endwin() |
1721 if rc is False: |
1717 if rc is False: |
1722 ui.write(_(b"histedit aborted\n")) |
1718 ui.write(_(b"histedit aborted\n")) |
1723 return 0 |
1719 return 0 |