Mercurial > hg
comparison hgext/histedit.py @ 45017:a65c60f3280e
curses: back out d2227d4c9e6b (do not initialize LC_ALL to user settings)
The changeset was based on a25343d16ebe, which will be backed out, too.
Another fix for the problem will be resubmitted to the stable branch.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Sun, 28 Jun 2020 17:49:14 +0200 |
parents | d2227d4c9e6b |
children | 4a503c1b664a |
comparison
equal
deleted
inserted
replaced
45016:752da6863e39 | 45017:a65c60f3280e |
---|---|
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 | |
204 import os | 205 import os |
205 import struct | 206 import struct |
206 | 207 |
207 from mercurial.i18n import _ | 208 from mercurial.i18n import _ |
208 from mercurial.pycompat import ( | 209 from mercurial.pycompat import ( |
1708 ) | 1709 ) |
1709 | 1710 |
1710 ctxs = [] | 1711 ctxs = [] |
1711 for i, r in enumerate(revs): | 1712 for i, r in enumerate(revs): |
1712 ctxs.append(histeditrule(ui, repo[r], i)) | 1713 ctxs.append(histeditrule(ui, repo[r], i)) |
1714 # Curses requires setting the locale or it will default to the C | |
1715 # locale. This sets the locale to the user's default system | |
1716 # locale. | |
1717 locale.setlocale(locale.LC_ALL, '') | |
1713 rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs)) | 1718 rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs)) |
1714 curses.echo() | 1719 curses.echo() |
1715 curses.endwin() | 1720 curses.endwin() |
1716 if rc is False: | 1721 if rc is False: |
1717 ui.write(_(b"histedit aborted\n")) | 1722 ui.write(_(b"histedit aborted\n")) |