Mercurial > hg-stable
changeset 34831:44c4ed4ad032
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.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 13 Oct 2017 23:00:31 +0200 |
parents | 60802bba1090 |
children | d6009d1488e8 |
files | hgext/rebase.py mercurial/configitems.py |
diffstat | 2 files changed, 13 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Oct 14 01:09:46 2017 +0200 +++ b/hgext/rebase.py Fri Oct 13 23:00:31 2017 +0200 @@ -73,20 +73,6 @@ # 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
--- a/mercurial/configitems.py Sat Oct 14 01:09:46 2017 +0200 +++ b/mercurial/configitems.py Fri Oct 13 23:00:31 2017 +0200 @@ -1085,3 +1085,16 @@ 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, +)