# HG changeset patch # User Martin von Zweigbergk # Date 1606176303 28800 # Node ID be25b66f86abd5a27a9005da3e9e413ad820f3bb # Parent 9acbe30953e8491e951b10ed4f52232136d5dfc5 errors: raise InputError when too few arguments given to alias Differential Revision: https://phab.mercurial-scm.org/D9389 diff -r 9acbe30953e8 -r be25b66f86ab mercurial/dispatch.py --- a/mercurial/dispatch.py Tue Nov 17 16:32:03 2020 -0800 +++ b/mercurial/dispatch.py Mon Nov 23 16:05:03 2020 -0800 @@ -510,7 +510,7 @@ nums.append(num) if num < len(givenargs): return givenargs[num] - raise error.Abort(_(b'too few arguments for command alias')) + raise error.InputError(_(b'too few arguments for command alias')) cmd = re.sub(br'\$(\d+|\$)', replacer, cmd) givenargs = [x for i, x in enumerate(givenargs) if i not in nums] diff -r 9acbe30953e8 -r be25b66f86ab tests/test-alias.t --- a/tests/test-alias.t Tue Nov 17 16:32:03 2020 -0800 +++ b/tests/test-alias.t Mon Nov 23 16:05:03 2020 -0800 @@ -357,10 +357,10 @@ $ hg positional abort: too few arguments for command alias - [255] + [10] $ hg positional a abort: too few arguments for command alias - [255] + [10] $ hg positional 'node|short' rev 0 e63c23eaa88a | 1970-01-01 00:00 +0000