diff mercurial/extensions.py @ 34186:f7c9c5d8c7f4

extensions: factor extra data loading out Some of the extra data need to be registered earlier than they currently are (eg: config items). We first factor out the logic to registered them in a small function before reusing it in the next changeset.
author Boris Feld <boris.feld@octobus.net>
date Tue, 05 Sep 2017 00:31:59 +0200
parents 82bd4c5a81e5
children 4c5730c21523
line wrap: on
line diff
--- a/mercurial/extensions.py	Fri Jun 30 03:45:56 2017 +0200
+++ b/mercurial/extensions.py	Tue Sep 05 00:31:59 2017 +0200
@@ -288,7 +288,9 @@
         ('templatefunc', templater, 'loadfunction'),
         ('templatekeyword', templatekw, 'loadkeyword'),
     ]
+    _loadextra(ui, newindex, extraloaders)
 
+def _loadextra(ui, newindex, extraloaders):
     for name in _order[newindex:]:
         module = _extensions[name]
         if not module: