##// END OF EJS Templates
errors: raise InputError when too few arguments given to alias...
Martin von Zweigbergk -
r46526:be25b66f default
parent child Browse files
Show More
@@ -510,7 +510,7 b' def aliasargs(fn, givenargs):'
510 nums.append(num)
510 nums.append(num)
511 if num < len(givenargs):
511 if num < len(givenargs):
512 return givenargs[num]
512 return givenargs[num]
513 raise error.Abort(_(b'too few arguments for command alias'))
513 raise error.InputError(_(b'too few arguments for command alias'))
514
514
515 cmd = re.sub(br'\$(\d+|\$)', replacer, cmd)
515 cmd = re.sub(br'\$(\d+|\$)', replacer, cmd)
516 givenargs = [x for i, x in enumerate(givenargs) if i not in nums]
516 givenargs = [x for i, x in enumerate(givenargs) if i not in nums]
@@ -357,10 +357,10 b' positional arguments'
357
357
358 $ hg positional
358 $ hg positional
359 abort: too few arguments for command alias
359 abort: too few arguments for command alias
360 [255]
360 [10]
361 $ hg positional a
361 $ hg positional a
362 abort: too few arguments for command alias
362 abort: too few arguments for command alias
363 [255]
363 [10]
364 $ hg positional 'node|short' rev
364 $ hg positional 'node|short' rev
365 0 e63c23eaa88a | 1970-01-01 00:00 +0000
365 0 e63c23eaa88a | 1970-01-01 00:00 +0000
366
366
General Comments 0
You need to be logged in to leave comments. Login now