comparison mercurial/dispatch.py @ 30917:b35e05103641

dispatch: load debugcommand before extension Multiple extension will manipulate commands on load, we need the debug command to be loaded before that point.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 13 Feb 2017 16:35:49 +0100
parents caf7e1c5efe4
children 69a3c6c8bf95
comparison
equal deleted inserted replaced
30916:455677a7667f 30917:b35e05103641
653 os.chdir(cwd[-1]) 653 os.chdir(cwd[-1])
654 654
655 rpath = _earlygetopt(["-R", "--repository", "--repo"], args) 655 rpath = _earlygetopt(["-R", "--repository", "--repo"], args)
656 path, lui = _getlocal(ui, rpath) 656 path, lui = _getlocal(ui, rpath)
657 657
658 # Side-effect of accessing is debugcommands module is guaranteed to be
659 # imported and commands.table is populated.
660 debugcommands.command
661
658 # Configure extensions in phases: uisetup, extsetup, cmdtable, and 662 # Configure extensions in phases: uisetup, extsetup, cmdtable, and
659 # reposetup. Programs like TortoiseHg will call _dispatch several 663 # reposetup. Programs like TortoiseHg will call _dispatch several
660 # times so we keep track of configured extensions in _loaded. 664 # times so we keep track of configured extensions in _loaded.
661 extensions.loadall(lui) 665 extensions.loadall(lui)
662 exts = [ext for ext in extensions.extensions() if ext[0] not in _loaded] 666 exts = [ext for ext in extensions.extensions() if ext[0] not in _loaded]
671 if extraobj is not None: 675 if extraobj is not None:
672 getattr(loadermod, loadername)(ui, name, extraobj) 676 getattr(loadermod, loadername)(ui, name, extraobj)
673 _loaded.add(name) 677 _loaded.add(name)
674 678
675 # (reposetup is handled in hg.repository) 679 # (reposetup is handled in hg.repository)
676
677 # Side-effect of accessing is debugcommands module is guaranteed to be
678 # imported and commands.table is populated.
679 debugcommands.command
680 680
681 addaliases(lui, commands.table) 681 addaliases(lui, commands.table)
682 682
683 # All aliases and commands are completely defined, now. 683 # All aliases and commands are completely defined, now.
684 # Check abbreviation/ambiguity of shell alias. 684 # Check abbreviation/ambiguity of shell alias.