Mercurial > public > mercurial-scm > hg
diff mercurial/extensions.py @ 33132:c467d13334ee
configitems: add an official API for extensions to register config item
Extensions can have a 'configtable' mapping and use
'registrar.configitem(table)' to retrieve the registration function.
This behave in the same way as the other way for extensions to register new
items (commands, colors, etc).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2017 13:48:20 +0200 |
parents | 45b0e9d05ee9 |
children | 68b7ceda99d7 |
line wrap: on
line diff
--- a/mercurial/extensions.py Sat Jun 17 13:38:53 2017 +0200 +++ b/mercurial/extensions.py Sat Jun 17 13:48:20 2017 +0200 @@ -18,6 +18,7 @@ from . import ( cmdutil, + configitems, encoding, error, pycompat, @@ -263,6 +264,7 @@ extraloaders = [ ('cmdtable', commands, 'loadcmdtable'), ('colortable', color, 'loadcolortable'), + ('configtable', configitems, 'loadconfigtable'), ('filesetpredicate', fileset, 'loadpredicate'), ('revsetpredicate', revset, 'loadpredicate'), ('templatefilter', templatefilters, 'loadfilter'),