Mercurial > hg
changeset 48358:c6d44457f7e3
extensions: ignore "sub-options" when looking for extensions
config suboptions are separated by ":" (see the path one for example). So we
dont want to confuse these config with actual extensions.
We don't have extensions sub option yet, but I am about to introduce one for
making sure an extensions can load. So lets level the floor first.
Differential Revision: https://phab.mercurial-scm.org/D11819
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 26 Nov 2021 16:51:58 +0100 |
parents | fc1ba19ec4a0 |
children | e4e2ce328599 |
files | mercurial/configitems.py mercurial/extensions.py |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py Tue Nov 23 17:52:38 2021 -0800 +++ b/mercurial/configitems.py Fri Nov 26 16:51:58 2021 +0100 @@ -1281,7 +1281,7 @@ ) coreconfigitem( b'extensions', - b'.*', + b'[^:]*', default=None, generic=True, )
--- a/mercurial/extensions.py Tue Nov 23 17:52:38 2021 -0800 +++ b/mercurial/extensions.py Fri Nov 26 16:51:58 2021 +0100 @@ -282,6 +282,7 @@ result = ui.configitems(b"extensions") if whitelist is not None: result = [(k, v) for (k, v) in result if k in whitelist] + result = [(k, v) for (k, v) in result if b':' not in k] newindex = len(_order) ui.log( b'extension',