[PATCH 2 of 2 V5] crecord: use ui.interface to choose curses interface

Simon Farnsworth simonfar at fb.com
Mon Mar 14 11:47:16 EDT 2016


# HG changeset patch
# User Simon Farnsworth <simonfar at fb.com>
# Date 1457967687 0
#      Mon Mar 14 15:01:27 2016 +0000
# Node ID fd3e7cc9b7bde8bff64e5f446362fd7970af63c7
# Parent  5302c318da91dfa7185389cf2e8e3f0685237030
crecord: use ui.interface to choose curses interface

use ui.interface to select curses mode, instead of experimental.crecord

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -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()
 
diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t
--- a/tests/test-commit-interactive-curses.t
+++ b/tests/test-commit-interactive-curses.t
@@ -4,8 +4,8 @@
   $ cat <<EOF >> $HGRCPATH
   > [ui]
   > interactive = true
+  > interface = curses
   > [experimental]
-  > crecord = true
   > crecordtest = testModeCommands
   > EOF
 


More information about the Mercurial-devel mailing list