##// END OF EJS Templates
alias: do not crash when aliased command has no usage help text
Nicolas Dumazet -
r9993:8bce1e0d stable
parent child Browse files
Show More
@@ -196,7 +196,12 b' class cmdalias(object):'
196 196 cmd = args.pop(0)
197 197
198 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 205 self.args = aliasargs(self.fn) + args
201 206 if cmd not in commands.norepo.split(' '):
202 207 self.norepo = False
@@ -12,6 +12,7 b' mylog = log'
12 12 lognull = log -r null
13 13 shortlog = log --template '{rev} {node|short} | {date|isodate}\n'
14 14 dln = lognull --debug
15 nousage = rollback
15 16
16 17 [defaults]
17 18 mylog = -q
@@ -35,6 +36,10 b" echo '% no definition'"
35 36 hg nodef
36 37
37 38 cd alias
39
40 echo '% no usage'
41 hg nousage
42
38 43 echo foo > foo
39 44 hg ci -Amfoo
40 45
@@ -7,6 +7,8 b" alias 'ambiguous' resolves to ambiguous "
7 7 alias 'recursive' resolves to unknown command 'recursive'
8 8 % no definition
9 9 no definition for alias 'nodefinition'
10 % no usage
11 no rollback information available
10 12 adding foo
11 13 % with opts
12 14 C foo
General Comments 0
You need to be logged in to leave comments. Login now