mercurial/dispatch.py
changeset 33052 45b0e9d05ee9
parent 32788 eede022fc142
child 33053 ef46d432e2e4
--- a/mercurial/dispatch.py	Sat Jun 24 23:09:21 2017 -0400
+++ b/mercurial/dispatch.py	Sat Jun 24 02:39:20 2017 +0900
@@ -30,17 +30,12 @@
     error,
     extensions,
     fancyopts,
-    fileset,
     help,
     hg,
     hook,
     profiling,
     pycompat,
-    revset,
     scmutil,
-    templatefilters,
-    templatekw,
-    templater,
     ui as uimod,
     util,
 )
@@ -727,22 +722,6 @@
 
 _loaded = set()
 
-# list of (objname, loadermod, loadername) tuple:
-# - objname is the name of an object in extension module, from which
-#   extra information is loaded
-# - loadermod is the module where loader is placed
-# - loadername is the name of the function, which takes (ui, extensionname,
-#   extraobj) arguments
-extraloaders = [
-    ('cmdtable', commands, 'loadcmdtable'),
-    ('colortable', color, 'loadcolortable'),
-    ('filesetpredicate', fileset, 'loadpredicate'),
-    ('revsetpredicate', revset, 'loadpredicate'),
-    ('templatefilter', templatefilters, 'loadfilter'),
-    ('templatefunc', templater, 'loadfunction'),
-    ('templatekeyword', templatekw, 'loadkeyword'),
-]
-
 def _dispatch(req):
     args = req.args
     ui = req.ui
@@ -770,19 +749,11 @@
         # reposetup. Programs like TortoiseHg will call _dispatch several
         # times so we keep track of configured extensions in _loaded.
         extensions.loadall(lui)
-        exts = [ext for ext in extensions.extensions() if ext[0] not in _loaded]
         # Propagate any changes to lui.__class__ by extensions
         ui.__class__ = lui.__class__
 
         # (uisetup and extsetup are handled in extensions.loadall)
 
-        for name, module in exts:
-            for objname, loadermod, loadername in extraloaders:
-                extraobj = getattr(module, objname, None)
-                if extraobj is not None:
-                    getattr(loadermod, loadername)(ui, name, extraobj)
-            _loaded.add(name)
-
         # (reposetup is handled in hg.repository)
 
         addaliases(lui, commands.table)