Patchwork D1178: show: move configitems to core

login
register
mail settings
Submitter phabricator
Date Oct. 18, 2017, 10:08 p.m.
Message ID <differential-rev-PHID-DREV-ocweqlaustihcpcuxsdb-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25214/
State Superseded
Headers show

Comments

phabricator - Oct. 18, 2017, 10:08 p.m.
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  chgserver.py is also checking the config and will get:
  
    devel-warn: accessing unregistered config item:
    'commands.show.aliasprefix' at:
    /home/quark/hg-committed/mercurial/chgserver.py:109
  
  if the config is not registered.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1178

AFFECTED FILES
  hgext/show.py
  mercurial/configitems.py

CHANGE DETAILS




To: quark, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -170,6 +170,9 @@ 
 coreconfigitem('color', 'pagermode',
     default=dynamicdefault,
 )
+coreconfigitem('commands', 'show.aliasprefix',
+    default=list,
+)
 coreconfigitem('commands', 'status.relative',
     default=False,
 )
diff --git a/hgext/show.py b/hgext/show.py
--- a/hgext/show.py
+++ b/hgext/show.py
@@ -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):