[PATCH 1 of 7] py3: drop b'' from error message of fancyopts
Yuya Nishihara
yuya at tcha.org
Sun Apr 8 09:09:44 UTC 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1523169700 -32400
# Sun Apr 08 15:41:40 2018 +0900
# Node ID 76e926434da64ea97ab0ef540e4a71c6490aee7d
# Parent d06df110b5f0ac978f800e1ade62c0a4642f08a0
py3: drop b'' from error message of fancyopts
diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py
--- a/mercurial/fancyopts.py
+++ b/mercurial/fancyopts.py
@@ -370,8 +370,8 @@ def fancyopts(args, options, state, gnu=
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
More information about the Mercurial-devel
mailing list