equal
deleted
inserted
replaced
8 # This code is based on the Mark Edgington's crecord extension. |
8 # This code is based on the Mark Edgington's crecord extension. |
9 # (Itself based on Bryan O'Sullivan's record extension.) |
9 # (Itself based on Bryan O'Sullivan's record extension.) |
10 |
10 |
11 from __future__ import absolute_import |
11 from __future__ import absolute_import |
12 |
12 |
|
13 import locale |
13 import os |
14 import os |
14 import re |
15 import re |
15 import signal |
16 import signal |
16 |
17 |
17 from .i18n import _ |
18 from .i18n import _ |
563 curses interface to get selection of chunks, and mark the applied flags |
564 curses interface to get selection of chunks, and mark the applied flags |
564 of the chosen chunks. |
565 of the chosen chunks. |
565 """ |
566 """ |
566 ui.write(_(b'starting interactive selection\n')) |
567 ui.write(_(b'starting interactive selection\n')) |
567 chunkselector = curseschunkselector(headerlist, ui, operation) |
568 chunkselector = curseschunkselector(headerlist, ui, operation) |
|
569 # This is required for ncurses to display non-ASCII characters in |
|
570 # default user locale encoding correctly. --immerrr |
|
571 locale.setlocale(locale.LC_ALL, '') |
568 origsigtstp = sentinel = object() |
572 origsigtstp = sentinel = object() |
569 if util.safehasattr(signal, b'SIGTSTP'): |
573 if util.safehasattr(signal, b'SIGTSTP'): |
570 origsigtstp = signal.getsignal(signal.SIGTSTP) |
574 origsigtstp = signal.getsignal(signal.SIGTSTP) |
571 try: |
575 try: |
572 curses.wrapper(chunkselector.main) |
576 curses.wrapper(chunkselector.main) |