hgext/win32text.py
changeset 34185 f84358f75978
parent 31337 ec7831675867
child 35675 01496e9269f9
--- a/hgext/win32text.py	Fri Jun 30 03:43:17 2017 +0200
+++ b/hgext/win32text.py	Fri Jun 30 03:45:56 2017 +0200
@@ -49,6 +49,7 @@
     short,
 )
 from mercurial import (
+    registrar,
     util,
 )
 
@@ -58,6 +59,13 @@
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+configitem('win32text', 'warn',
+    default=True,
+)
+
 # regexp for single LF without CR preceding.
 re_single_lf = re.compile('(^|[^\r])\n', re.MULTILINE)
 
@@ -178,6 +186,6 @@
 
 def extsetup(ui):
     # deprecated config: win32text.warn
-    if ui.configbool('win32text', 'warn', True):
+    if ui.configbool('win32text', 'warn'):
         ui.warn(_("win32text is deprecated: "
                   "https://mercurial-scm.org/wiki/Win32TextExtension\n"))