Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 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 | 83527d9f1f13 |
children | bd872f64a8ba |
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