diff -r d9a8017dce10 -r b13b99d39a46 mercurial/dispatch.py --- a/mercurial/dispatch.py Wed Aug 20 22:52:56 2014 -0700 +++ b/mercurial/dispatch.py Sun Mar 16 17:31:31 2014 +0200 @@ -58,6 +58,8 @@ if len(inst.args) > 1: ferr.write(_("hg: parse error at %s: %s\n") % (inst.args[1], inst.args[0])) + if (inst.args[0][0] == ' '): + ferr.write(_("unexpected leading whitespace\n")) else: ferr.write(_("hg: parse error: %s\n") % inst.args[0]) return -1 @@ -155,6 +157,8 @@ if len(inst.args) > 1: ui.warn(_("hg: parse error at %s: %s\n") % (inst.args[1], inst.args[0])) + if (inst.args[0][0] == ' '): + ui.warn(_("unexpected leading whitespace\n")) else: ui.warn(_("hg: parse error: %s\n") % inst.args[0]) return -1