Mercurial > hg-stable
changeset 32085:2a2744dffecf stable
revset: add i18n comments to error messages for followlines predicate
This patch also includes un-quoting "descend" keyword for similarity
to other error messages (this seems too trivial as a separated patch).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 01 May 2017 05:52:36 +0900 |
parents | 091d6b9157da |
children | b59a292d0a53 |
files | mercurial/revset.py tests/test-annotate.t |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Mon May 01 05:52:32 2017 +0900 +++ b/mercurial/revset.py Mon May 01 05:52:36 2017 +0900 @@ -926,6 +926,7 @@ revs = getset(repo, fullreposet(repo), args['startrev']) if len(revs) != 1: raise error.ParseError( + # i18n: "followlines" is a keyword _("followlines expects exactly one revision")) rev = revs.last() @@ -936,9 +937,11 @@ m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=repo[rev]) files = [f for f in repo[rev] if m(f)] if len(files) != 1: + # i18n: "followlines" is a keyword raise error.ParseError(_("followlines expects exactly one file")) fname = files[0] + # i18n: "followlines" is a keyword lr = getrange(args['lines'][0], _("followlines expects a line range")) fromline, toline = [getinteger(a, _("line range bounds must be integers")) for a in lr] @@ -948,7 +951,8 @@ descend = False if 'descend' in args: descend = getboolean(args['descend'], - _("'descend' argument must be a boolean")) + # i18n: "descend" is a keyword + _("descend argument must be a boolean")) if descend: rs = generatorset( (c.rev() for c, _linerange
--- a/tests/test-annotate.t Mon May 01 05:52:32 2017 +0900 +++ b/tests/test-annotate.t Mon May 01 05:52:36 2017 +0900 @@ -668,7 +668,7 @@ hg: parse error at 43: syntax error in revset 'followlines(baz, 2:4, startrev=20, descend=[1])' [255] $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)' - hg: parse error: 'descend' argument must be a boolean + hg: parse error: descend argument must be a boolean [255] Test annotate with whitespace options