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