# HG changeset patch # User Boris Feld # Date 2017-10-13 21:00:31 # Node ID 44c4ed4ad0326c6a8ab09b7a27c40a45e67ec1f3 # Parent 60802bba1090637e13aba80c8cea7dcb68d86d16 configitems: move rebase config into core The shelve extensions import and call rebase content without loading the extension. This is problematic as the config items rebase uses are not declared and the default value are not set, etc... The shelve extension should be using core utilities only and the necessary bit should be moved from rebase into core. In the meantime, I'm taking a small step to get config registration completed with minimal overhead. The rebase extension is shipped with core so registering its config option within core is not a big issue. This is the last step needed before we can install a warning that enforces all config to be registered. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -73,20 +73,6 @@ command = registrar.command(cmdtable) # leave the attribute unspecified. testedwith = 'ships-with-hg-core' -configtable = {} -configitem = registrar.configitem(configtable) - -configitem('commands', 'rebase.requiredest', - default=False, -) - -configitem('experimental', 'rebaseskipobsolete', - default=True, -) -configitem('rebase', 'singletransaction', - default=False, -) - def _nothingtorebase(): return 1 diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -1085,3 +1085,16 @@ coreconfigitem('worker', 'backgroundclos coreconfigitem('worker', 'numcpus', default=None, ) + +# Rebase related configuration moved to core because other extension are doing +# strange things. For example, shelve import the extensions to reuse some bit +# without formally loading it. +coreconfigitem('commands', 'rebase.requiredest', + default=False, +) +coreconfigitem('experimental', 'rebaseskipobsolete', + default=True, +) +coreconfigitem('rebase', 'singletransaction', + default=False, +)