Mercurial > hg
comparison mercurial/dispatch.py @ 9993:8bce1e0d2801 stable
alias: do not crash when aliased command has no usage help text
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Thu, 03 Dec 2009 14:14:44 +0900 |
parents | 0d850f8beea6 |
children | 931d2c757627 25e572394f5c |
comparison
equal
deleted
inserted
replaced
9989:60cefb8b3c85 | 9993:8bce1e0d2801 |
---|---|
194 | 194 |
195 args = shlex.split(self.definition) | 195 args = shlex.split(self.definition) |
196 cmd = args.pop(0) | 196 cmd = args.pop(0) |
197 | 197 |
198 try: | 198 try: |
199 self.fn, self.opts, self.help = cmdutil.findcmd(cmd, cmdtable, False)[1] | 199 tableentry = cmdutil.findcmd(cmd, cmdtable, False)[1] |
200 if len(tableentry) > 2: | |
201 self.fn, self.opts, self.help = tableentry | |
202 else: | |
203 self.fn, self.opts = tableentry | |
204 | |
200 self.args = aliasargs(self.fn) + args | 205 self.args = aliasargs(self.fn) + args |
201 if cmd not in commands.norepo.split(' '): | 206 if cmd not in commands.norepo.split(' '): |
202 self.norepo = False | 207 self.norepo = False |
203 except error.UnknownCommand: | 208 except error.UnknownCommand: |
204 def fn(ui, *args): | 209 def fn(ui, *args): |