extensions: allow loading a whitelisted subset of extensions
This feature will be used by the next patch.
--- a/mercurial/extensions.py Mon May 22 08:49:34 2017 -0700
+++ b/mercurial/extensions.py Mon May 22 00:51:56 2017 -0700
@@ -179,8 +179,10 @@
raise
extsetup() # old extsetup with no ui argument
-def loadall(ui):
+def loadall(ui, whitelist=None):
result = ui.configitems("extensions")
+ if whitelist:
+ result = [(k, v) for (k, v) in result if k in whitelist]
newindex = len(_order)
for (name, path) in result:
if path: