mercurial/dispatch.py
changeset 33053 ef46d432e2e4
parent 33052 45b0e9d05ee9
child 33499 0407a51b9d8c
equal deleted inserted replaced
33052:45b0e9d05ee9 33053:ef46d432e2e4
   718     if cmd and util.safehasattr(fn, 'shell'):
   718     if cmd and util.safehasattr(fn, 'shell'):
   719         d = lambda: fn(ui, *args[1:])
   719         d = lambda: fn(ui, *args[1:])
   720         return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d,
   720         return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d,
   721                                   [], {})
   721                                   [], {})
   722 
   722 
   723 _loaded = set()
       
   724 
       
   725 def _dispatch(req):
   723 def _dispatch(req):
   726     args = req.args
   724     args = req.args
   727     ui = req.ui
   725     ui = req.ui
   728 
   726 
   729     # check for cwd
   727     # check for cwd
   744             ui_.setconfig('profiling', 'enabled', 'true', '--profile')
   742             ui_.setconfig('profiling', 'enabled', 'true', '--profile')
   745 
   743 
   746     profile = lui.configbool('profiling', 'enabled')
   744     profile = lui.configbool('profiling', 'enabled')
   747     with profiling.profile(lui, enabled=profile) as profiler:
   745     with profiling.profile(lui, enabled=profile) as profiler:
   748         # Configure extensions in phases: uisetup, extsetup, cmdtable, and
   746         # Configure extensions in phases: uisetup, extsetup, cmdtable, and
   749         # reposetup. Programs like TortoiseHg will call _dispatch several
   747         # reposetup
   750         # times so we keep track of configured extensions in _loaded.
       
   751         extensions.loadall(lui)
   748         extensions.loadall(lui)
   752         # Propagate any changes to lui.__class__ by extensions
   749         # Propagate any changes to lui.__class__ by extensions
   753         ui.__class__ = lui.__class__
   750         ui.__class__ = lui.__class__
   754 
   751 
   755         # (uisetup and extsetup are handled in extensions.loadall)
   752         # (uisetup and extsetup are handled in extensions.loadall)