# HG changeset patch # User Yuya Nishihara # Date 2018-03-01 13:45:34 # Node ID 8b662717c53f5da1336d3d019509ee315d3164fd # Parent faaabe0dc4d1090ae121ca32b79f42a8de9b7929 py3: use bytestr() to coerce position carried by ParseError to string The position value is either int or byte string. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -132,7 +132,7 @@ def _formatparse(write, inst): 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: