crecord: use ui.interface to choose curses interface
authorSimon Farnsworth <simonfar@fb.com>
Mon, 14 Mar 2016 15:01:27 +0000
changeset 28543 f7874de435c5
parent 28542 71e12fc53b80
child 28544 4d93d73b8aec
crecord: use ui.interface to choose curses interface use ui.interface to select curses mode, instead of experimental.crecord
mercurial/crecord.py
tests/test-commit-interactive-curses.t
--- a/mercurial/crecord.py	Mon Mar 14 15:01:27 2016 +0000
+++ b/mercurial/crecord.py	Mon Mar 14 15:01:27 2016 +0000
@@ -54,7 +54,7 @@
     This method returns True if curses is found (and that python is built with
     it) and that the user has the correct flag for the ui.
     """
-    return curses and ui.configbool('experimental', 'crecord', False)
+    return curses and ui.interface("chunkselector") == "curses"
 
 _origstdout = sys.__stdout__ # used by gethw()
 
--- a/tests/test-commit-interactive-curses.t	Mon Mar 14 15:01:27 2016 +0000
+++ b/tests/test-commit-interactive-curses.t	Mon Mar 14 15:01:27 2016 +0000
@@ -4,8 +4,8 @@
   $ cat <<EOF >> $HGRCPATH
   > [ui]
   > interactive = true
+  > interface = curses
   > [experimental]
-  > crecord = true
   > crecordtest = testModeCommands
   > EOF