diff -r 5bb900885311 -r 0fc8b066928a mercurial/parser.py --- a/mercurial/parser.py Tue Oct 20 08:58:20 2020 -0700 +++ b/mercurial/parser.py Thu Oct 22 09:58:05 2020 -0700 @@ -408,10 +408,10 @@ def parseerrordetail(inst): """Compose error message from specified ParseError object """ - if len(inst.args) > 1: - return _(b'at %d: %s') % (inst.args[1], inst.args[0]) + if inst.location is not None: + return _(b'at %d: %s') % (inst.location, inst.message) else: - return inst.args[0] + return inst.message class alias(object):