comparison mercurial/cmdutil.py @ 27531:84d686cb62c4 stable

cmdutil: use crecordmod.checkcurses Instead of blindly trusting the user's experimental.crecord, we use checkcurses to abstract that logic so that we can handle the case where python was not built with curses.
author Sean Farley <sean@farley.io>
date Tue, 15 Dec 2015 16:01:45 -0800
parents d9e3ebe56970
children a801d331a022
comparison
equal deleted inserted replaced
27530:ba30ef5bba95 27531:84d686cb62c4
64 selected hunks. 64 selected hunks.
65 *operation* is used for ui purposes to indicate the user 65 *operation* is used for ui purposes to indicate the user
66 what kind of filtering they are doing: reverting, committing, shelving, etc. 66 what kind of filtering they are doing: reverting, committing, shelving, etc.
67 *operation* has to be a translated string. 67 *operation* has to be a translated string.
68 """ 68 """
69 usecurses = ui.configbool('experimental', 'crecord', False) 69 usecurses = crecordmod.checkcurses(ui)
70 testfile = ui.config('experimental', 'crecordtest', None) 70 testfile = ui.config('experimental', 'crecordtest', None)
71 oldwrite = setupwrapcolorwrite(ui) 71 oldwrite = setupwrapcolorwrite(ui)
72 try: 72 try:
73 newchunks = filterchunks(ui, originalhunks, usecurses, testfile, 73 newchunks = filterchunks(ui, originalhunks, usecurses, testfile,
74 operation) 74 operation)