##// END OF EJS Templates
revset: add i18n comments to error messages for followlines predicate...
FUJIWARA Katsunori -
r32086:2a2744df stable
parent child Browse files
Show More
@@ -926,6 +926,7 b' def followlines(repo, subset, x):'
926 926 revs = getset(repo, fullreposet(repo), args['startrev'])
927 927 if len(revs) != 1:
928 928 raise error.ParseError(
929 # i18n: "followlines" is a keyword
929 930 _("followlines expects exactly one revision"))
930 931 rev = revs.last()
931 932
@@ -936,9 +937,11 b' def followlines(repo, subset, x):'
936 937 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=repo[rev])
937 938 files = [f for f in repo[rev] if m(f)]
938 939 if len(files) != 1:
940 # i18n: "followlines" is a keyword
939 941 raise error.ParseError(_("followlines expects exactly one file"))
940 942 fname = files[0]
941 943
944 # i18n: "followlines" is a keyword
942 945 lr = getrange(args['lines'][0], _("followlines expects a line range"))
943 946 fromline, toline = [getinteger(a, _("line range bounds must be integers"))
944 947 for a in lr]
@@ -948,7 +951,8 b' def followlines(repo, subset, x):'
948 951 descend = False
949 952 if 'descend' in args:
950 953 descend = getboolean(args['descend'],
951 _("'descend' argument must be a boolean"))
954 # i18n: "descend" is a keyword
955 _("descend argument must be a boolean"))
952 956 if descend:
953 957 rs = generatorset(
954 958 (c.rev() for c, _linerange
@@ -668,7 +668,7 b' check error cases'
668 668 hg: parse error at 43: syntax error in revset 'followlines(baz, 2:4, startrev=20, descend=[1])'
669 669 [255]
670 670 $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)'
671 hg: parse error: 'descend' argument must be a boolean
671 hg: parse error: descend argument must be a boolean
672 672 [255]
673 673
674 674 Test annotate with whitespace options
General Comments 0
You need to be logged in to leave comments. Login now