Show More
@@ -222,7 +222,7 b' def callcatch(ui, func):' | |||
|
222 | 222 | except error.WdirUnsupported: |
|
223 | 223 | ui.error(_(b"abort: working directory revision cannot be specified\n")) |
|
224 | 224 | except error.Abort as inst: |
|
225 | if isinstance(inst, error.InputError): | |
|
225 | if isinstance(inst, (error.InputError, error.ParseError)): | |
|
226 | 226 | detailed_exit_code = 10 |
|
227 | 227 | elif isinstance(inst, error.StateError): |
|
228 | 228 | detailed_exit_code = 20 |
@@ -930,34 +930,34 b' check error cases' | |||
|
930 | 930 | $ hg up 24 --quiet |
|
931 | 931 | $ hg log -r 'followlines()' |
|
932 | 932 | hg: parse error: followlines takes at least 1 positional arguments |
|
933 |
[ |
|
|
933 | [10] | |
|
934 | 934 | $ hg log -r 'followlines(baz)' |
|
935 | 935 | hg: parse error: followlines requires a line range |
|
936 |
[ |
|
|
936 | [10] | |
|
937 | 937 | $ hg log -r 'followlines(baz, x)' |
|
938 | 938 | hg: parse error: followlines expects a line number or a range |
|
939 |
[ |
|
|
939 | [10] | |
|
940 | 940 | $ hg log -r 'followlines(baz, 1:2, startrev=desc("b"))' |
|
941 | 941 | hg: parse error: followlines expects exactly one revision |
|
942 |
[ |
|
|
942 | [10] | |
|
943 | 943 | $ hg log -r 'followlines("glob:*", 1:2)' |
|
944 | 944 | hg: parse error: followlines expects exactly one file |
|
945 |
[ |
|
|
945 | [10] | |
|
946 | 946 | $ hg log -r 'followlines(baz, 1:)' |
|
947 | 947 | hg: parse error: line range bounds must be integers |
|
948 |
[ |
|
|
948 | [10] | |
|
949 | 949 | $ hg log -r 'followlines(baz, :1)' |
|
950 | 950 | hg: parse error: line range bounds must be integers |
|
951 |
[ |
|
|
951 | [10] | |
|
952 | 952 | $ hg log -r 'followlines(baz, x:4)' |
|
953 | 953 | hg: parse error: line range bounds must be integers |
|
954 |
[ |
|
|
954 | [10] | |
|
955 | 955 | $ hg log -r 'followlines(baz, 5:4)' |
|
956 | 956 | hg: parse error: line range must be positive |
|
957 |
[ |
|
|
957 | [10] | |
|
958 | 958 | $ hg log -r 'followlines(baz, 0:4)' |
|
959 | 959 | hg: parse error: fromline must be strictly positive |
|
960 |
[ |
|
|
960 | [10] | |
|
961 | 961 | $ hg log -r 'followlines(baz, 2:40)' |
|
962 | 962 | abort: line range exceeds file size |
|
963 | 963 | [10] |
@@ -965,10 +965,10 b' check error cases' | |||
|
965 | 965 | hg: parse error at 43: not a prefix: [ |
|
966 | 966 | (followlines(baz, 2:4, startrev=20, descend=[1]) |
|
967 | 967 | ^ here) |
|
968 |
[ |
|
|
968 | [10] | |
|
969 | 969 | $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)' |
|
970 | 970 | hg: parse error: descend argument must be a boolean |
|
971 |
[ |
|
|
971 | [10] | |
|
972 | 972 | |
|
973 | 973 | Test empty annotate output |
|
974 | 974 |
@@ -16,20 +16,20 b' commit date test' | |||
|
16 | 16 | $ echo foo >> foo |
|
17 | 17 | $ hg commit -d '1 4444444' -m commit-3 |
|
18 | 18 | hg: parse error: impossible time zone offset: 4444444 |
|
19 |
[ |
|
|
19 | [10] | |
|
20 | 20 | $ hg commit -d '1 15.1' -m commit-4 |
|
21 | 21 | hg: parse error: invalid date: '1\t15.1' |
|
22 |
[ |
|
|
22 | [10] | |
|
23 | 23 | $ hg commit -d 'foo bar' -m commit-5 |
|
24 | 24 | hg: parse error: invalid date: 'foo bar' |
|
25 |
[ |
|
|
25 | [10] | |
|
26 | 26 | $ hg commit -d ' 1 4444' -m commit-6 |
|
27 | 27 | $ hg commit -d '111111111111 0' -m commit-7 |
|
28 | 28 | hg: parse error: date exceeds 32 bits: 111111111111 |
|
29 |
[ |
|
|
29 | [10] | |
|
30 | 30 | $ hg commit -d '-111111111111 0' -m commit-7 |
|
31 | 31 | hg: parse error: date exceeds 32 bits: -111111111111 |
|
32 |
[ |
|
|
32 | [10] | |
|
33 | 33 | $ echo foo >> foo |
|
34 | 34 | $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7-2 |
|
35 | 35 | $ echo foo >> foo |
@@ -39,10 +39,10 b' commit date test' | |||
|
39 | 39 | 2 1901-12-13 20:45:52 +0000 |
|
40 | 40 | $ hg commit -d '1901-12-13 20:45:51 +0000' -m commit-7 |
|
41 | 41 | hg: parse error: date exceeds 32 bits: -2147483649 |
|
42 |
[ |
|
|
42 | [10] | |
|
43 | 43 | $ hg commit -d '-2147483649 0' -m commit-7 |
|
44 | 44 | hg: parse error: date exceeds 32 bits: -2147483649 |
|
45 |
[ |
|
|
45 | [10] | |
|
46 | 46 | |
|
47 | 47 | commit added file that has been deleted |
|
48 | 48 |
@@ -137,13 +137,13 b' Invalid :pushrev raises appropriately' | |||
|
137 | 137 | $ hg --config 'paths.default:pushrev=notdefined()' push |
|
138 | 138 | pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) |
|
139 | 139 | hg: parse error: unknown identifier: notdefined |
|
140 |
[ |
|
|
140 | [10] | |
|
141 | 141 | |
|
142 | 142 | $ hg --config 'paths.default:pushrev=(' push |
|
143 | 143 | pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) |
|
144 | 144 | hg: parse error at 1: not a prefix: end |
|
145 | 145 | (( |
|
146 | 146 | ^ here) |
|
147 |
[ |
|
|
147 | [10] | |
|
148 | 148 | |
|
149 | 149 | $ cd .. |
@@ -34,10 +34,10 b'' | |||
|
34 | 34 | |
|
35 | 35 | $ hg diff -r "" |
|
36 | 36 | hg: parse error: empty query |
|
37 |
[ |
|
|
37 | [10] | |
|
38 | 38 | $ hg diff -r tip -r "" |
|
39 | 39 | hg: parse error: empty query |
|
40 |
[ |
|
|
40 | [10] | |
|
41 | 41 | |
|
42 | 42 | Remove a file that was added via merge. Since the file is not in parent 1, |
|
43 | 43 | it should not be in the diff. |
@@ -337,7 +337,7 b' Invalid pattern in file name:' | |||
|
337 | 337 | hg: parse error at 3: unterminated template expansion |
|
338 | 338 | (%m{ |
|
339 | 339 | ^ here) |
|
340 |
[ |
|
|
340 | [10] | |
|
341 | 341 | $ hg export -o '%\' tip |
|
342 | 342 | abort: invalid format spec '%\' in output filename |
|
343 | 343 | [255] |
@@ -367,7 +367,7 b' Catch exporting unknown revisions (espec' | |||
|
367 | 367 | |
|
368 | 368 | $ hg export "" |
|
369 | 369 | hg: parse error: empty query |
|
370 |
[ |
|
|
370 | [10] | |
|
371 | 371 | $ hg export 999 |
|
372 | 372 | abort: unknown revision '999'! |
|
373 | 373 | [255] |
@@ -54,7 +54,7 b' test bad extdata() revset source' | |||
|
54 | 54 | |
|
55 | 55 | $ hg log -qr "extdata()" |
|
56 | 56 | hg: parse error: extdata takes at least 1 string argument |
|
57 |
[ |
|
|
57 | [10] | |
|
58 | 58 | $ hg log -qr "extdata(unknown)" |
|
59 | 59 | abort: unknown extdata source 'unknown' |
|
60 | 60 | [255] |
@@ -73,7 +73,7 b" that we don't crash before we can print " | |||
|
73 | 73 | hg: parse error at 0: not a prefix: + |
|
74 | 74 | (+---------------------------------------+ |
|
75 | 75 | ^ here) |
|
76 |
[ |
|
|
76 | [10] | |
|
77 | 77 | |
|
78 | 78 | test template support: |
|
79 | 79 | |
@@ -95,17 +95,17 b' test bad extdata() template source' | |||
|
95 | 95 | |
|
96 | 96 | $ hg log -T "{extdata()}\n" |
|
97 | 97 | hg: parse error: extdata expects one argument |
|
98 |
[ |
|
|
98 | [10] | |
|
99 | 99 | $ hg log -T "{extdata('unknown')}\n" |
|
100 | 100 | abort: unknown extdata source 'unknown' |
|
101 | 101 | [255] |
|
102 | 102 | $ hg log -T "{extdata(unknown)}\n" |
|
103 | 103 | hg: parse error: empty data source specified |
|
104 | 104 | (did you mean extdata('unknown')?) |
|
105 |
[ |
|
|
105 | [10] | |
|
106 | 106 | $ hg log -T "{extdata('{unknown}')}\n" |
|
107 | 107 | hg: parse error: empty data source specified |
|
108 |
[ |
|
|
108 | [10] | |
|
109 | 109 | |
|
110 | 110 | we don't fix up relative file URLs, but we do run shell commands in repo root |
|
111 | 111 |
@@ -81,7 +81,7 b' Test operators and basic patterns' | |||
|
81 | 81 | $ fileset 'a_b' |
|
82 | 82 | $ fileset '"\xy"' |
|
83 | 83 | hg: parse error: invalid \x escape* (glob) |
|
84 |
[ |
|
|
84 | [10] | |
|
85 | 85 | |
|
86 | 86 | Test invalid syntax |
|
87 | 87 | |
@@ -90,25 +90,25 b' Test invalid syntax' | |||
|
90 | 90 | (string 'added') |
|
91 | 91 | None) |
|
92 | 92 | hg: parse error: not a symbol |
|
93 |
[ |
|
|
93 | [10] | |
|
94 | 94 | $ fileset -v '()()' |
|
95 | 95 | (func |
|
96 | 96 | (group |
|
97 | 97 | None) |
|
98 | 98 | None) |
|
99 | 99 | hg: parse error: not a symbol |
|
100 |
[ |
|
|
100 | [10] | |
|
101 | 101 | $ fileset -v -- '-x' |
|
102 | 102 | (negate |
|
103 | 103 | (symbol 'x')) |
|
104 | 104 | hg: parse error: can't use negate operator in this context |
|
105 |
[ |
|
|
105 | [10] | |
|
106 | 106 | $ fileset -v -- '-()' |
|
107 | 107 | (negate |
|
108 | 108 | (group |
|
109 | 109 | None)) |
|
110 | 110 | hg: parse error: can't use negate operator in this context |
|
111 |
[ |
|
|
111 | [10] | |
|
112 | 112 | $ fileset -p parsed 'a, b, c' |
|
113 | 113 | * parsed: |
|
114 | 114 | (list |
@@ -117,23 +117,23 b' Test invalid syntax' | |||
|
117 | 117 | (symbol 'c')) |
|
118 | 118 | hg: parse error: can't use a list in this context |
|
119 | 119 | (see 'hg help "filesets.x or y"') |
|
120 |
[ |
|
|
120 | [10] | |
|
121 | 121 | |
|
122 | 122 | $ fileset '"path":.' |
|
123 | 123 | hg: parse error: not a symbol |
|
124 |
[ |
|
|
124 | [10] | |
|
125 | 125 | $ fileset 'path:foo bar' |
|
126 | 126 | hg: parse error at 9: invalid token |
|
127 |
[ |
|
|
127 | [10] | |
|
128 | 128 | $ fileset 'foo:bar:baz' |
|
129 | 129 | hg: parse error: not a symbol |
|
130 |
[ |
|
|
130 | [10] | |
|
131 | 131 | $ fileset 'foo:bar()' |
|
132 | 132 | hg: parse error: pattern must be a string |
|
133 |
[ |
|
|
133 | [10] | |
|
134 | 134 | $ fileset 'foo:bar' |
|
135 | 135 | hg: parse error: invalid pattern kind: foo |
|
136 |
[ |
|
|
136 | [10] | |
|
137 | 137 | |
|
138 | 138 | Show parsed tree at stages: |
|
139 | 139 | |
@@ -562,7 +562,7 b' Test files properties' | |||
|
562 | 562 | c1 |
|
563 | 563 | $ fileset 'grep("missingparens(")' |
|
564 | 564 | hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \)).* (re) |
|
565 |
[ |
|
|
565 | [10] | |
|
566 | 566 | |
|
567 | 567 | #if execbit |
|
568 | 568 | $ chmod +x b2 |
@@ -589,11 +589,11 b' Test files properties' | |||
|
589 | 589 | $ hg add 1k 2k |
|
590 | 590 | $ fileset 'size("bar")' |
|
591 | 591 | hg: parse error: couldn't parse size: bar |
|
592 |
[ |
|
|
592 | [10] | |
|
593 | 593 | $ fileset '(1k, 2k)' |
|
594 | 594 | hg: parse error: can't use a list in this context |
|
595 | 595 | (see 'hg help "filesets.x or y"') |
|
596 |
[ |
|
|
596 | [10] | |
|
597 | 597 | $ fileset 'size(1k)' |
|
598 | 598 | 1k |
|
599 | 599 | $ fileset '(1k or 2k) and size("< 2k")' |
@@ -1018,10 +1018,10 b' Fully empty revset' | |||
|
1018 | 1018 | |
|
1019 | 1019 | $ fileset "status('', '4', added())" |
|
1020 | 1020 | hg: parse error: first argument to status must be a revision |
|
1021 |
[ |
|
|
1021 | [10] | |
|
1022 | 1022 | $ fileset "status('2', '', added())" |
|
1023 | 1023 | hg: parse error: second argument to status must be a revision |
|
1024 |
[ |
|
|
1024 | [10] | |
|
1025 | 1025 | |
|
1026 | 1026 | Empty revset will error at the revset layer |
|
1027 | 1027 | |
@@ -1029,9 +1029,9 b' Empty revset will error at the revset la' | |||
|
1029 | 1029 | hg: parse error at 1: not a prefix: end |
|
1030 | 1030 | ( |
|
1031 | 1031 | ^ here) |
|
1032 |
[ |
|
|
1032 | [10] | |
|
1033 | 1033 | $ fileset "status('2', ' ', added())" |
|
1034 | 1034 | hg: parse error at 1: not a prefix: end |
|
1035 | 1035 | ( |
|
1036 | 1036 | ^ here) |
|
1037 |
[ |
|
|
1037 | [10] |
@@ -1682,7 +1682,7 b' glog always reorders nodes which explain' | |||
|
1682 | 1682 | <date '2 0 to 4 0'>> |
|
1683 | 1683 | $ hg log -G -d 'brace ) in a date' |
|
1684 | 1684 | hg: parse error: invalid date: 'brace ) in a date' |
|
1685 |
[ |
|
|
1685 | [10] | |
|
1686 | 1686 | $ testlog --prune 31 --prune 32 |
|
1687 | 1687 | [] |
|
1688 | 1688 | (not |
@@ -1532,7 +1532,7 b' glog always reorders nodes which explain' | |||
|
1532 | 1532 | <date '2 0 to 4 0'>> |
|
1533 | 1533 | $ hg log -G -d 'brace ) in a date' |
|
1534 | 1534 | hg: parse error: invalid date: 'brace ) in a date' |
|
1535 |
[ |
|
|
1535 | [10] | |
|
1536 | 1536 | $ testlog --prune 31 --prune 32 |
|
1537 | 1537 | [] |
|
1538 | 1538 | (not |
@@ -25,13 +25,13 b' invalid revset syntax' | |||
|
25 | 25 | |
|
26 | 26 | $ hg log -r 'diffcontains()' |
|
27 | 27 | hg: parse error: diffcontains takes at least 1 argument |
|
28 |
[ |
|
|
28 | [10] | |
|
29 | 29 | $ hg log -r 'diffcontains(:)' |
|
30 | 30 | hg: parse error: diffcontains requires a string pattern |
|
31 |
[ |
|
|
31 | [10] | |
|
32 | 32 | $ hg log -r 'diffcontains("re:**test**")' |
|
33 | 33 | hg: parse error: invalid regular expression: nothing to repeat* (glob) |
|
34 |
[ |
|
|
34 | [10] | |
|
35 | 35 | |
|
36 | 36 | simple |
|
37 | 37 |
@@ -187,7 +187,7 b' Test that missing revisions are detected' | |||
|
187 | 187 | > EOF |
|
188 | 188 | hg: parse error: missing rules for changeset c8e68270e35a |
|
189 | 189 | (use "drop c8e68270e35a" to discard, see also: 'hg help -e histedit.config') |
|
190 |
[ |
|
|
190 | [10] | |
|
191 | 191 | |
|
192 | 192 | Test that extra revisions are detected |
|
193 | 193 | --------------------------------------- |
@@ -199,7 +199,7 b' Test that extra revisions are detected' | |||
|
199 | 199 | > EOF |
|
200 | 200 | hg: parse error: pick "6058cbb6cfd7" changeset was not a candidate |
|
201 | 201 | (only use listed changesets) |
|
202 |
[ |
|
|
202 | [10] | |
|
203 | 203 | |
|
204 | 204 | Test malformed line |
|
205 | 205 | --------------------------------------- |
@@ -210,7 +210,7 b' Test malformed line' | |||
|
210 | 210 | > pick 08d98a8350f3 4 five |
|
211 | 211 | > EOF |
|
212 | 212 | hg: parse error: malformed line "pickeb57da33312f2three" |
|
213 |
[ |
|
|
213 | [10] | |
|
214 | 214 | |
|
215 | 215 | Test unknown changeset |
|
216 | 216 | --------------------------------------- |
@@ -221,7 +221,7 b' Test unknown changeset' | |||
|
221 | 221 | > pick 08d98a8350f3 4 five |
|
222 | 222 | > EOF |
|
223 | 223 | hg: parse error: unknown changeset 0123456789ab listed |
|
224 |
[ |
|
|
224 | [10] | |
|
225 | 225 | |
|
226 | 226 | Test unknown command |
|
227 | 227 | --------------------------------------- |
@@ -232,7 +232,7 b' Test unknown command' | |||
|
232 | 232 | > pick 08d98a8350f3 4 five |
|
233 | 233 | > EOF |
|
234 | 234 | hg: parse error: unknown action "coin" |
|
235 |
[ |
|
|
235 | [10] | |
|
236 | 236 | |
|
237 | 237 | Test duplicated changeset |
|
238 | 238 | --------------------------------------- |
@@ -245,7 +245,7 b' So one is missing and one appear twice.' | |||
|
245 | 245 | > pick 08d98a8350f3 4 five |
|
246 | 246 | > EOF |
|
247 | 247 | hg: parse error: duplicated command for changeset eb57da33312f |
|
248 |
[ |
|
|
248 | [10] | |
|
249 | 249 | |
|
250 | 250 | Test bogus rev |
|
251 | 251 | --------------------------------------- |
@@ -256,7 +256,7 b' Test bogus rev' | |||
|
256 | 256 | > pick 08d98a8350f3 4 five |
|
257 | 257 | > EOF |
|
258 | 258 | hg: parse error: invalid changeset 0u98 |
|
259 |
[ |
|
|
259 | [10] | |
|
260 | 260 | |
|
261 | 261 | Test short version of command |
|
262 | 262 | --------------------------------------- |
@@ -463,7 +463,7 b' Attempting to fold a change into a publi' | |||
|
463 | 463 | $ HGEDITOR="sh ../edit.sh" hg histedit 2 |
|
464 | 464 | warning: histedit rules saved to: .hg/histedit-last-edit.txt |
|
465 | 465 | hg: parse error: first changeset cannot use verb "fold" |
|
466 |
[ |
|
|
466 | [10] | |
|
467 | 467 | $ cat .hg/histedit-last-edit.txt |
|
468 | 468 | fold 0012be4a27ea 2 extend a |
|
469 | 469 |
@@ -588,7 +588,7 b' Test rolling into a commit with multiple' | |||
|
588 | 588 | > r 5db65b93a12b |
|
589 | 589 | > EOF |
|
590 | 590 | hg: parse error: first changeset cannot use verb "roll" |
|
591 |
[ |
|
|
591 | [10] | |
|
592 | 592 | $ hg log -G -T '{node|short} {desc}' |
|
593 | 593 | @ 5db65b93a12b cc |
|
594 | 594 | | |
@@ -70,7 +70,7 b'' | |||
|
70 | 70 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" |
|
71 | 71 | hg: parse error: unsupported file pattern: size(">1000B") |
|
72 | 72 | (paths must be prefixed with "path:") |
|
73 |
[ |
|
|
73 | [10] | |
|
74 | 74 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" |
|
75 | 75 | |
|
76 | 76 | # Commit large file |
@@ -1142,7 +1142,7 b' Non-exact pattern kinds are not allowed.' | |||
|
1142 | 1142 | $ cd .. |
|
1143 | 1143 | $ hg log -f -L glob:*a*,1:2 |
|
1144 | 1144 | hg: parse error: line range pattern 'glob:*a*' must match exactly one file |
|
1145 |
[ |
|
|
1145 | [10] | |
|
1146 | 1146 | |
|
1147 | 1147 | We get an error for removed files. |
|
1148 | 1148 |
@@ -1063,7 +1063,7 b' log -r ""' | |||
|
1063 | 1063 | |
|
1064 | 1064 | $ hg log -r '' |
|
1065 | 1065 | hg: parse error: empty query |
|
1066 |
[ |
|
|
1066 | [10] | |
|
1067 | 1067 | |
|
1068 | 1068 | log -r <some unknown node id> |
|
1069 | 1069 | |
@@ -2435,7 +2435,7 b' simple error' | |||
|
2435 | 2435 | hg: parse error at 14: unexpected token: end |
|
2436 | 2436 | ({shortest(node} |
|
2437 | 2437 | ^ here) |
|
2438 |
[ |
|
|
2438 | [10] | |
|
2439 | 2439 | |
|
2440 | 2440 | multi-line template with error |
|
2441 | 2441 | $ hg log -r . -T 'line 1 |
@@ -2445,7 +2445,7 b' multi-line template with error' | |||
|
2445 | 2445 | hg: parse error at 27: unexpected token: end |
|
2446 | 2446 | (line 1\nline2\n{shortest(node}\nline4\nline5 |
|
2447 | 2447 | ^ here) |
|
2448 |
[ |
|
|
2448 | [10] | |
|
2449 | 2449 | |
|
2450 | 2450 | $ cd .. |
|
2451 | 2451 |
@@ -500,15 +500,15 b' Testing for multiple names, which is not' | |||
|
500 | 500 | |
|
501 | 501 | $ hg log -r 'remotenames("re:default", "re:server2")' -GT "{rev}:{node|short} {remotenames}\n" |
|
502 | 502 | hg: parse error: only one argument accepted |
|
503 |
[ |
|
|
503 | [10] | |
|
504 | 504 | |
|
505 | 505 | $ hg log -r 'remotebranches("default/wat", "server2/wat")' -GT "{rev}:{node|short} {remotebranches}\n" |
|
506 | 506 | hg: parse error: only one argument accepted |
|
507 |
[ |
|
|
507 | [10] | |
|
508 | 508 | |
|
509 | 509 | $ hg log -r 'remotebookmarks("default/foo", "server2/foo")' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
510 | 510 | hg: parse error: only one argument accepted |
|
511 |
[ |
|
|
511 | [10] | |
|
512 | 512 | |
|
513 | 513 | Testing pattern matching |
|
514 | 514 |
@@ -29,10 +29,10 b' Test conflict*() revsets' | |||
|
29 | 29 | # Bad usage |
|
30 | 30 | $ hg log -r 'conflictlocal(foo)' |
|
31 | 31 | hg: parse error: conflictlocal takes no arguments |
|
32 |
[ |
|
|
32 | [10] | |
|
33 | 33 | $ hg log -r 'conflictother(foo)' |
|
34 | 34 | hg: parse error: conflictother takes no arguments |
|
35 |
[ |
|
|
35 | [10] | |
|
36 | 36 | $ hg co -C . |
|
37 | 37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 38 | # No merge parents when not merging |
@@ -18,13 +18,13 b' This runs with TZ="GMT"' | |||
|
18 | 18 | $ echo "fail" >> a |
|
19 | 19 | $ hg ci -d "should fail" -m "fail" |
|
20 | 20 | hg: parse error: invalid date: 'should fail' |
|
21 |
[ |
|
|
21 | [10] | |
|
22 | 22 | $ hg ci -d "100000000000000000 1400" -m "fail" |
|
23 | 23 | hg: parse error: date exceeds 32 bits: 100000000000000000 |
|
24 |
[ |
|
|
24 | [10] | |
|
25 | 25 | $ hg ci -d "100000 1400000" -m "fail" |
|
26 | 26 | hg: parse error: impossible time zone offset: 1400000 |
|
27 |
[ |
|
|
27 | [10] | |
|
28 | 28 | |
|
29 | 29 | Check with local timezone other than GMT and with DST |
|
30 | 30 |
@@ -172,10 +172,10 b' Test tag with parenthesis (but not a val' | |||
|
172 | 172 | 6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)] |
|
173 | 173 | $ hg log -r '(release_4.1(candidate1))' |
|
174 | 174 | hg: parse error: unknown identifier: release_4.1 |
|
175 |
[ |
|
|
175 | [10] | |
|
176 | 176 | $ hg log -r 'revset(release_4.1(candidate1))' |
|
177 | 177 | hg: parse error: unknown identifier: release_4.1 |
|
178 |
[ |
|
|
178 | [10] | |
|
179 | 179 | $ hg log -r '"release_4.1(candidate1)"' |
|
180 | 180 | 6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)] |
|
181 | 181 | $ hg log -r '("release_4.1(candidate1)")' |
@@ -190,7 +190,7 b' Test tag with parenthesis (but not a val' | |||
|
190 | 190 | 6:db72e24fe069 Added tag 1.2 for changeset ff42fde8edbb [release_4.1(candidate1)] |
|
191 | 191 | $ hg log -r '::release_4.1(candidate1)' |
|
192 | 192 | hg: parse error: unknown identifier: release_4.1 |
|
193 |
[ |
|
|
193 | [10] | |
|
194 | 194 | |
|
195 | 195 | Test tag with parenthesis and other function like char |
|
196 | 196 | |
@@ -200,10 +200,10 b' Test tag with parenthesis and other func' | |||
|
200 | 200 | 7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)] |
|
201 | 201 | $ hg log -r '(release_4.1(arch=x86,arm))' |
|
202 | 202 | hg: parse error: unknown identifier: release_4.1 |
|
203 |
[ |
|
|
203 | [10] | |
|
204 | 204 | $ hg log -r 'revset(release_4.1(arch=x86,arm))' |
|
205 | 205 | hg: parse error: unknown identifier: release_4.1 |
|
206 |
[ |
|
|
206 | [10] | |
|
207 | 207 | $ hg log -r '"release_4.1(arch=x86,arm)"' |
|
208 | 208 | 7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)] |
|
209 | 209 | $ hg log -r '("release_4.1(arch=x86,arm)")' |
@@ -219,7 +219,7 b' Test tag with parenthesis and other func' | |||
|
219 | 219 | 7:b29b25d7d687 Added tag release_4.1(candidate1) for changeset db72e24fe069 [release_4.1(arch=x86,arm)] |
|
220 | 220 | $ hg log -r '::release_4.1(arch=x86,arm)' |
|
221 | 221 | hg: parse error: unknown identifier: release_4.1 |
|
222 |
[ |
|
|
222 | [10] | |
|
223 | 223 | |
|
224 | 224 | Test tag conflicting with revset function |
|
225 | 225 | |
@@ -229,10 +229,10 b' Test tag conflicting with revset functio' | |||
|
229 | 229 | 8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)] |
|
230 | 230 | $ hg log -r '(secret(team=foo,project=bar))' |
|
231 | 231 | hg: parse error: secret takes no arguments |
|
232 |
[ |
|
|
232 | [10] | |
|
233 | 233 | $ hg log -r 'revset(secret(team=foo,project=bar))' |
|
234 | 234 | hg: parse error: secret takes no arguments |
|
235 |
[ |
|
|
235 | [10] | |
|
236 | 236 | $ hg log -r '"secret(team=foo,project=bar)"' |
|
237 | 237 | 8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)] |
|
238 | 238 | $ hg log -r '("secret(team=foo,project=bar)")' |
@@ -249,7 +249,7 b' Test tag conflicting with revset functio' | |||
|
249 | 249 | 8:6b2e2d4ea455 Added tag release_4.1(arch=x86,arm) for changeset b29b25d7d687 [secret(team=foo,project=bar)] |
|
250 | 250 | $ hg log -r '::secret(team=foo,project=bar)' |
|
251 | 251 | hg: parse error: secret takes no arguments |
|
252 |
[ |
|
|
252 | [10] | |
|
253 | 253 | |
|
254 | 254 | Test tag with space |
|
255 | 255 | |
@@ -261,12 +261,12 b' Test tag with space' | |||
|
261 | 261 | hg: parse error at 4: unexpected token: symbol |
|
262 | 262 | ((my little version) |
|
263 | 263 | ^ here) |
|
264 |
[ |
|
|
264 | [10] | |
|
265 | 265 | $ hg log -r 'revset(my little version)' |
|
266 | 266 | hg: parse error at 10: unexpected token: symbol |
|
267 | 267 | (revset(my little version) |
|
268 | 268 | ^ here) |
|
269 |
[ |
|
|
269 | [10] | |
|
270 | 270 | $ hg log -r '"my little version"' |
|
271 | 271 | 9:269192bf8fc3 Added tag secret(team=foo,project=bar) for changeset 6b2e2d4ea455 [my little version] |
|
272 | 272 | $ hg log -r '("my little version")' |
@@ -286,4 +286,4 b' Test tag with space' | |||
|
286 | 286 | hg: parse error at 5: invalid token |
|
287 | 287 | (::my little version |
|
288 | 288 | ^ here) |
|
289 |
[ |
|
|
289 | [10] |
@@ -401,10 +401,10 b' quoting needed' | |||
|
401 | 401 | hg: parse error at 10: unexpected token: symbol |
|
402 | 402 | (date(this is a test) |
|
403 | 403 | ^ here) |
|
404 |
[ |
|
|
404 | [10] | |
|
405 | 405 | $ log 'date()' |
|
406 | 406 | hg: parse error: date requires a string |
|
407 |
[ |
|
|
407 | [10] | |
|
408 | 408 | $ log 'date' |
|
409 | 409 | abort: unknown revision 'date'! |
|
410 | 410 | [255] |
@@ -412,13 +412,13 b' quoting needed' | |||
|
412 | 412 | hg: parse error at 5: not a prefix: end |
|
413 | 413 | (date( |
|
414 | 414 | ^ here) |
|
415 |
[ |
|
|
415 | [10] | |
|
416 | 416 | $ log 'date("\xy")' |
|
417 | 417 | hg: parse error: invalid \x escape* (glob) |
|
418 |
[ |
|
|
418 | [10] | |
|
419 | 419 | $ log 'date(tip)' |
|
420 | 420 | hg: parse error: invalid date: 'tip' |
|
421 |
[ |
|
|
421 | [10] | |
|
422 | 422 | $ log '0:date' |
|
423 | 423 | abort: unknown revision 'date'! |
|
424 | 424 | [255] |
@@ -450,7 +450,7 b' function name should be a symbol' | |||
|
450 | 450 | |
|
451 | 451 | $ log '"date"(2005)' |
|
452 | 452 | hg: parse error: not a symbol |
|
453 |
[ |
|
|
453 | [10] | |
|
454 | 454 | |
|
455 | 455 | keyword arguments |
|
456 | 456 | |
@@ -459,25 +459,25 b' keyword arguments' | |||
|
459 | 459 | |
|
460 | 460 | $ log 'extra(branch, a, b)' |
|
461 | 461 | hg: parse error: extra takes at most 2 positional arguments |
|
462 |
[ |
|
|
462 | [10] | |
|
463 | 463 | $ log 'extra(a, label=b)' |
|
464 | 464 | hg: parse error: extra got multiple values for keyword argument 'label' |
|
465 |
[ |
|
|
465 | [10] | |
|
466 | 466 | $ log 'extra(label=branch, default)' |
|
467 | 467 | hg: parse error: extra got an invalid argument |
|
468 |
[ |
|
|
468 | [10] | |
|
469 | 469 | $ log 'extra(branch, foo+bar=baz)' |
|
470 | 470 | hg: parse error: extra got an invalid argument |
|
471 |
[ |
|
|
471 | [10] | |
|
472 | 472 | $ log 'extra(unknown=branch)' |
|
473 | 473 | hg: parse error: extra got an unexpected keyword argument 'unknown' |
|
474 |
[ |
|
|
474 | [10] | |
|
475 | 475 | $ log 'extra((), x)' |
|
476 | 476 | hg: parse error: first argument to extra must be a string |
|
477 |
[ |
|
|
477 | [10] | |
|
478 | 478 | $ log 'extra(label=x, ())' |
|
479 | 479 | hg: parse error: extra got an invalid argument |
|
480 |
[ |
|
|
480 | [10] | |
|
481 | 481 | |
|
482 | 482 | $ try 'foo=bar|baz' |
|
483 | 483 | (keyvalue |
@@ -487,7 +487,7 b' keyword arguments' | |||
|
487 | 487 | (symbol 'bar') |
|
488 | 488 | (symbol 'baz')))) |
|
489 | 489 | hg: parse error: can't use a key-value pair in this context |
|
490 |
[ |
|
|
490 | [10] | |
|
491 | 491 | |
|
492 | 492 | right-hand side should be optimized recursively |
|
493 | 493 | |
@@ -506,7 +506,7 b' keyword arguments' | |||
|
506 | 506 | (symbol '_notpublic') |
|
507 | 507 | None)) |
|
508 | 508 | hg: parse error: can't use a key-value pair in this context |
|
509 |
[ |
|
|
509 | [10] | |
|
510 | 510 | |
|
511 | 511 | relation-subscript operator has the highest binding strength (as function call): |
|
512 | 512 | |
@@ -565,7 +565,7 b' resolution of subscript and relation-sub' | |||
|
565 | 565 | (symbol 'tip') |
|
566 | 566 | (symbol '0')) |
|
567 | 567 | hg: parse error: can't use a subscript in this context |
|
568 |
[ |
|
|
568 | [10] | |
|
569 | 569 | |
|
570 | 570 | $ hg debugrevspec -p analyzed 'tip#rel[0]' |
|
571 | 571 | * analyzed: |
@@ -574,7 +574,7 b' resolution of subscript and relation-sub' | |||
|
574 | 574 | (symbol 'rel') |
|
575 | 575 | (symbol '0')) |
|
576 | 576 | hg: parse error: unknown identifier: rel |
|
577 |
[ |
|
|
577 | [10] | |
|
578 | 578 | |
|
579 | 579 | $ hg debugrevspec -p analyzed '(tip#rel)[0]' |
|
580 | 580 | * analyzed: |
@@ -584,7 +584,7 b' resolution of subscript and relation-sub' | |||
|
584 | 584 | (symbol 'rel')) |
|
585 | 585 | (symbol '0')) |
|
586 | 586 | hg: parse error: can't use a subscript in this context |
|
587 |
[ |
|
|
587 | [10] | |
|
588 | 588 | |
|
589 | 589 | $ hg debugrevspec -p analyzed 'tip#rel[0][1]' |
|
590 | 590 | * analyzed: |
@@ -595,7 +595,7 b' resolution of subscript and relation-sub' | |||
|
595 | 595 | (symbol '0')) |
|
596 | 596 | (symbol '1')) |
|
597 | 597 | hg: parse error: can't use a subscript in this context |
|
598 |
[ |
|
|
598 | [10] | |
|
599 | 599 | |
|
600 | 600 | $ hg debugrevspec -p analyzed 'tip#rel0#rel1[1]' |
|
601 | 601 | * analyzed: |
@@ -606,7 +606,7 b' resolution of subscript and relation-sub' | |||
|
606 | 606 | (symbol 'rel1') |
|
607 | 607 | (symbol '1')) |
|
608 | 608 | hg: parse error: unknown identifier: rel1 |
|
609 |
[ |
|
|
609 | [10] | |
|
610 | 610 | |
|
611 | 611 | $ hg debugrevspec -p analyzed 'tip#rel0[0]#rel1[1]' |
|
612 | 612 | * analyzed: |
@@ -618,7 +618,7 b' resolution of subscript and relation-sub' | |||
|
618 | 618 | (symbol 'rel1') |
|
619 | 619 | (symbol '1')) |
|
620 | 620 | hg: parse error: unknown identifier: rel1 |
|
621 |
[ |
|
|
621 | [10] | |
|
622 | 622 | |
|
623 | 623 | parse errors of relation, subscript and relation-subscript operators: |
|
624 | 624 | |
@@ -626,48 +626,48 b' parse errors of relation, subscript and ' | |||
|
626 | 626 | hg: parse error at 0: not a prefix: [ |
|
627 | 627 | ([0] |
|
628 | 628 | ^ here) |
|
629 |
[ |
|
|
629 | [10] | |
|
630 | 630 | $ hg debugrevspec '.#' |
|
631 | 631 | hg: parse error at 2: not a prefix: end |
|
632 | 632 | (.# |
|
633 | 633 | ^ here) |
|
634 |
[ |
|
|
634 | [10] | |
|
635 | 635 | $ hg debugrevspec '#rel' |
|
636 | 636 | hg: parse error at 0: not a prefix: # |
|
637 | 637 | (#rel |
|
638 | 638 | ^ here) |
|
639 |
[ |
|
|
639 | [10] | |
|
640 | 640 | $ hg debugrevspec '.#rel[0' |
|
641 | 641 | hg: parse error at 7: unexpected token: end |
|
642 | 642 | (.#rel[0 |
|
643 | 643 | ^ here) |
|
644 |
[ |
|
|
644 | [10] | |
|
645 | 645 | $ hg debugrevspec '.]' |
|
646 | 646 | hg: parse error at 1: invalid token |
|
647 | 647 | (.] |
|
648 | 648 | ^ here) |
|
649 |
[ |
|
|
649 | [10] | |
|
650 | 650 | |
|
651 | 651 | $ hg debugrevspec '.#generations[a]' |
|
652 | 652 | hg: parse error: relation subscript must be an integer or a range |
|
653 |
[ |
|
|
653 | [10] | |
|
654 | 654 | $ hg debugrevspec '.#generations[1-2]' |
|
655 | 655 | hg: parse error: relation subscript must be an integer or a range |
|
656 |
[ |
|
|
656 | [10] | |
|
657 | 657 | $ hg debugrevspec '.#generations[foo:bar]' |
|
658 | 658 | hg: parse error: relation subscript bounds must be integers |
|
659 |
[ |
|
|
659 | [10] | |
|
660 | 660 | |
|
661 | 661 | suggested relations |
|
662 | 662 | |
|
663 | 663 | $ hg debugrevspec '.#generafions[0]' |
|
664 | 664 | hg: parse error: unknown identifier: generafions |
|
665 | 665 | (did you mean generations?) |
|
666 |
[ |
|
|
666 | [10] | |
|
667 | 667 | |
|
668 | 668 | $ hg debugrevspec '.#f[0]' |
|
669 | 669 | hg: parse error: unknown identifier: f |
|
670 |
[ |
|
|
670 | [10] | |
|
671 | 671 | |
|
672 | 672 | parsed tree at stages: |
|
673 | 673 | |
@@ -686,7 +686,7 b' parsed tree at stages:' | |||
|
686 | 686 | * optimized: |
|
687 | 687 | None |
|
688 | 688 | hg: parse error: missing argument |
|
689 |
[ |
|
|
689 | [10] | |
|
690 | 690 | |
|
691 | 691 | $ hg debugrevspec --no-optimized -p all '()' |
|
692 | 692 | * parsed: |
@@ -701,7 +701,7 b' parsed tree at stages:' | |||
|
701 | 701 | * analyzed: |
|
702 | 702 | None |
|
703 | 703 | hg: parse error: missing argument |
|
704 |
[ |
|
|
704 | [10] | |
|
705 | 705 | |
|
706 | 706 | $ hg debugrevspec -p parsed -p analyzed -p optimized '(0|1)-1' |
|
707 | 707 | * parsed: |
@@ -899,7 +899,7 b' infix/suffix resolution of ^ operator (i' | |||
|
899 | 899 | (rangepre |
|
900 | 900 | (symbol '2')))) |
|
901 | 901 | hg: parse error: ^ expects a number 0, 1, or 2 |
|
902 |
[ |
|
|
902 | [10] | |
|
903 | 903 | |
|
904 | 904 | x^:y should be resolved recursively |
|
905 | 905 | |
@@ -1005,7 +1005,7 b' infix/suffix resolution of ^ operator (i' | |||
|
1005 | 1005 | (rangepre |
|
1006 | 1006 | (symbol '2'))) |
|
1007 | 1007 | hg: parse error: ^ expects a number 0, 1, or 2 |
|
1008 |
[ |
|
|
1008 | [10] | |
|
1009 | 1009 | |
|
1010 | 1010 | '::' itself isn't a valid expression |
|
1011 | 1011 | |
@@ -1013,7 +1013,7 b' infix/suffix resolution of ^ operator (i' | |||
|
1013 | 1013 | (dagrangeall |
|
1014 | 1014 | None) |
|
1015 | 1015 | hg: parse error: can't use '::' in this context |
|
1016 |
[ |
|
|
1016 | [10] | |
|
1017 | 1017 | |
|
1018 | 1018 | ancestor can accept 0 or more arguments |
|
1019 | 1019 | |
@@ -1170,10 +1170,10 b' test bad arguments passed to ancestors()' | |||
|
1170 | 1170 | |
|
1171 | 1171 | $ log 'ancestors(., depth=-1)' |
|
1172 | 1172 | hg: parse error: negative depth |
|
1173 |
[ |
|
|
1173 | [10] | |
|
1174 | 1174 | $ log 'ancestors(., depth=foo)' |
|
1175 | 1175 | hg: parse error: ancestors expects an integer depth |
|
1176 |
[ |
|
|
1176 | [10] | |
|
1177 | 1177 | |
|
1178 | 1178 | test descendants |
|
1179 | 1179 | |
@@ -1447,10 +1447,10 b' test author' | |||
|
1447 | 1447 | (symbol 'grep') |
|
1448 | 1448 | (string '(')) |
|
1449 | 1449 | hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re) |
|
1450 |
[ |
|
|
1450 | [10] | |
|
1451 | 1451 | $ log 'desc("re:(")' |
|
1452 | 1452 | hg: parse error: invalid regular expression: (unbalanced parenthesis|missing \),.*) (re) |
|
1453 |
[ |
|
|
1453 | [10] | |
|
1454 | 1454 | $ try 'grep("\bissue\d+")' |
|
1455 | 1455 | (func |
|
1456 | 1456 | (symbol 'grep') |
@@ -1472,7 +1472,7 b' test author' | |||
|
1472 | 1472 | hg: parse error at 7: unterminated string |
|
1473 | 1473 | (grep(r"\") |
|
1474 | 1474 | ^ here) |
|
1475 |
[ |
|
|
1475 | [10] | |
|
1476 | 1476 | $ log 'head()' |
|
1477 | 1477 | 0 |
|
1478 | 1478 | 1 |
@@ -1530,15 +1530,15 b' Test first (=limit) and last' | |||
|
1530 | 1530 | $ log 'limit(author("re:bob|test"), offset=10)' |
|
1531 | 1531 | $ log 'limit(all(), 1, -1)' |
|
1532 | 1532 | hg: parse error: negative offset |
|
1533 |
[ |
|
|
1533 | [10] | |
|
1534 | 1534 | $ log 'limit(all(), -1)' |
|
1535 | 1535 | hg: parse error: negative number to select |
|
1536 |
[ |
|
|
1536 | [10] | |
|
1537 | 1537 | $ log 'limit(all(), 0)' |
|
1538 | 1538 | |
|
1539 | 1539 | $ log 'last(all(), -1)' |
|
1540 | 1540 | hg: parse error: negative number to select |
|
1541 |
[ |
|
|
1541 | [10] | |
|
1542 | 1542 | $ log 'last(all(), 0)' |
|
1543 | 1543 | $ log 'last(all(), 1)' |
|
1544 | 1544 | 9 |
@@ -1861,7 +1861,7 b' Test explicit numeric revision' | |||
|
1861 | 1861 | $ log 'rev(10)' |
|
1862 | 1862 | $ log 'rev(tip)' |
|
1863 | 1863 | hg: parse error: rev expects a number |
|
1864 |
[ |
|
|
1864 | [10] | |
|
1865 | 1865 | |
|
1866 | 1866 | Test hexadecimal revision |
|
1867 | 1867 | $ log 'id(2)' |
@@ -1965,7 +1965,7 b' Test working-directory revision' | |||
|
1965 | 1965 | $ hg debugrevspec 'wdir()^2' |
|
1966 | 1966 | $ hg debugrevspec 'wdir()^3' |
|
1967 | 1967 | hg: parse error: ^ expects a number 0, 1, or 2 |
|
1968 |
[ |
|
|
1968 | [10] | |
|
1969 | 1969 | For tests consistency |
|
1970 | 1970 | $ hg up 9 |
|
1971 | 1971 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -2532,10 +2532,10 b' ordering defined by it.' | |||
|
2532 | 2532 | |
|
2533 | 2533 | $ log '0:2 & sort()' |
|
2534 | 2534 | hg: parse error: sort requires one or two arguments |
|
2535 |
[ |
|
|
2535 | [10] | |
|
2536 | 2536 | $ log '0:2 & sort(all(), -invalid)' |
|
2537 | 2537 | hg: parse error: unknown sort key '-invalid' |
|
2538 |
[ |
|
|
2538 | [10] | |
|
2539 | 2539 | |
|
2540 | 2540 | for 'A & f(B)', 'B' should not be affected by the order of 'A': |
|
2541 | 2541 | |
@@ -2762,7 +2762,7 b' test invalid sort keys' | |||
|
2762 | 2762 | |
|
2763 | 2763 | $ log 'sort(all(), -invalid)' |
|
2764 | 2764 | hg: parse error: unknown sort key '-invalid' |
|
2765 |
[ |
|
|
2765 | [10] | |
|
2766 | 2766 | |
|
2767 | 2767 | $ cd .. |
|
2768 | 2768 | |
@@ -2980,11 +2980,11 b' use the topo.firstbranch option when top' | |||
|
2980 | 2980 | |
|
2981 | 2981 | $ hg log -r 'sort(all(), "topo user")' |
|
2982 | 2982 | hg: parse error: topo sort order cannot be combined with other sort keys |
|
2983 |
[ |
|
|
2983 | [10] | |
|
2984 | 2984 | |
|
2985 | 2985 | $ hg log -r 'sort(all(), user, topo.firstbranch=book1)' |
|
2986 | 2986 | hg: parse error: topo.firstbranch can only be used when using the topo sort key |
|
2987 |
[ |
|
|
2987 | [10] | |
|
2988 | 2988 | |
|
2989 | 2989 | topo.firstbranch should accept any kind of expressions: |
|
2990 | 2990 | |
@@ -3003,7 +3003,7 b' test multiline revset with errors' | |||
|
3003 | 3003 | hg: parse error at 9: not a prefix: end |
|
3004 | 3004 | ( . + .^ + |
|
3005 | 3005 | ^ here) |
|
3006 |
[ |
|
|
3006 | [10] | |
|
3007 | 3007 | $ hg debugrevspec -v 'revset(first(rev(0)))' -p all |
|
3008 | 3008 | * parsed: |
|
3009 | 3009 | (func |
@@ -3052,10 +3052,10 b' test multiline revset with errors' | |||
|
3052 | 3052 | abort if the revset doesn't expect given size |
|
3053 | 3053 | $ log 'expectsize()' |
|
3054 | 3054 | hg: parse error: invalid set of arguments |
|
3055 |
[ |
|
|
3055 | [10] | |
|
3056 | 3056 | $ log 'expectsize(0:2, a)' |
|
3057 | 3057 | hg: parse error: expectsize requires a size range or a positive integer |
|
3058 |
[ |
|
|
3058 | [10] | |
|
3059 | 3059 | $ log 'expectsize(0:2, 3)' |
|
3060 | 3060 | 0 |
|
3061 | 3061 | 1 |
@@ -3070,7 +3070,7 b" abort if the revset doesn't expect given" | |||
|
3070 | 3070 | [255] |
|
3071 | 3071 | $ log 'expectsize(0:4, -1)' |
|
3072 | 3072 | hg: parse error: negative size |
|
3073 |
[ |
|
|
3073 | [10] | |
|
3074 | 3074 | $ log 'expectsize(0:2, 2:4)' |
|
3075 | 3075 | 0 |
|
3076 | 3076 | 1 |
@@ -3080,16 +3080,16 b" abort if the revset doesn't expect given" | |||
|
3080 | 3080 | [255] |
|
3081 | 3081 | $ log 'expectsize(0:1, -1:2)' |
|
3082 | 3082 | hg: parse error: negative size |
|
3083 |
[ |
|
|
3083 | [10] | |
|
3084 | 3084 | $ log 'expectsize(0:1, 1:-2)' |
|
3085 | 3085 | hg: parse error: negative size |
|
3086 |
[ |
|
|
3086 | [10] | |
|
3087 | 3087 | $ log 'expectsize(0:2, a:4)' |
|
3088 | 3088 | hg: parse error: size range bounds must be integers |
|
3089 |
[ |
|
|
3089 | [10] | |
|
3090 | 3090 | $ log 'expectsize(0:2, 2:b)' |
|
3091 | 3091 | hg: parse error: size range bounds must be integers |
|
3092 |
[ |
|
|
3092 | [10] | |
|
3093 | 3093 | $ log 'expectsize(0:2, 2:)' |
|
3094 | 3094 | 0 |
|
3095 | 3095 | 1 |
@@ -346,7 +346,7 b" test ',' in `_list`" | |||
|
346 | 346 | $ log '0,1' |
|
347 | 347 | hg: parse error: can't use a list in this context |
|
348 | 348 | (see 'hg help "revsets.x or y"') |
|
349 |
[ |
|
|
349 | [10] | |
|
350 | 350 | $ try '0,1,2' |
|
351 | 351 | (list |
|
352 | 352 | (symbol '0') |
@@ -354,7 +354,7 b" test ',' in `_list`" | |||
|
354 | 354 | (symbol '2')) |
|
355 | 355 | hg: parse error: can't use a list in this context |
|
356 | 356 | (see 'hg help "revsets.x or y"') |
|
357 |
[ |
|
|
357 | [10] | |
|
358 | 358 | |
|
359 | 359 | test that chained `or` operations make balanced addsets |
|
360 | 360 | |
@@ -407,7 +407,7 b' no crash by empty group "()" while optim' | |||
|
407 | 407 | (symbol '0') |
|
408 | 408 | None)) |
|
409 | 409 | hg: parse error: missing argument |
|
410 |
[ |
|
|
410 | [10] | |
|
411 | 411 | |
|
412 | 412 | test that chained `or` operations never eat up stack (issue4624) |
|
413 | 413 | (uses `0:1` instead of `0` to avoid future optimization of trivial revisions) |
@@ -510,7 +510,7 b' no crash by empty group "()" while optim' | |||
|
510 | 510 | (symbol '1')) |
|
511 | 511 | None) |
|
512 | 512 | hg: parse error: missing argument |
|
513 |
[ |
|
|
513 | [10] | |
|
514 | 514 | |
|
515 | 515 | optimization to only() works only if ancestors() takes only one argument |
|
516 | 516 | |
@@ -568,20 +568,20 b' invalid function call should not be opti' | |||
|
568 | 568 | |
|
569 | 569 | $ log '"ancestors"(6) and not ancestors(4)' |
|
570 | 570 | hg: parse error: not a symbol |
|
571 |
[ |
|
|
571 | [10] | |
|
572 | 572 | |
|
573 | 573 | $ log 'ancestors(6) and not "ancestors"(4)' |
|
574 | 574 | hg: parse error: not a symbol |
|
575 |
[ |
|
|
575 | [10] | |
|
576 | 576 | |
|
577 | 577 | test empty string |
|
578 | 578 | |
|
579 | 579 | $ log '' |
|
580 | 580 | hg: parse error: empty query |
|
581 |
[ |
|
|
581 | [10] | |
|
582 | 582 | $ log 'parents("")' |
|
583 | 583 | hg: parse error: empty string is not a valid revision |
|
584 |
[ |
|
|
584 | [10] | |
|
585 | 585 | |
|
586 | 586 | test empty revset |
|
587 | 587 | $ hg log 'none()' |
@@ -701,7 +701,7 b' issue2654: report a parse error if the r' | |||
|
701 | 701 | hg: parse error at 2: invalid token |
|
702 | 702 | (1 OR 2 |
|
703 | 703 | ^ here) |
|
704 |
[ |
|
|
704 | [10] | |
|
705 | 705 | |
|
706 | 706 | or operator should preserve ordering: |
|
707 | 707 | $ log 'reverse(2::4) or tip' |
@@ -755,7 +755,7 b' parentrevspec' | |||
|
755 | 755 | |
|
756 | 756 | $ log 'tip^foo' |
|
757 | 757 | hg: parse error: ^ expects a number 0, 1, or 2 |
|
758 |
[ |
|
|
758 | [10] | |
|
759 | 759 | |
|
760 | 760 | $ log 'branchpoint()~-1' |
|
761 | 761 | abort: revision in set has more than one child! |
@@ -765,29 +765,29 b' Bogus function gets suggestions' | |||
|
765 | 765 | $ log 'add()' |
|
766 | 766 | hg: parse error: unknown identifier: add |
|
767 | 767 | (did you mean adds?) |
|
768 |
[ |
|
|
768 | [10] | |
|
769 | 769 | $ log 'added()' |
|
770 | 770 | hg: parse error: unknown identifier: added |
|
771 | 771 | (did you mean adds?) |
|
772 |
[ |
|
|
772 | [10] | |
|
773 | 773 | $ log 'remo()' |
|
774 | 774 | hg: parse error: unknown identifier: remo |
|
775 | 775 | (did you mean one of remote, removes?) |
|
776 |
[ |
|
|
776 | [10] | |
|
777 | 777 | $ log 'babar()' |
|
778 | 778 | hg: parse error: unknown identifier: babar |
|
779 |
[ |
|
|
779 | [10] | |
|
780 | 780 | |
|
781 | 781 | Bogus function with a similar internal name doesn't suggest the internal name |
|
782 | 782 | $ log 'matches()' |
|
783 | 783 | hg: parse error: unknown identifier: matches |
|
784 | 784 | (did you mean matching?) |
|
785 |
[ |
|
|
785 | [10] | |
|
786 | 786 | |
|
787 | 787 | Undocumented functions aren't suggested as similar either |
|
788 | 788 | $ log 'tagged2()' |
|
789 | 789 | hg: parse error: unknown identifier: tagged2 |
|
790 |
[ |
|
|
790 | [10] | |
|
791 | 791 | |
|
792 | 792 | multiple revspecs |
|
793 | 793 | |
@@ -949,7 +949,7 b' test infinite recursion' | |||
|
949 | 949 | $ try recurse1 |
|
950 | 950 | (symbol 'recurse1') |
|
951 | 951 | hg: parse error: infinite expansion of revset alias "recurse1" detected |
|
952 |
[ |
|
|
952 | [10] | |
|
953 | 953 | |
|
954 | 954 | $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc |
|
955 | 955 | $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc |
@@ -1185,13 +1185,13 b' test unknown reference:' | |||
|
1185 | 1185 | (symbol 'rs') |
|
1186 | 1186 | None) |
|
1187 | 1187 | hg: parse error: invalid number of arguments: 0 |
|
1188 |
[ |
|
|
1188 | [10] | |
|
1189 | 1189 | $ try 'rs(2)' |
|
1190 | 1190 | (func |
|
1191 | 1191 | (symbol 'rs') |
|
1192 | 1192 | (symbol '2')) |
|
1193 | 1193 | hg: parse error: invalid number of arguments: 1 |
|
1194 |
[ |
|
|
1194 | [10] | |
|
1195 | 1195 | $ try 'rs(2, data, 7)' |
|
1196 | 1196 | (func |
|
1197 | 1197 | (symbol 'rs') |
@@ -1200,7 +1200,7 b' test unknown reference:' | |||
|
1200 | 1200 | (symbol 'data') |
|
1201 | 1201 | (symbol '7'))) |
|
1202 | 1202 | hg: parse error: invalid number of arguments: 3 |
|
1203 |
[ |
|
|
1203 | [10] | |
|
1204 | 1204 | $ try 'rs4(2 or 3, x, x, date)' |
|
1205 | 1205 | (func |
|
1206 | 1206 | (symbol 'rs4') |
@@ -1575,7 +1575,7 b' test error message of bad revset' | |||
|
1575 | 1575 | hg: parse error at 3: syntax error in revset 'foo\\' |
|
1576 | 1576 | (foo\\ |
|
1577 | 1577 | ^ here) |
|
1578 |
[ |
|
|
1578 | [10] | |
|
1579 | 1579 | |
|
1580 | 1580 | $ cd .. |
|
1581 | 1581 | |
@@ -1603,7 +1603,7 b' loading it' | |||
|
1603 | 1603 | $ hg debugrevspec "custom1()" |
|
1604 | 1604 | *** failed to import extension custompredicate from $TESTTMP/custompredicate.py: intentional failure of loading extension |
|
1605 | 1605 | hg: parse error: unknown identifier: custom1 |
|
1606 |
[ |
|
|
1606 | [10] | |
|
1607 | 1607 | |
|
1608 | 1608 | Test repo.anyrevs with customized revset overrides |
|
1609 | 1609 |
@@ -139,7 +139,7 b' But negate binds closer still:' | |||
|
139 | 139 | * keywords: |
|
140 | 140 | * functions: stringify |
|
141 | 141 | hg: parse error: arithmetic only defined on integers |
|
142 |
[ |
|
|
142 | [10] | |
|
143 | 143 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' |
|
144 | 144 | (template |
|
145 | 145 | (| |
@@ -179,7 +179,7 b' Keyword arguments:' | |||
|
179 | 179 | * keywords: bar, foo |
|
180 | 180 | * functions: baz |
|
181 | 181 | hg: parse error: can't use a key-value pair in this context |
|
182 |
[ |
|
|
182 | [10] | |
|
183 | 183 | |
|
184 | 184 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
185 | 185 | foo |
@@ -190,7 +190,7 b' Call function which takes named argument' | |||
|
190 | 190 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
191 | 191 | hg: parse error: can't use a list in this context |
|
192 | 192 | (check place of comma and parens) |
|
193 |
[ |
|
|
193 | [10] | |
|
194 | 194 | |
|
195 | 195 | Second branch starting at nullrev: |
|
196 | 196 | |
@@ -307,34 +307,34 b' Error on syntax:' | |||
|
307 | 307 | $ echo 'style = t' >> .hg/hgrc |
|
308 | 308 | $ hg log |
|
309 | 309 | hg: parse error at t:3: unmatched quotes |
|
310 |
[ |
|
|
310 | [10] | |
|
311 | 311 | |
|
312 | 312 | $ hg log -T '{date' |
|
313 | 313 | hg: parse error at 1: unterminated template expansion |
|
314 | 314 | ({date |
|
315 | 315 | ^ here) |
|
316 |
[ |
|
|
316 | [10] | |
|
317 | 317 | $ hg log -T '{date(}' |
|
318 | 318 | hg: parse error at 6: not a prefix: end |
|
319 | 319 | ({date(} |
|
320 | 320 | ^ here) |
|
321 |
[ |
|
|
321 | [10] | |
|
322 | 322 | $ hg log -T '{date)}' |
|
323 | 323 | hg: parse error at 5: invalid token |
|
324 | 324 | ({date)} |
|
325 | 325 | ^ here) |
|
326 |
[ |
|
|
326 | [10] | |
|
327 | 327 | $ hg log -T '{date date}' |
|
328 | 328 | hg: parse error at 6: invalid token |
|
329 | 329 | ({date date} |
|
330 | 330 | ^ here) |
|
331 |
[ |
|
|
331 | [10] | |
|
332 | 332 | |
|
333 | 333 | $ hg log -T '{}' |
|
334 | 334 | hg: parse error at 1: not a prefix: end |
|
335 | 335 | ({} |
|
336 | 336 | ^ here) |
|
337 |
[ |
|
|
337 | [10] | |
|
338 | 338 | $ hg debugtemplate -v '{()}' |
|
339 | 339 | (template |
|
340 | 340 | (group |
@@ -342,7 +342,7 b' Error on syntax:' | |||
|
342 | 342 | * keywords: |
|
343 | 343 | * functions: |
|
344 | 344 | hg: parse error: missing argument |
|
345 |
[ |
|
|
345 | [10] | |
|
346 | 346 | |
|
347 | 347 | Behind the scenes, this would throw TypeError without intype=bytes |
|
348 | 348 | |
@@ -356,7 +356,7 b' Behind the scenes, this will throw a Val' | |||
|
356 | 356 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
357 | 357 | hg: parse error: invalid date: 'Modify, add, remove, rename' |
|
358 | 358 | (template filter 'shortdate' is not compatible with keyword 'desc') |
|
359 |
[ |
|
|
359 | [10] | |
|
360 | 360 | |
|
361 | 361 | Behind the scenes, this would throw AttributeError without intype=bytes |
|
362 | 362 | |
@@ -367,23 +367,23 b' Behind the scenes, this would throw Attr' | |||
|
367 | 367 | |
|
368 | 368 | $ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
369 | 369 | hg: parse error: localdate expects a date information |
|
370 |
[ |
|
|
370 | [10] | |
|
371 | 371 | |
|
372 | 372 | Behind the scenes, this will throw ValueError |
|
373 | 373 | |
|
374 | 374 | $ hg tip --template '{author|email|date}\n' |
|
375 | 375 | hg: parse error: date expects a date information |
|
376 |
[ |
|
|
376 | [10] | |
|
377 | 377 | |
|
378 | 378 | $ hg tip -T '{author|email|shortdate}\n' |
|
379 | 379 | hg: parse error: invalid date: 'test' |
|
380 | 380 | (template filter 'shortdate' is not compatible with keyword 'author') |
|
381 |
[ |
|
|
381 | [10] | |
|
382 | 382 | |
|
383 | 383 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
384 | 384 | hg: parse error: invalid date: 'default' |
|
385 | 385 | (incompatible use of template filter 'shortdate') |
|
386 |
[ |
|
|
386 | [10] | |
|
387 | 387 | |
|
388 | 388 | Error in nested template: |
|
389 | 389 | |
@@ -391,19 +391,19 b' Error in nested template:' | |||
|
391 | 391 | hg: parse error at 2: unterminated string |
|
392 | 392 | ({"date |
|
393 | 393 | ^ here) |
|
394 |
[ |
|
|
394 | [10] | |
|
395 | 395 | |
|
396 | 396 | $ hg log -T '{"foo{date|?}"}' |
|
397 | 397 | hg: parse error at 11: syntax error |
|
398 | 398 | ({"foo{date|?}"} |
|
399 | 399 | ^ here) |
|
400 |
[ |
|
|
400 | [10] | |
|
401 | 401 | |
|
402 | 402 | Thrown an error if a template function doesn't exist |
|
403 | 403 | |
|
404 | 404 | $ hg tip --template '{foo()}\n' |
|
405 | 405 | hg: parse error: unknown function 'foo' |
|
406 |
[ |
|
|
406 | [10] | |
|
407 | 407 | |
|
408 | 408 | $ cd .. |
|
409 | 409 | |
@@ -453,13 +453,13 b' Test new-style inline templating:' | |||
|
453 | 453 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
454 | 454 | hg: parse error: 11 is not iterable of mappings |
|
455 | 455 | (keyword 'rev' does not support map operation) |
|
456 |
[ |
|
|
456 | [10] | |
|
457 | 457 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
458 | 458 | hg: parse error: None is not iterable of mappings |
|
459 |
[ |
|
|
459 | [10] | |
|
460 | 460 | $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}' |
|
461 | 461 | hg: parse error: list of strings is not mappable |
|
462 |
[ |
|
|
462 | [10] | |
|
463 | 463 | |
|
464 | 464 | Test new-style inline templating of non-list/dict type: |
|
465 | 465 | |
@@ -474,7 +474,7 b' Test new-style inline templating of non-' | |||
|
474 | 474 | branch: default |
|
475 | 475 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}' |
|
476 | 476 | hg: parse error: None is not iterable of mappings |
|
477 |
[ |
|
|
477 | [10] | |
|
478 | 478 | $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}' |
|
479 | 479 | branch: default |
|
480 | 480 | $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}' |
@@ -506,7 +506,7 b' Test dot operator precedence:' | |||
|
506 | 506 | (symbol 'bar') |
|
507 | 507 | (symbol 'baz'))) |
|
508 | 508 | (string '\n')) |
|
509 |
[ |
|
|
509 | [10] | |
|
510 | 510 | $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null |
|
511 | 511 | (template |
|
512 | 512 | (. |
@@ -517,7 +517,7 b' Test dot operator precedence:' | |||
|
517 | 517 | (string '\n')) |
|
518 | 518 | * keywords: foo |
|
519 | 519 | * functions: bar |
|
520 |
[ |
|
|
520 | [10] | |
|
521 | 521 | |
|
522 | 522 | Test evaluation of dot operator: |
|
523 | 523 | |
@@ -531,10 +531,10 b' Test evaluation of dot operator:' | |||
|
531 | 531 | $ hg log -R latesttag -l1 -T '{author.invalid}\n' |
|
532 | 532 | hg: parse error: 'test' is not a dictionary |
|
533 | 533 | (keyword 'author' does not support member operation) |
|
534 |
[ |
|
|
534 | [10] | |
|
535 | 535 | $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n' |
|
536 | 536 | hg: parse error: 'a' is not a dictionary |
|
537 |
[ |
|
|
537 | [10] | |
|
538 | 538 | |
|
539 | 539 | Test integer literal: |
|
540 | 540 | |
@@ -567,10 +567,10 b' Test integer literal:' | |||
|
567 | 567 | hg: parse error at 3: not a prefix: ) |
|
568 | 568 | ({(-)}\n |
|
569 | 569 | ^ here) |
|
570 |
[ |
|
|
570 | [10] | |
|
571 | 571 | $ hg debugtemplate '{(-a)}\n' |
|
572 | 572 | hg: parse error: negation needs an integer argument |
|
573 |
[ |
|
|
573 | [10] | |
|
574 | 574 | |
|
575 | 575 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
576 | 576 | |
@@ -607,10 +607,10 b' unless explicit symbol is expected:' | |||
|
607 | 607 | |
|
608 | 608 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
609 | 609 | hg: parse error: expected a symbol, got 'integer' |
|
610 |
[ |
|
|
610 | [10] | |
|
611 | 611 | $ hg log -Ra -r0 -T '{1()}\n' |
|
612 | 612 | hg: parse error: expected a symbol, got 'integer' |
|
613 |
[ |
|
|
613 | [10] | |
|
614 | 614 | |
|
615 | 615 | Test string literal: |
|
616 | 616 | |
@@ -748,13 +748,13 b' escaped single quotes and errors:' | |||
|
748 | 748 | hg: parse error at 21: unterminated string |
|
749 | 749 | ({if(rev, "{if(rev, \")}")}\n |
|
750 | 750 | ^ here) |
|
751 |
[ |
|
|
751 | [10] | |
|
752 | 752 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
753 | 753 | hg: parse error: trailing \ in string |
|
754 |
[ |
|
|
754 | [10] | |
|
755 | 755 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
756 | 756 | hg: parse error: trailing \ in string |
|
757 |
[ |
|
|
757 | [10] | |
|
758 | 758 | |
|
759 | 759 | $ cd .. |
|
760 | 760 | |
@@ -900,7 +900,7 b' Test recursive evaluation:' | |||
|
900 | 900 | text.1:wrapped (no-eol) |
|
901 | 901 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
902 | 902 | hg: parse error: fill expects an integer width |
|
903 |
[ |
|
|
903 | [10] | |
|
904 | 904 | |
|
905 | 905 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
906 | 906 | {node|short} (no-eol) |
@@ -926,16 +926,16 b' Test bad template with better error mess' | |||
|
926 | 926 | |
|
927 | 927 | $ hg log -Gv -R a --template '{desc|user()}' |
|
928 | 928 | hg: parse error: expected a symbol, got 'func' |
|
929 |
[ |
|
|
929 | [10] | |
|
930 | 930 | |
|
931 | 931 | Test broken string escapes: |
|
932 | 932 | |
|
933 | 933 | $ hg log -T "bogus\\" -R a |
|
934 | 934 | hg: parse error: trailing \ in string |
|
935 |
[ |
|
|
935 | [10] | |
|
936 | 936 | $ hg log -T "\\xy" -R a |
|
937 | 937 | hg: parse error: invalid \x escape* (glob) |
|
938 |
[ |
|
|
938 | [10] | |
|
939 | 939 | |
|
940 | 940 | Templater supports aliases of symbol and func() styles: |
|
941 | 941 |
@@ -240,7 +240,7 b' commondir() filter:' | |||
|
240 | 240 | $ hg log -r null -T '{rev|commondir}' |
|
241 | 241 | hg: parse error: argument is not a list of text |
|
242 | 242 | (template filter 'commondir' is not compatible with keyword 'rev') |
|
243 |
[ |
|
|
243 | [10] | |
|
244 | 244 | |
|
245 | 245 | Add a dummy commit to make up for the instability of the above: |
|
246 | 246 | |
@@ -283,7 +283,7 b' Count filter:' | |||
|
283 | 283 | $ hg log -l1 -T '{termwidth|count}\n' |
|
284 | 284 | hg: parse error: not countable |
|
285 | 285 | (template filter 'count' is not compatible with keyword 'termwidth') |
|
286 |
[ |
|
|
286 | [10] | |
|
287 | 287 | |
|
288 | 288 | Upper/lower filters: |
|
289 | 289 | |
@@ -478,25 +478,25 b' Test filter() unsupported arguments:' | |||
|
478 | 478 | |
|
479 | 479 | $ hg log -R a -r 0 -T '{filter()}\n' |
|
480 | 480 | hg: parse error: filter expects one or two arguments |
|
481 |
[ |
|
|
481 | [10] | |
|
482 | 482 | $ hg log -R a -r 0 -T '{filter(date)}\n' |
|
483 | 483 | hg: parse error: date is not iterable |
|
484 |
[ |
|
|
484 | [10] | |
|
485 | 485 | $ hg log -R a -r 0 -T '{filter(rev)}\n' |
|
486 | 486 | hg: parse error: 0 is not iterable |
|
487 |
[ |
|
|
487 | [10] | |
|
488 | 488 | $ hg log -R a -r 0 -T '{filter(desc|firstline)}\n' |
|
489 | 489 | hg: parse error: 'line 1' is not filterable |
|
490 |
[ |
|
|
490 | [10] | |
|
491 | 491 | $ hg log -R a -r 0 -T '{filter(manifest)}\n' |
|
492 | 492 | hg: parse error: '0:a0c8bcbbb45c' is not filterable |
|
493 |
[ |
|
|
493 | [10] | |
|
494 | 494 | $ hg log -R a -r 0 -T '{filter(succsandmarkers)}\n' |
|
495 | 495 | hg: parse error: not filterable without template |
|
496 |
[ |
|
|
496 | [10] | |
|
497 | 497 | $ hg log -R a -r 0 -T '{filter(desc|splitlines % "{line}", "")}\n' |
|
498 | 498 | hg: parse error: not filterable by expression |
|
499 |
[ |
|
|
499 | [10] | |
|
500 | 500 | |
|
501 | 501 | Test manifest/get() can be join()-ed as string, though it's silly: |
|
502 | 502 | |
@@ -514,7 +514,7 b' Test join() over uniterable' | |||
|
514 | 514 | |
|
515 | 515 | $ hg log -R latesttag -r tip -T '{join(rev, "")}\n' |
|
516 | 516 | hg: parse error: 11 is not iterable |
|
517 |
[ |
|
|
517 | [10] | |
|
518 | 518 | |
|
519 | 519 | Test min/max of integers |
|
520 | 520 | |
@@ -542,47 +542,47 b' Test min/max of non-iterable:' | |||
|
542 | 542 | $ hg debugtemplate '{min(1)}' |
|
543 | 543 | hg: parse error: 1 is not iterable |
|
544 | 544 | (min first argument should be an iterable) |
|
545 |
[ |
|
|
545 | [10] | |
|
546 | 546 | $ hg debugtemplate '{max(2)}' |
|
547 | 547 | hg: parse error: 2 is not iterable |
|
548 | 548 | (max first argument should be an iterable) |
|
549 |
[ |
|
|
549 | [10] | |
|
550 | 550 | |
|
551 | 551 | $ hg log -R latesttag -l1 -T '{min(date)}' |
|
552 | 552 | hg: parse error: date is not iterable |
|
553 | 553 | (min first argument should be an iterable) |
|
554 |
[ |
|
|
554 | [10] | |
|
555 | 555 | $ hg log -R latesttag -l1 -T '{max(date)}' |
|
556 | 556 | hg: parse error: date is not iterable |
|
557 | 557 | (max first argument should be an iterable) |
|
558 |
[ |
|
|
558 | [10] | |
|
559 | 559 | |
|
560 | 560 | Test min/max of empty sequence: |
|
561 | 561 | |
|
562 | 562 | $ hg debugtemplate '{min("")}' |
|
563 | 563 | hg: parse error: empty string |
|
564 | 564 | (min first argument should be an iterable) |
|
565 |
[ |
|
|
565 | [10] | |
|
566 | 566 | $ hg debugtemplate '{max("")}' |
|
567 | 567 | hg: parse error: empty string |
|
568 | 568 | (max first argument should be an iterable) |
|
569 |
[ |
|
|
569 | [10] | |
|
570 | 570 | $ hg debugtemplate '{min(dict())}' |
|
571 | 571 | hg: parse error: empty sequence |
|
572 | 572 | (min first argument should be an iterable) |
|
573 |
[ |
|
|
573 | [10] | |
|
574 | 574 | $ hg debugtemplate '{max(dict())}' |
|
575 | 575 | hg: parse error: empty sequence |
|
576 | 576 | (max first argument should be an iterable) |
|
577 |
[ |
|
|
577 | [10] | |
|
578 | 578 | $ hg debugtemplate '{min(dict() % "")}' |
|
579 | 579 | hg: parse error: empty sequence |
|
580 | 580 | (min first argument should be an iterable) |
|
581 |
[ |
|
|
581 | [10] | |
|
582 | 582 | $ hg debugtemplate '{max(dict() % "")}' |
|
583 | 583 | hg: parse error: empty sequence |
|
584 | 584 | (max first argument should be an iterable) |
|
585 |
[ |
|
|
585 | [10] | |
|
586 | 586 | |
|
587 | 587 | Test min/max of if() result |
|
588 | 588 | |
@@ -606,7 +606,7 b' Test laziness of if() then/else clause' | |||
|
606 | 606 | $ hg debugtemplate '{count(0)}' |
|
607 | 607 | hg: parse error: not countable |
|
608 | 608 | (incompatible use of template filter 'count') |
|
609 |
[ |
|
|
609 | [10] | |
|
610 | 610 | $ hg debugtemplate '{if(true, "", count(0))}' |
|
611 | 611 | $ hg debugtemplate '{if(false, count(0), "")}' |
|
612 | 612 | $ hg debugtemplate '{ifcontains("a", "aa", "", count(0))}' |
@@ -654,10 +654,10 b' Test search() function:' | |||
|
654 | 654 | |
|
655 | 655 | $ hg log -R a -r2 -T '{search(r"(?P<0>.)", desc) % "{0}"}\n' |
|
656 | 656 | hg: parse error: search got an invalid pattern: (?P<0>.) |
|
657 |
[ |
|
|
657 | [10] | |
|
658 | 658 | $ hg log -R a -r2 -T '{search(r"(?P<repo>.)", desc) % "{repo}"}\n' |
|
659 | 659 | hg: parse error: invalid group 'repo' in search pattern: (?P<repo>.) |
|
660 |
[ |
|
|
660 | [10] | |
|
661 | 661 | |
|
662 | 662 | Test the sub function of templating for expansion: |
|
663 | 663 | |
@@ -666,10 +666,10 b' Test the sub function of templating for ' | |||
|
666 | 666 | |
|
667 | 667 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
668 | 668 | hg: parse error: sub got an invalid pattern: [ |
|
669 |
[ |
|
|
669 | [10] | |
|
670 | 670 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
671 | 671 | hg: parse error: sub got an invalid replacement: \1 |
|
672 |
[ |
|
|
672 | [10] | |
|
673 | 673 | |
|
674 | 674 | Test the strip function with chars specified: |
|
675 | 675 | |
@@ -721,7 +721,7 b' Test invalid date:' | |||
|
721 | 721 | |
|
722 | 722 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
723 | 723 | hg: parse error: date expects a date information |
|
724 |
[ |
|
|
724 | [10] | |
|
725 | 725 | |
|
726 | 726 | Set up repository containing template fragments in commit metadata: |
|
727 | 727 | |
@@ -789,17 +789,17 b' Test dict constructor:' | |||
|
789 | 789 | |
|
790 | 790 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
791 | 791 | hg: parse error: duplicated dict key 'rev' inferred |
|
792 |
[ |
|
|
792 | [10] | |
|
793 | 793 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
794 | 794 | hg: parse error: duplicated dict key 'node' inferred |
|
795 |
[ |
|
|
795 | [10] | |
|
796 | 796 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
797 | 797 | hg: parse error: dict key cannot be inferred |
|
798 |
[ |
|
|
798 | [10] | |
|
799 | 799 | |
|
800 | 800 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
801 | 801 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
802 |
[ |
|
|
802 | [10] | |
|
803 | 803 | |
|
804 | 804 | Test get function: |
|
805 | 805 | |
@@ -810,7 +810,7 b' Test get function:' | |||
|
810 | 810 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
811 | 811 | hg: parse error: not a dictionary |
|
812 | 812 | (get() expects a dict as first argument) |
|
813 |
[ |
|
|
813 | [10] | |
|
814 | 814 | |
|
815 | 815 | Test json filter applied to wrapped object: |
|
816 | 816 | |
@@ -836,7 +836,7 b' Test localdate(date, tz) function:' | |||
|
836 | 836 | 1970-01-01 00:00 +0000 |
|
837 | 837 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
838 | 838 | hg: parse error: localdate expects a timezone |
|
839 |
[ |
|
|
839 | [10] | |
|
840 | 840 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
841 | 841 | 1970-01-01 02:00 +0200 |
|
842 | 842 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
@@ -845,10 +845,10 b' Test localdate(date, tz) function:' | |||
|
845 | 845 | 1970-01-01 00:00 +0000 |
|
846 | 846 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
847 | 847 | hg: parse error: localdate expects a timezone |
|
848 |
[ |
|
|
848 | [10] | |
|
849 | 849 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
850 | 850 | hg: parse error: localdate expects a timezone |
|
851 |
[ |
|
|
851 | [10] | |
|
852 | 852 | |
|
853 | 853 | Test shortest(node) function: |
|
854 | 854 | |
@@ -871,7 +871,7 b' Test shortest(node) function:' | |||
|
871 | 871 | f7769ec2ab |
|
872 | 872 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
873 | 873 | hg: parse error: shortest() expects an integer minlength |
|
874 |
[ |
|
|
874 | [10] | |
|
875 | 875 | |
|
876 | 876 | $ hg log -r 'wdir()' -T '{node|shortest}\n' |
|
877 | 877 | ffff |
@@ -1070,16 +1070,16 b' Test width argument passed to pad functi' | |||
|
1070 | 1070 | 0 test |
|
1071 | 1071 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
1072 | 1072 | hg: parse error: pad() expects an integer width |
|
1073 |
[ |
|
|
1073 | [10] | |
|
1074 | 1074 | |
|
1075 | 1075 | Test invalid fillchar passed to pad function |
|
1076 | 1076 | |
|
1077 | 1077 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
1078 | 1078 | hg: parse error: pad() expects a single fill character |
|
1079 |
[ |
|
|
1079 | [10] | |
|
1080 | 1080 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
1081 | 1081 | hg: parse error: pad() expects a single fill character |
|
1082 |
[ |
|
|
1082 | [10] | |
|
1083 | 1083 | |
|
1084 | 1084 | Test boolean argument passed to pad function |
|
1085 | 1085 | |
@@ -1304,50 +1304,50 b' Invalid arguments passed to revset()' | |||
|
1304 | 1304 | |
|
1305 | 1305 | $ hg log -T '{revset("%whatever", 0)}\n' |
|
1306 | 1306 | hg: parse error: unexpected revspec format character w |
|
1307 |
[ |
|
|
1307 | [10] | |
|
1308 | 1308 | $ hg log -T '{revset("%lwhatever", files)}\n' |
|
1309 | 1309 | hg: parse error: unexpected revspec format character w |
|
1310 |
[ |
|
|
1310 | [10] | |
|
1311 | 1311 | $ hg log -T '{revset("%s %s", 0)}\n' |
|
1312 | 1312 | hg: parse error: missing argument for revspec |
|
1313 |
[ |
|
|
1313 | [10] | |
|
1314 | 1314 | $ hg log -T '{revset("", 0)}\n' |
|
1315 | 1315 | hg: parse error: too many revspec arguments specified |
|
1316 |
[ |
|
|
1316 | [10] | |
|
1317 | 1317 | $ hg log -T '{revset("%s", 0, 1)}\n' |
|
1318 | 1318 | hg: parse error: too many revspec arguments specified |
|
1319 |
[ |
|
|
1319 | [10] | |
|
1320 | 1320 | $ hg log -T '{revset("%", 0)}\n' |
|
1321 | 1321 | hg: parse error: incomplete revspec format character |
|
1322 |
[ |
|
|
1322 | [10] | |
|
1323 | 1323 | $ hg log -T '{revset("%l", 0)}\n' |
|
1324 | 1324 | hg: parse error: incomplete revspec format character |
|
1325 |
[ |
|
|
1325 | [10] | |
|
1326 | 1326 | $ hg log -T '{revset("%d", 'foo')}\n' |
|
1327 | 1327 | hg: parse error: invalid argument for revspec |
|
1328 |
[ |
|
|
1328 | [10] | |
|
1329 | 1329 | $ hg log -T '{revset("%ld", files)}\n' |
|
1330 | 1330 | hg: parse error: invalid argument for revspec |
|
1331 |
[ |
|
|
1331 | [10] | |
|
1332 | 1332 | $ hg log -T '{revset("%ls", 0)}\n' |
|
1333 | 1333 | hg: parse error: invalid argument for revspec |
|
1334 |
[ |
|
|
1334 | [10] | |
|
1335 | 1335 | $ hg log -T '{revset("%b", 'foo')}\n' |
|
1336 | 1336 | hg: parse error: invalid argument for revspec |
|
1337 |
[ |
|
|
1337 | [10] | |
|
1338 | 1338 | $ hg log -T '{revset("%lb", files)}\n' |
|
1339 | 1339 | hg: parse error: invalid argument for revspec |
|
1340 |
[ |
|
|
1340 | [10] | |
|
1341 | 1341 | $ hg log -T '{revset("%r", 0)}\n' |
|
1342 | 1342 | hg: parse error: invalid argument for revspec |
|
1343 |
[ |
|
|
1343 | [10] | |
|
1344 | 1344 | |
|
1345 | 1345 | Invalid operation on revset() |
|
1346 | 1346 | |
|
1347 | 1347 | $ hg log -T '{get(revset(":"), "foo")}\n' |
|
1348 | 1348 | hg: parse error: not a dictionary |
|
1349 | 1349 | (get() expects a dict as first argument) |
|
1350 |
[ |
|
|
1350 | [10] | |
|
1351 | 1351 | |
|
1352 | 1352 | Test files function |
|
1353 | 1353 | |
@@ -1432,7 +1432,7 b' Test splitlines' | |||
|
1432 | 1432 | Test startswith |
|
1433 | 1433 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
1434 | 1434 | hg: parse error: startswith expects two arguments |
|
1435 |
[ |
|
|
1435 | [10] | |
|
1436 | 1436 | |
|
1437 | 1437 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
1438 | 1438 | @ |
@@ -1514,11 +1514,11 b' Test word error messages for not enough ' | |||
|
1514 | 1514 | |
|
1515 | 1515 | $ hg log -Gv -R a --template "{word('0')}" |
|
1516 | 1516 | hg: parse error: word expects two or three arguments, got 1 |
|
1517 |
[ |
|
|
1517 | [10] | |
|
1518 | 1518 | |
|
1519 | 1519 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
1520 | 1520 | hg: parse error: word expects two or three arguments, got 7 |
|
1521 |
[ |
|
|
1521 | [10] | |
|
1522 | 1522 | |
|
1523 | 1523 | Test word for integer literal |
|
1524 | 1524 | |
@@ -1529,7 +1529,7 b' Test word for invalid numbers' | |||
|
1529 | 1529 | |
|
1530 | 1530 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
1531 | 1531 | hg: parse error: word expects an integer index |
|
1532 |
[ |
|
|
1532 | [10] | |
|
1533 | 1533 | |
|
1534 | 1534 | Test word for out of range |
|
1535 | 1535 |
@@ -381,13 +381,13 b' Invalid arguments:' | |||
|
381 | 381 | |
|
382 | 382 | $ hg log -T '{subsetparents()}\n' |
|
383 | 383 | hg: parse error: subsetparents expects two arguments |
|
384 |
[ |
|
|
384 | [10] | |
|
385 | 385 | $ hg log -T '{subsetparents("a")}\n' |
|
386 | 386 | hg: parse error: subsetparents expects two arguments |
|
387 |
[ |
|
|
387 | [10] | |
|
388 | 388 | $ hg log -T '{subsetparents(rev, extras)}\n' |
|
389 | 389 | hg: parse error: subsetparents expects a queried revset |
|
390 |
[ |
|
|
390 | [10] | |
|
391 | 391 | |
|
392 | 392 | $ cd .. |
|
393 | 393 |
@@ -1242,7 +1242,7 b' Unparsable function-style references:' | |||
|
1242 | 1242 | hg: parse error at 6: not a prefix: ) |
|
1243 | 1243 | (json(-) |
|
1244 | 1244 | ^ here) |
|
1245 |
[ |
|
|
1245 | [10] | |
|
1246 | 1246 | |
|
1247 | 1247 | For backward compatibility, the following examples are not parsed as |
|
1248 | 1248 | function-style references: |
@@ -1301,7 +1301,7 b' Error if style missing value:' | |||
|
1301 | 1301 | $ echo 'changeset =' > t |
|
1302 | 1302 | $ hg log --style t |
|
1303 | 1303 | hg: parse error at t:1: missing value |
|
1304 |
[ |
|
|
1304 | [10] | |
|
1305 | 1305 | |
|
1306 | 1306 | Error if include fails: |
|
1307 | 1307 |
General Comments 0
You need to be logged in to leave comments.
Login now