Mercurial > evolve
changeset 3081:25a6a2520255
directaccess: register config item if possible
Mercurial 4.4 warns about unregistered config.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Oct 2017 18:17:47 +0200 |
parents | 461c9d940519 |
children | 326e0ee1eed1 |
files | hgext3rd/evolve/hack/directaccess.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/hack/directaccess.py Thu Oct 19 14:46:06 2017 +0200 +++ b/hgext3rd/evolve/hack/directaccess.py Thu Oct 19 18:17:47 2017 +0200 @@ -24,6 +24,14 @@ from mercurial import cmdutil command = cmdutil.command(cmdtable) +if util.safehasattr(registrar, 'configitem'): + configtable = {} + configitem = registrar.configitem(configtable) + + configitem('directaccess', 'loadsafter', + default=[], + ) + # By default, all the commands have directaccess with warnings # List of commands that have no directaccess and directaccess with no warning directaccesslevel = [