41 def _resolve(self): |
40 def _resolve(self): |
42 if self._cmd is not None: |
41 if self._cmd is not None: |
43 return |
42 return |
44 |
43 |
45 try: |
44 try: |
46 self._cmd = findcmd(self._target, commands.table, False)[1] |
45 self._cmd = cmdutil.findcmd(self._target, commands.table, False)[1] |
47 if self._cmd == self: |
46 if self._cmd == self: |
48 raise RecursiveCommand() |
47 raise RecursiveCommand() |
49 if self._target in commands.norepo.split(' '): |
48 if self._target in commands.norepo.split(' '): |
50 commands.norepo += ' %s' % self._name |
49 commands.norepo += ' %s' % self._name |
51 return |
50 return |
52 except UnknownCommand: |
51 except error.UnknownCommand: |
53 msg = _('*** [alias] %s: command %s is unknown') % \ |
52 msg = _('*** [alias] %s: command %s is unknown') % \ |
54 (self._name, self._target) |
53 (self._name, self._target) |
55 except AmbiguousCommand: |
54 except error.AmbiguousCommand: |
56 msg = _('*** [alias] %s: command %s is ambiguous') % \ |
55 msg = _('*** [alias] %s: command %s is ambiguous') % \ |
57 (self._name, self._target) |
56 (self._name, self._target) |
58 except RecursiveCommand: |
57 except RecursiveCommand: |
59 msg = _('*** [alias] %s: circular dependency on %s') % \ |
58 msg = _('*** [alias] %s: circular dependency on %s') % \ |
60 (self._name, self._target) |
59 (self._name, self._target) |