Mercurial > hg
comparison hgext/alias.py @ 5178:18a9fbb5cd78
dispatch: move command dispatching into its own module
- move command dispatching functions from commands and cmdutil to dispatch
- change findcmd to take a table argument
- remove circular import of commands in cmdutil
- privatize helper functions in dispatch
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 15 Aug 2007 16:55:13 -0500 |
parents | a28661788f2f |
children | f7d545a866e8 |
comparison
equal
deleted
inserted
replaced
5177:92236732d5a1 | 5178:18a9fbb5cd78 |
---|---|
40 def _resolve(self): | 40 def _resolve(self): |
41 if self._cmd is not None: | 41 if self._cmd is not None: |
42 return | 42 return |
43 | 43 |
44 try: | 44 try: |
45 self._cmd = findcmd(self._ui, self._target)[1] | 45 self._cmd = findcmd(self._ui, self._target, commands.table)[1] |
46 if self._cmd == self: | 46 if self._cmd == self: |
47 raise RecursiveCommand() | 47 raise RecursiveCommand() |
48 if self._target in commands.norepo.split(' '): | 48 if self._target in commands.norepo.split(' '): |
49 commands.norepo += ' %s' % self._name | 49 commands.norepo += ' %s' % self._name |
50 return | 50 return |