diff mercurial/dispatch.py @ 36503:8b662717c53f

py3: use bytestr() to coerce position carried by ParseError to string The position value is either int or byte string.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 01 Mar 2018 08:45:34 -0500
parents 976a9fd706ed
children c263c684da91
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Mar 01 08:38:39 2018 -0500
+++ b/mercurial/dispatch.py	Thu Mar 01 08:45:34 2018 -0500
@@ -132,7 +132,7 @@
         similar = _getsimilar(inst.symbols, inst.function)
     if len(inst.args) > 1:
         write(_("hg: parse error at %s: %s\n") %
-                         (inst.args[1], inst.args[0]))
+              (pycompat.bytestr(inst.args[1]), inst.args[0]))
         if (inst.args[0][0] == ' '):
             write(_("unexpected leading whitespace\n"))
     else: