diff -r 632b92899203 -r 39e5e346eba7 mercurial/fancyopts.py --- a/mercurial/fancyopts.py Sat Apr 07 21:26:37 2018 +0900 +++ b/mercurial/fancyopts.py Sun Apr 08 15:41:40 2018 +0900 @@ -370,8 +370,8 @@ state[name] = boolval else: def abort(s): - raise error.Abort( - _('invalid value %r for option %s, %s') % (val, opt, s)) + raise error.Abort(_('invalid value %r for option %s, %s') + % (pycompat.maybebytestr(val), opt, s)) state[name] = defmap[name].newstate(state[name], val, abort) # return unparsed args