This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit e8414bec authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

errors: raise InputError in fancyopts

If a value of wrong type is passed to a command line flag, that's
cleary an InputError.

Differential Revision:
parent de1f4c431619
......@@ -380,7 +380,7 @@ def fancyopts(args, options, state, gnu=False, early=False, optaliases=None):
def abort(s):
raise error.Abort(
raise error.InputError(
_(b'invalid value %r for option %s, %s')
% (pycompat.maybebytestr(val), opt, s)
......@@ -1036,7 +1036,7 @@ test -p0
adding a
$ hg import -p foo
abort: invalid value 'foo' for option -p, expected int
$ hg import -p0 - << EOF
> foobar
> --- a Sat Apr 12 22:43:58 2008 -0400
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment