mercurial/dispatch.py
changeset 14886 9a3831d64ae2
parent 14866 ad6a58581ecd
child 14887 d6ba373c9a8f
equal deleted inserted replaced
14885:50b67d5c4073 14886:9a3831d64ae2
   524 _loaded = set()
   524 _loaded = set()
   525 def _dispatch(req):
   525 def _dispatch(req):
   526     args = req.args
   526     args = req.args
   527     ui = req.ui
   527     ui = req.ui
   528 
   528 
   529     shellaliasfn = _checkshellalias(ui, args)
       
   530     if shellaliasfn:
       
   531         return shellaliasfn()
       
   532 
       
   533     # read --config before doing anything else
   529     # read --config before doing anything else
   534     # (e.g. to change trust settings for reading .hg/hgrc)
   530     # (e.g. to change trust settings for reading .hg/hgrc)
   535     cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
   531     cfgs = _parseconfig(ui, _earlygetopt(['--config'], args))
   536 
   532 
   537     # check for cwd
   533     # check for cwd
   539     if cwd:
   535     if cwd:
   540         os.chdir(cwd[-1])
   536         os.chdir(cwd[-1])
   541 
   537 
   542     rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
   538     rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
   543     path, lui = _getlocal(ui, rpath)
   539     path, lui = _getlocal(ui, rpath)
       
   540 
       
   541     # Now that we're operating in the right directory/repository with
       
   542     # the right config settings, check for shell aliases
       
   543     shellaliasfn = _checkshellalias(ui, args)
       
   544     if shellaliasfn:
       
   545         return shellaliasfn()
   544 
   546 
   545     # Configure extensions in phases: uisetup, extsetup, cmdtable, and
   547     # Configure extensions in phases: uisetup, extsetup, cmdtable, and
   546     # reposetup. Programs like TortoiseHg will call _dispatch several
   548     # reposetup. Programs like TortoiseHg will call _dispatch several
   547     # times so we keep track of configured extensions in _loaded.
   549     # times so we keep track of configured extensions in _loaded.
   548     extensions.loadall(lui)
   550     extensions.loadall(lui)