Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 14701:4b93bd041772 stable
parsers: fix localization markup of parser errors
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 21 Jun 2011 00:17:52 +0200 |
parents | 93731b3efd0d |
children | a97ebfec8c29 |
line wrap: on
line diff
--- a/mercurial/revset.py Sun Jun 19 22:33:25 2011 -0400 +++ b/mercurial/revset.py Tue Jun 21 00:17:52 2011 +0200 @@ -979,7 +979,7 @@ value = value.replace(arg, repr(arg)) self.replacement, pos = parse(value) if pos != len(value): - raise error.ParseError('invalid token', pos) + raise error.ParseError(_('invalid token'), pos) else: self.replacement = value @@ -997,7 +997,8 @@ (len(self.args) == 1 and tree[2][0] == 'list') or (len(self.args) > 1 and (tree[2][0] != 'list' or len(tree[2]) - 1 != len(self.args)))): - raise error.ParseError('invalid amount of arguments', len(tree) - 2) + raise error.ParseError(_('invalid amount of arguments'), + len(tree) - 2) return True def replace(self, tree): @@ -1033,7 +1034,7 @@ raise error.ParseError(_("empty query")) tree, pos = parse(spec) if (pos != len(spec)): - raise error.ParseError("invalid token", pos) + raise error.ParseError(_("invalid token"), pos) tree = findaliases(ui, tree) weight, tree = optimize(tree, True) def mfunc(repo, subset):