Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 45929:be25b66f86ab
errors: raise InputError when too few arguments given to alias
Differential Revision: https://phab.mercurial-scm.org/D9389
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 23 Nov 2020 16:05:03 -0800 |
parents | 35ab6e39f482 |
children | ac565222b9f8 |
line wrap: on
line diff
--- 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]