show: move configitems to core
authorJun Wu <quark@fb.com>
Wed, 18 Oct 2017 15:05:03 -0700
changeset 34888 317566f0c2e6
parent 34887 7bf7544fd6cc
child 34889 554885e10868
show: move configitems to core chgserver.py is also checking the config and will get: devel-warn: accessing unregistered config item: 'commands.show.aliasprefix' at: mercurial/chgserver.py:109 if the config is not registered. Differential Revision: https://phab.mercurial-scm.org/D1178
hgext/show.py
mercurial/configitems.py
--- a/hgext/show.py	Wed Oct 18 14:55:39 2017 -0700
+++ b/hgext/show.py	Wed Oct 18 15:05:03 2017 -0700
@@ -52,12 +52,6 @@
 cmdtable = {}
 command = registrar.command(cmdtable)
 
-configtable = {}
-configitem = registrar.configitem(configtable)
-configitem('commands', 'show.aliasprefix',
-    default=list,
-)
-
 revsetpredicate = registrar.revsetpredicate()
 
 class showcmdfunc(registrar._funcregistrarbase):
--- a/mercurial/configitems.py	Wed Oct 18 14:55:39 2017 -0700
+++ b/mercurial/configitems.py	Wed Oct 18 15:05:03 2017 -0700
@@ -181,6 +181,9 @@
 coreconfigitem('color', 'pagermode',
     default=dynamicdefault,
 )
+coreconfigitem('commands', 'show.aliasprefix',
+    default=list,
+)
 coreconfigitem('commands', 'status.relative',
     default=False,
 )