##// END OF EJS Templates
test-revset: add tests for missing function output...
Augie Fackler -
r24220:fe195d41 default
parent child Browse files
Show More
@@ -1,1388 +1,1402 b''
1 $ HGENCODING=utf-8
1 $ HGENCODING=utf-8
2 $ export HGENCODING
2 $ export HGENCODING
3
3
4 $ try() {
4 $ try() {
5 > hg debugrevspec --debug "$@"
5 > hg debugrevspec --debug "$@"
6 > }
6 > }
7
7
8 $ log() {
8 $ log() {
9 > hg log --template '{rev}\n' -r "$1"
9 > hg log --template '{rev}\n' -r "$1"
10 > }
10 > }
11
11
12 $ hg init repo
12 $ hg init repo
13 $ cd repo
13 $ cd repo
14
14
15 $ echo a > a
15 $ echo a > a
16 $ hg branch a
16 $ hg branch a
17 marked working directory as branch a
17 marked working directory as branch a
18 (branches are permanent and global, did you want a bookmark?)
18 (branches are permanent and global, did you want a bookmark?)
19 $ hg ci -Aqm0
19 $ hg ci -Aqm0
20
20
21 $ echo b > b
21 $ echo b > b
22 $ hg branch b
22 $ hg branch b
23 marked working directory as branch b
23 marked working directory as branch b
24 (branches are permanent and global, did you want a bookmark?)
24 (branches are permanent and global, did you want a bookmark?)
25 $ hg ci -Aqm1
25 $ hg ci -Aqm1
26
26
27 $ rm a
27 $ rm a
28 $ hg branch a-b-c-
28 $ hg branch a-b-c-
29 marked working directory as branch a-b-c-
29 marked working directory as branch a-b-c-
30 (branches are permanent and global, did you want a bookmark?)
30 (branches are permanent and global, did you want a bookmark?)
31 $ hg ci -Aqm2 -u Bob
31 $ hg ci -Aqm2 -u Bob
32
32
33 $ hg log -r "extra('branch', 'a-b-c-')" --template '{rev}\n'
33 $ hg log -r "extra('branch', 'a-b-c-')" --template '{rev}\n'
34 2
34 2
35 $ hg log -r "extra('branch')" --template '{rev}\n'
35 $ hg log -r "extra('branch')" --template '{rev}\n'
36 0
36 0
37 1
37 1
38 2
38 2
39 $ hg log -r "extra('branch', 're:a')" --template '{rev} {branch}\n'
39 $ hg log -r "extra('branch', 're:a')" --template '{rev} {branch}\n'
40 0 a
40 0 a
41 2 a-b-c-
41 2 a-b-c-
42
42
43 $ hg co 1
43 $ hg co 1
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 $ hg branch +a+b+c+
45 $ hg branch +a+b+c+
46 marked working directory as branch +a+b+c+
46 marked working directory as branch +a+b+c+
47 (branches are permanent and global, did you want a bookmark?)
47 (branches are permanent and global, did you want a bookmark?)
48 $ hg ci -Aqm3
48 $ hg ci -Aqm3
49
49
50 $ hg co 2 # interleave
50 $ hg co 2 # interleave
51 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
51 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
52 $ echo bb > b
52 $ echo bb > b
53 $ hg branch -- -a-b-c-
53 $ hg branch -- -a-b-c-
54 marked working directory as branch -a-b-c-
54 marked working directory as branch -a-b-c-
55 (branches are permanent and global, did you want a bookmark?)
55 (branches are permanent and global, did you want a bookmark?)
56 $ hg ci -Aqm4 -d "May 12 2005"
56 $ hg ci -Aqm4 -d "May 12 2005"
57
57
58 $ hg co 3
58 $ hg co 3
59 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
59 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 $ hg branch !a/b/c/
60 $ hg branch !a/b/c/
61 marked working directory as branch !a/b/c/
61 marked working directory as branch !a/b/c/
62 (branches are permanent and global, did you want a bookmark?)
62 (branches are permanent and global, did you want a bookmark?)
63 $ hg ci -Aqm"5 bug"
63 $ hg ci -Aqm"5 bug"
64
64
65 $ hg merge 4
65 $ hg merge 4
66 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
67 (branch merge, don't forget to commit)
67 (branch merge, don't forget to commit)
68 $ hg branch _a_b_c_
68 $ hg branch _a_b_c_
69 marked working directory as branch _a_b_c_
69 marked working directory as branch _a_b_c_
70 (branches are permanent and global, did you want a bookmark?)
70 (branches are permanent and global, did you want a bookmark?)
71 $ hg ci -Aqm"6 issue619"
71 $ hg ci -Aqm"6 issue619"
72
72
73 $ hg branch .a.b.c.
73 $ hg branch .a.b.c.
74 marked working directory as branch .a.b.c.
74 marked working directory as branch .a.b.c.
75 (branches are permanent and global, did you want a bookmark?)
75 (branches are permanent and global, did you want a bookmark?)
76 $ hg ci -Aqm7
76 $ hg ci -Aqm7
77
77
78 $ hg branch all
78 $ hg branch all
79 marked working directory as branch all
79 marked working directory as branch all
80 (branches are permanent and global, did you want a bookmark?)
80 (branches are permanent and global, did you want a bookmark?)
81
81
82 $ hg co 4
82 $ hg co 4
83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 $ hg branch Γ©
84 $ hg branch Γ©
85 marked working directory as branch \xc3\xa9 (esc)
85 marked working directory as branch \xc3\xa9 (esc)
86 (branches are permanent and global, did you want a bookmark?)
86 (branches are permanent and global, did you want a bookmark?)
87 $ hg ci -Aqm9
87 $ hg ci -Aqm9
88
88
89 $ hg tag -r6 1.0
89 $ hg tag -r6 1.0
90
90
91 $ hg clone --quiet -U -r 7 . ../remote1
91 $ hg clone --quiet -U -r 7 . ../remote1
92 $ hg clone --quiet -U -r 8 . ../remote2
92 $ hg clone --quiet -U -r 8 . ../remote2
93 $ echo "[paths]" >> .hg/hgrc
93 $ echo "[paths]" >> .hg/hgrc
94 $ echo "default = ../remote1" >> .hg/hgrc
94 $ echo "default = ../remote1" >> .hg/hgrc
95
95
96 names that should work without quoting
96 names that should work without quoting
97
97
98 $ try a
98 $ try a
99 ('symbol', 'a')
99 ('symbol', 'a')
100 0
100 0
101 $ try b-a
101 $ try b-a
102 (minus
102 (minus
103 ('symbol', 'b')
103 ('symbol', 'b')
104 ('symbol', 'a'))
104 ('symbol', 'a'))
105 1
105 1
106 $ try _a_b_c_
106 $ try _a_b_c_
107 ('symbol', '_a_b_c_')
107 ('symbol', '_a_b_c_')
108 6
108 6
109 $ try _a_b_c_-a
109 $ try _a_b_c_-a
110 (minus
110 (minus
111 ('symbol', '_a_b_c_')
111 ('symbol', '_a_b_c_')
112 ('symbol', 'a'))
112 ('symbol', 'a'))
113 6
113 6
114 $ try .a.b.c.
114 $ try .a.b.c.
115 ('symbol', '.a.b.c.')
115 ('symbol', '.a.b.c.')
116 7
116 7
117 $ try .a.b.c.-a
117 $ try .a.b.c.-a
118 (minus
118 (minus
119 ('symbol', '.a.b.c.')
119 ('symbol', '.a.b.c.')
120 ('symbol', 'a'))
120 ('symbol', 'a'))
121 7
121 7
122 $ try -- '-a-b-c-' # complains
122 $ try -- '-a-b-c-' # complains
123 hg: parse error at 7: not a prefix: end
123 hg: parse error at 7: not a prefix: end
124 [255]
124 [255]
125 $ log -a-b-c- # succeeds with fallback
125 $ log -a-b-c- # succeeds with fallback
126 4
126 4
127
127
128 $ try -- -a-b-c--a # complains
128 $ try -- -a-b-c--a # complains
129 (minus
129 (minus
130 (minus
130 (minus
131 (minus
131 (minus
132 (negate
132 (negate
133 ('symbol', 'a'))
133 ('symbol', 'a'))
134 ('symbol', 'b'))
134 ('symbol', 'b'))
135 ('symbol', 'c'))
135 ('symbol', 'c'))
136 (negate
136 (negate
137 ('symbol', 'a')))
137 ('symbol', 'a')))
138 abort: unknown revision '-a'!
138 abort: unknown revision '-a'!
139 [255]
139 [255]
140 $ try Γ©
140 $ try Γ©
141 ('symbol', '\xc3\xa9')
141 ('symbol', '\xc3\xa9')
142 9
142 9
143
143
144 no quoting needed
144 no quoting needed
145
145
146 $ log ::a-b-c-
146 $ log ::a-b-c-
147 0
147 0
148 1
148 1
149 2
149 2
150
150
151 quoting needed
151 quoting needed
152
152
153 $ try '"-a-b-c-"-a'
153 $ try '"-a-b-c-"-a'
154 (minus
154 (minus
155 ('string', '-a-b-c-')
155 ('string', '-a-b-c-')
156 ('symbol', 'a'))
156 ('symbol', 'a'))
157 4
157 4
158
158
159 $ log '1 or 2'
159 $ log '1 or 2'
160 1
160 1
161 2
161 2
162 $ log '1|2'
162 $ log '1|2'
163 1
163 1
164 2
164 2
165 $ log '1 and 2'
165 $ log '1 and 2'
166 $ log '1&2'
166 $ log '1&2'
167 $ try '1&2|3' # precedence - and is higher
167 $ try '1&2|3' # precedence - and is higher
168 (or
168 (or
169 (and
169 (and
170 ('symbol', '1')
170 ('symbol', '1')
171 ('symbol', '2'))
171 ('symbol', '2'))
172 ('symbol', '3'))
172 ('symbol', '3'))
173 3
173 3
174 $ try '1|2&3'
174 $ try '1|2&3'
175 (or
175 (or
176 ('symbol', '1')
176 ('symbol', '1')
177 (and
177 (and
178 ('symbol', '2')
178 ('symbol', '2')
179 ('symbol', '3')))
179 ('symbol', '3')))
180 1
180 1
181 $ try '1&2&3' # associativity
181 $ try '1&2&3' # associativity
182 (and
182 (and
183 (and
183 (and
184 ('symbol', '1')
184 ('symbol', '1')
185 ('symbol', '2'))
185 ('symbol', '2'))
186 ('symbol', '3'))
186 ('symbol', '3'))
187 $ try '1|(2|3)'
187 $ try '1|(2|3)'
188 (or
188 (or
189 ('symbol', '1')
189 ('symbol', '1')
190 (group
190 (group
191 (or
191 (or
192 ('symbol', '2')
192 ('symbol', '2')
193 ('symbol', '3'))))
193 ('symbol', '3'))))
194 1
194 1
195 2
195 2
196 3
196 3
197 $ log '1.0' # tag
197 $ log '1.0' # tag
198 6
198 6
199 $ log 'a' # branch
199 $ log 'a' # branch
200 0
200 0
201 $ log '2785f51ee'
201 $ log '2785f51ee'
202 0
202 0
203 $ log 'date(2005)'
203 $ log 'date(2005)'
204 4
204 4
205 $ log 'date(this is a test)'
205 $ log 'date(this is a test)'
206 hg: parse error at 10: unexpected token: symbol
206 hg: parse error at 10: unexpected token: symbol
207 [255]
207 [255]
208 $ log 'date()'
208 $ log 'date()'
209 hg: parse error: date requires a string
209 hg: parse error: date requires a string
210 [255]
210 [255]
211 $ log 'date'
211 $ log 'date'
212 hg: parse error: can't use date here
212 hg: parse error: can't use date here
213 [255]
213 [255]
214 $ log 'date('
214 $ log 'date('
215 hg: parse error at 5: not a prefix: end
215 hg: parse error at 5: not a prefix: end
216 [255]
216 [255]
217 $ log 'date(tip)'
217 $ log 'date(tip)'
218 abort: invalid date: 'tip'
218 abort: invalid date: 'tip'
219 [255]
219 [255]
220 $ log '"date"'
220 $ log '"date"'
221 abort: unknown revision 'date'!
221 abort: unknown revision 'date'!
222 [255]
222 [255]
223 $ log 'date(2005) and 1::'
223 $ log 'date(2005) and 1::'
224 4
224 4
225
225
226 ancestor can accept 0 or more arguments
226 ancestor can accept 0 or more arguments
227
227
228 $ log 'ancestor()'
228 $ log 'ancestor()'
229 $ log 'ancestor(1)'
229 $ log 'ancestor(1)'
230 1
230 1
231 $ log 'ancestor(4,5)'
231 $ log 'ancestor(4,5)'
232 1
232 1
233 $ log 'ancestor(4,5) and 4'
233 $ log 'ancestor(4,5) and 4'
234 $ log 'ancestor(0,0,1,3)'
234 $ log 'ancestor(0,0,1,3)'
235 0
235 0
236 $ log 'ancestor(3,1,5,3,5,1)'
236 $ log 'ancestor(3,1,5,3,5,1)'
237 1
237 1
238 $ log 'ancestor(0,1,3,5)'
238 $ log 'ancestor(0,1,3,5)'
239 0
239 0
240 $ log 'ancestor(1,2,3,4,5)'
240 $ log 'ancestor(1,2,3,4,5)'
241 1
241 1
242 $ log 'ancestors(5)'
242 $ log 'ancestors(5)'
243 0
243 0
244 1
244 1
245 3
245 3
246 5
246 5
247 $ log 'ancestor(ancestors(5))'
247 $ log 'ancestor(ancestors(5))'
248 0
248 0
249 $ log 'author(bob)'
249 $ log 'author(bob)'
250 2
250 2
251 $ log 'author("re:bob|test")'
251 $ log 'author("re:bob|test")'
252 0
252 0
253 1
253 1
254 2
254 2
255 3
255 3
256 4
256 4
257 5
257 5
258 6
258 6
259 7
259 7
260 8
260 8
261 9
261 9
262 $ log 'branch(Γ©)'
262 $ log 'branch(Γ©)'
263 8
263 8
264 9
264 9
265 $ log 'branch(a)'
265 $ log 'branch(a)'
266 0
266 0
267 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n'
267 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n'
268 0 a
268 0 a
269 2 a-b-c-
269 2 a-b-c-
270 3 +a+b+c+
270 3 +a+b+c+
271 4 -a-b-c-
271 4 -a-b-c-
272 5 !a/b/c/
272 5 !a/b/c/
273 6 _a_b_c_
273 6 _a_b_c_
274 7 .a.b.c.
274 7 .a.b.c.
275 $ log 'children(ancestor(4,5))'
275 $ log 'children(ancestor(4,5))'
276 2
276 2
277 3
277 3
278 $ log 'closed()'
278 $ log 'closed()'
279 $ log 'contains(a)'
279 $ log 'contains(a)'
280 0
280 0
281 1
281 1
282 3
282 3
283 5
283 5
284 $ log 'contains("../repo/a")'
284 $ log 'contains("../repo/a")'
285 0
285 0
286 1
286 1
287 3
287 3
288 5
288 5
289 $ log 'desc(B)'
289 $ log 'desc(B)'
290 5
290 5
291 $ log 'descendants(2 or 3)'
291 $ log 'descendants(2 or 3)'
292 2
292 2
293 3
293 3
294 4
294 4
295 5
295 5
296 6
296 6
297 7
297 7
298 8
298 8
299 9
299 9
300 $ log 'file("b*")'
300 $ log 'file("b*")'
301 1
301 1
302 4
302 4
303 $ log 'filelog("b")'
303 $ log 'filelog("b")'
304 1
304 1
305 4
305 4
306 $ log 'filelog("../repo/b")'
306 $ log 'filelog("../repo/b")'
307 1
307 1
308 4
308 4
309 $ log 'follow()'
309 $ log 'follow()'
310 0
310 0
311 1
311 1
312 2
312 2
313 4
313 4
314 8
314 8
315 9
315 9
316 $ log 'grep("issue\d+")'
316 $ log 'grep("issue\d+")'
317 6
317 6
318 $ try 'grep("(")' # invalid regular expression
318 $ try 'grep("(")' # invalid regular expression
319 (func
319 (func
320 ('symbol', 'grep')
320 ('symbol', 'grep')
321 ('string', '('))
321 ('string', '('))
322 hg: parse error: invalid match pattern: unbalanced parenthesis
322 hg: parse error: invalid match pattern: unbalanced parenthesis
323 [255]
323 [255]
324 $ try 'grep("\bissue\d+")'
324 $ try 'grep("\bissue\d+")'
325 (func
325 (func
326 ('symbol', 'grep')
326 ('symbol', 'grep')
327 ('string', '\x08issue\\d+'))
327 ('string', '\x08issue\\d+'))
328 $ try 'grep(r"\bissue\d+")'
328 $ try 'grep(r"\bissue\d+")'
329 (func
329 (func
330 ('symbol', 'grep')
330 ('symbol', 'grep')
331 ('string', '\\bissue\\d+'))
331 ('string', '\\bissue\\d+'))
332 6
332 6
333 $ try 'grep(r"\")'
333 $ try 'grep(r"\")'
334 hg: parse error at 7: unterminated string
334 hg: parse error at 7: unterminated string
335 [255]
335 [255]
336 $ log 'head()'
336 $ log 'head()'
337 0
337 0
338 1
338 1
339 2
339 2
340 3
340 3
341 4
341 4
342 5
342 5
343 6
343 6
344 7
344 7
345 9
345 9
346 $ log 'heads(6::)'
346 $ log 'heads(6::)'
347 7
347 7
348 $ log 'keyword(issue)'
348 $ log 'keyword(issue)'
349 6
349 6
350 $ log 'keyword("test a")'
350 $ log 'keyword("test a")'
351 $ log 'limit(head(), 1)'
351 $ log 'limit(head(), 1)'
352 0
352 0
353 $ log 'matching(6)'
353 $ log 'matching(6)'
354 6
354 6
355 $ log 'matching(6:7, "phase parents user date branch summary files description substate")'
355 $ log 'matching(6:7, "phase parents user date branch summary files description substate")'
356 6
356 6
357 7
357 7
358
358
359 Testing min and max
359 Testing min and max
360
360
361 max: simple
361 max: simple
362
362
363 $ log 'max(contains(a))'
363 $ log 'max(contains(a))'
364 5
364 5
365
365
366 max: simple on unordered set)
366 max: simple on unordered set)
367
367
368 $ log 'max((4+0+2+5+7) and contains(a))'
368 $ log 'max((4+0+2+5+7) and contains(a))'
369 5
369 5
370
370
371 max: no result
371 max: no result
372
372
373 $ log 'max(contains(stringthatdoesnotappearanywhere))'
373 $ log 'max(contains(stringthatdoesnotappearanywhere))'
374
374
375 max: no result on unordered set
375 max: no result on unordered set
376
376
377 $ log 'max((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
377 $ log 'max((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
378
378
379 min: simple
379 min: simple
380
380
381 $ log 'min(contains(a))'
381 $ log 'min(contains(a))'
382 0
382 0
383
383
384 min: simple on unordered set
384 min: simple on unordered set
385
385
386 $ log 'min((4+0+2+5+7) and contains(a))'
386 $ log 'min((4+0+2+5+7) and contains(a))'
387 0
387 0
388
388
389 min: empty
389 min: empty
390
390
391 $ log 'min(contains(stringthatdoesnotappearanywhere))'
391 $ log 'min(contains(stringthatdoesnotappearanywhere))'
392
392
393 min: empty on unordered set
393 min: empty on unordered set
394
394
395 $ log 'min((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
395 $ log 'min((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
396
396
397
397
398 $ log 'merge()'
398 $ log 'merge()'
399 6
399 6
400 $ log 'branchpoint()'
400 $ log 'branchpoint()'
401 1
401 1
402 4
402 4
403 $ log 'modifies(b)'
403 $ log 'modifies(b)'
404 4
404 4
405 $ log 'modifies("path:b")'
405 $ log 'modifies("path:b")'
406 4
406 4
407 $ log 'modifies("*")'
407 $ log 'modifies("*")'
408 4
408 4
409 6
409 6
410 $ log 'modifies("set:modified()")'
410 $ log 'modifies("set:modified()")'
411 4
411 4
412 $ log 'id(5)'
412 $ log 'id(5)'
413 2
413 2
414 $ log 'only(9)'
414 $ log 'only(9)'
415 8
415 8
416 9
416 9
417 $ log 'only(8)'
417 $ log 'only(8)'
418 8
418 8
419 $ log 'only(9, 5)'
419 $ log 'only(9, 5)'
420 2
420 2
421 4
421 4
422 8
422 8
423 9
423 9
424 $ log 'only(7 + 9, 5 + 2)'
424 $ log 'only(7 + 9, 5 + 2)'
425 4
425 4
426 6
426 6
427 7
427 7
428 8
428 8
429 9
429 9
430
430
431 Test empty set input
431 Test empty set input
432 $ log 'only(p2())'
432 $ log 'only(p2())'
433 $ log 'only(p1(), p2())'
433 $ log 'only(p1(), p2())'
434 0
434 0
435 1
435 1
436 2
436 2
437 4
437 4
438 8
438 8
439 9
439 9
440
440
441 Test '%' operator
441 Test '%' operator
442
442
443 $ log '9%'
443 $ log '9%'
444 8
444 8
445 9
445 9
446 $ log '9%5'
446 $ log '9%5'
447 2
447 2
448 4
448 4
449 8
449 8
450 9
450 9
451 $ log '(7 + 9)%(5 + 2)'
451 $ log '(7 + 9)%(5 + 2)'
452 4
452 4
453 6
453 6
454 7
454 7
455 8
455 8
456 9
456 9
457
457
458 Test the order of operations
458 Test the order of operations
459
459
460 $ log '7 + 9%5 + 2'
460 $ log '7 + 9%5 + 2'
461 7
461 7
462 2
462 2
463 4
463 4
464 8
464 8
465 9
465 9
466
466
467 Test explicit numeric revision
467 Test explicit numeric revision
468 $ log 'rev(-2)'
468 $ log 'rev(-2)'
469 $ log 'rev(-1)'
469 $ log 'rev(-1)'
470 -1
470 -1
471 $ log 'rev(0)'
471 $ log 'rev(0)'
472 0
472 0
473 $ log 'rev(9)'
473 $ log 'rev(9)'
474 9
474 9
475 $ log 'rev(10)'
475 $ log 'rev(10)'
476 $ log 'rev(tip)'
476 $ log 'rev(tip)'
477 hg: parse error: rev expects a number
477 hg: parse error: rev expects a number
478 [255]
478 [255]
479
479
480 Test null revision
480 Test null revision
481 $ log '(null)'
481 $ log '(null)'
482 -1
482 -1
483 $ log '(null:0)'
483 $ log '(null:0)'
484 -1
484 -1
485 0
485 0
486 $ log '(0:null)'
486 $ log '(0:null)'
487 0
487 0
488 -1
488 -1
489 $ log 'null::0'
489 $ log 'null::0'
490 -1
490 -1
491 0
491 0
492 $ log 'null:tip - 0:'
492 $ log 'null:tip - 0:'
493 -1
493 -1
494 $ log 'null: and null::' | head -1
494 $ log 'null: and null::' | head -1
495 -1
495 -1
496 $ log 'null: or 0:' | head -2
496 $ log 'null: or 0:' | head -2
497 -1
497 -1
498 0
498 0
499 $ log 'ancestors(null)'
499 $ log 'ancestors(null)'
500 -1
500 -1
501 $ log 'reverse(null:)' | tail -2
501 $ log 'reverse(null:)' | tail -2
502 0
502 0
503 -1
503 -1
504 $ log 'first(null:)'
504 $ log 'first(null:)'
505 -1
505 -1
506 $ log 'min(null:)'
506 $ log 'min(null:)'
507 -1
507 -1
508 $ log 'tip:null and all()' | tail -2
508 $ log 'tip:null and all()' | tail -2
509 1
509 1
510 0
510 0
511
511
512 $ log 'outgoing()'
512 $ log 'outgoing()'
513 8
513 8
514 9
514 9
515 $ log 'outgoing("../remote1")'
515 $ log 'outgoing("../remote1")'
516 8
516 8
517 9
517 9
518 $ log 'outgoing("../remote2")'
518 $ log 'outgoing("../remote2")'
519 3
519 3
520 5
520 5
521 6
521 6
522 7
522 7
523 9
523 9
524 $ log 'p1(merge())'
524 $ log 'p1(merge())'
525 5
525 5
526 $ log 'p2(merge())'
526 $ log 'p2(merge())'
527 4
527 4
528 $ log 'parents(merge())'
528 $ log 'parents(merge())'
529 4
529 4
530 5
530 5
531 $ log 'p1(branchpoint())'
531 $ log 'p1(branchpoint())'
532 0
532 0
533 2
533 2
534 $ log 'p2(branchpoint())'
534 $ log 'p2(branchpoint())'
535 $ log 'parents(branchpoint())'
535 $ log 'parents(branchpoint())'
536 0
536 0
537 2
537 2
538 $ log 'removes(a)'
538 $ log 'removes(a)'
539 2
539 2
540 6
540 6
541 $ log 'roots(all())'
541 $ log 'roots(all())'
542 0
542 0
543 $ log 'reverse(2 or 3 or 4 or 5)'
543 $ log 'reverse(2 or 3 or 4 or 5)'
544 5
544 5
545 4
545 4
546 3
546 3
547 2
547 2
548 $ log 'reverse(all())'
548 $ log 'reverse(all())'
549 9
549 9
550 8
550 8
551 7
551 7
552 6
552 6
553 5
553 5
554 4
554 4
555 3
555 3
556 2
556 2
557 1
557 1
558 0
558 0
559 $ log 'reverse(all()) & filelog(b)'
559 $ log 'reverse(all()) & filelog(b)'
560 4
560 4
561 1
561 1
562 $ log 'rev(5)'
562 $ log 'rev(5)'
563 5
563 5
564 $ log 'sort(limit(reverse(all()), 3))'
564 $ log 'sort(limit(reverse(all()), 3))'
565 7
565 7
566 8
566 8
567 9
567 9
568 $ log 'sort(2 or 3 or 4 or 5, date)'
568 $ log 'sort(2 or 3 or 4 or 5, date)'
569 2
569 2
570 3
570 3
571 5
571 5
572 4
572 4
573 $ log 'tagged()'
573 $ log 'tagged()'
574 6
574 6
575 $ log 'tag()'
575 $ log 'tag()'
576 6
576 6
577 $ log 'tag(1.0)'
577 $ log 'tag(1.0)'
578 6
578 6
579 $ log 'tag(tip)'
579 $ log 'tag(tip)'
580 9
580 9
581
581
582 test sort revset
582 test sort revset
583 --------------------------------------------
583 --------------------------------------------
584
584
585 test when adding two unordered revsets
585 test when adding two unordered revsets
586
586
587 $ log 'sort(keyword(issue) or modifies(b))'
587 $ log 'sort(keyword(issue) or modifies(b))'
588 4
588 4
589 6
589 6
590
590
591 test when sorting a reversed collection in the same way it is
591 test when sorting a reversed collection in the same way it is
592
592
593 $ log 'sort(reverse(all()), -rev)'
593 $ log 'sort(reverse(all()), -rev)'
594 9
594 9
595 8
595 8
596 7
596 7
597 6
597 6
598 5
598 5
599 4
599 4
600 3
600 3
601 2
601 2
602 1
602 1
603 0
603 0
604
604
605 test when sorting a reversed collection
605 test when sorting a reversed collection
606
606
607 $ log 'sort(reverse(all()), rev)'
607 $ log 'sort(reverse(all()), rev)'
608 0
608 0
609 1
609 1
610 2
610 2
611 3
611 3
612 4
612 4
613 5
613 5
614 6
614 6
615 7
615 7
616 8
616 8
617 9
617 9
618
618
619
619
620 test sorting two sorted collections in different orders
620 test sorting two sorted collections in different orders
621
621
622 $ log 'sort(outgoing() or reverse(removes(a)), rev)'
622 $ log 'sort(outgoing() or reverse(removes(a)), rev)'
623 2
623 2
624 6
624 6
625 8
625 8
626 9
626 9
627
627
628 test sorting two sorted collections in different orders backwards
628 test sorting two sorted collections in different orders backwards
629
629
630 $ log 'sort(outgoing() or reverse(removes(a)), -rev)'
630 $ log 'sort(outgoing() or reverse(removes(a)), -rev)'
631 9
631 9
632 8
632 8
633 6
633 6
634 2
634 2
635
635
636 test subtracting something from an addset
636 test subtracting something from an addset
637
637
638 $ log '(outgoing() or removes(a)) - removes(a)'
638 $ log '(outgoing() or removes(a)) - removes(a)'
639 8
639 8
640 9
640 9
641
641
642 test intersecting something with an addset
642 test intersecting something with an addset
643
643
644 $ log 'parents(outgoing() or removes(a))'
644 $ log 'parents(outgoing() or removes(a))'
645 1
645 1
646 4
646 4
647 5
647 5
648 8
648 8
649
649
650 test that `or` operation combines elements in the right order:
650 test that `or` operation combines elements in the right order:
651
651
652 $ log '3:4 or 2:5'
652 $ log '3:4 or 2:5'
653 3
653 3
654 4
654 4
655 2
655 2
656 5
656 5
657 $ log '3:4 or 5:2'
657 $ log '3:4 or 5:2'
658 3
658 3
659 4
659 4
660 5
660 5
661 2
661 2
662 $ log 'sort(3:4 or 2:5)'
662 $ log 'sort(3:4 or 2:5)'
663 2
663 2
664 3
664 3
665 4
665 4
666 5
666 5
667 $ log 'sort(3:4 or 5:2)'
667 $ log 'sort(3:4 or 5:2)'
668 2
668 2
669 3
669 3
670 4
670 4
671 5
671 5
672
672
673 check that conversion to only works
673 check that conversion to only works
674 $ try --optimize '::3 - ::1'
674 $ try --optimize '::3 - ::1'
675 (minus
675 (minus
676 (dagrangepre
676 (dagrangepre
677 ('symbol', '3'))
677 ('symbol', '3'))
678 (dagrangepre
678 (dagrangepre
679 ('symbol', '1')))
679 ('symbol', '1')))
680 * optimized:
680 * optimized:
681 (func
681 (func
682 ('symbol', 'only')
682 ('symbol', 'only')
683 (list
683 (list
684 ('symbol', '3')
684 ('symbol', '3')
685 ('symbol', '1')))
685 ('symbol', '1')))
686 3
686 3
687 $ try --optimize 'ancestors(1) - ancestors(3)'
687 $ try --optimize 'ancestors(1) - ancestors(3)'
688 (minus
688 (minus
689 (func
689 (func
690 ('symbol', 'ancestors')
690 ('symbol', 'ancestors')
691 ('symbol', '1'))
691 ('symbol', '1'))
692 (func
692 (func
693 ('symbol', 'ancestors')
693 ('symbol', 'ancestors')
694 ('symbol', '3')))
694 ('symbol', '3')))
695 * optimized:
695 * optimized:
696 (func
696 (func
697 ('symbol', 'only')
697 ('symbol', 'only')
698 (list
698 (list
699 ('symbol', '1')
699 ('symbol', '1')
700 ('symbol', '3')))
700 ('symbol', '3')))
701 $ try --optimize 'not ::2 and ::6'
701 $ try --optimize 'not ::2 and ::6'
702 (and
702 (and
703 (not
703 (not
704 (dagrangepre
704 (dagrangepre
705 ('symbol', '2')))
705 ('symbol', '2')))
706 (dagrangepre
706 (dagrangepre
707 ('symbol', '6')))
707 ('symbol', '6')))
708 * optimized:
708 * optimized:
709 (func
709 (func
710 ('symbol', 'only')
710 ('symbol', 'only')
711 (list
711 (list
712 ('symbol', '6')
712 ('symbol', '6')
713 ('symbol', '2')))
713 ('symbol', '2')))
714 3
714 3
715 4
715 4
716 5
716 5
717 6
717 6
718 $ try --optimize 'ancestors(6) and not ancestors(4)'
718 $ try --optimize 'ancestors(6) and not ancestors(4)'
719 (and
719 (and
720 (func
720 (func
721 ('symbol', 'ancestors')
721 ('symbol', 'ancestors')
722 ('symbol', '6'))
722 ('symbol', '6'))
723 (not
723 (not
724 (func
724 (func
725 ('symbol', 'ancestors')
725 ('symbol', 'ancestors')
726 ('symbol', '4'))))
726 ('symbol', '4'))))
727 * optimized:
727 * optimized:
728 (func
728 (func
729 ('symbol', 'only')
729 ('symbol', 'only')
730 (list
730 (list
731 ('symbol', '6')
731 ('symbol', '6')
732 ('symbol', '4')))
732 ('symbol', '4')))
733 3
733 3
734 5
734 5
735 6
735 6
736
736
737 we can use patterns when searching for tags
737 we can use patterns when searching for tags
738
738
739 $ log 'tag("1..*")'
739 $ log 'tag("1..*")'
740 abort: tag '1..*' does not exist!
740 abort: tag '1..*' does not exist!
741 [255]
741 [255]
742 $ log 'tag("re:1..*")'
742 $ log 'tag("re:1..*")'
743 6
743 6
744 $ log 'tag("re:[0-9].[0-9]")'
744 $ log 'tag("re:[0-9].[0-9]")'
745 6
745 6
746 $ log 'tag("literal:1.0")'
746 $ log 'tag("literal:1.0")'
747 6
747 6
748 $ log 'tag("re:0..*")'
748 $ log 'tag("re:0..*")'
749
749
750 $ log 'tag(unknown)'
750 $ log 'tag(unknown)'
751 abort: tag 'unknown' does not exist!
751 abort: tag 'unknown' does not exist!
752 [255]
752 [255]
753 $ log 'tag("re:unknown")'
753 $ log 'tag("re:unknown")'
754 $ log 'present(tag("unknown"))'
754 $ log 'present(tag("unknown"))'
755 $ log 'present(tag("re:unknown"))'
755 $ log 'present(tag("re:unknown"))'
756 $ log 'branch(unknown)'
756 $ log 'branch(unknown)'
757 abort: unknown revision 'unknown'!
757 abort: unknown revision 'unknown'!
758 [255]
758 [255]
759 $ log 'branch("re:unknown")'
759 $ log 'branch("re:unknown")'
760 $ log 'present(branch("unknown"))'
760 $ log 'present(branch("unknown"))'
761 $ log 'present(branch("re:unknown"))'
761 $ log 'present(branch("re:unknown"))'
762 $ log 'user(bob)'
762 $ log 'user(bob)'
763 2
763 2
764
764
765 $ log '4::8'
765 $ log '4::8'
766 4
766 4
767 8
767 8
768 $ log '4:8'
768 $ log '4:8'
769 4
769 4
770 5
770 5
771 6
771 6
772 7
772 7
773 8
773 8
774
774
775 $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
775 $ log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")'
776 4
776 4
777 2
777 2
778 5
778 5
779
779
780 $ log 'not 0 and 0:2'
780 $ log 'not 0 and 0:2'
781 1
781 1
782 2
782 2
783 $ log 'not 1 and 0:2'
783 $ log 'not 1 and 0:2'
784 0
784 0
785 2
785 2
786 $ log 'not 2 and 0:2'
786 $ log 'not 2 and 0:2'
787 0
787 0
788 1
788 1
789 $ log '(1 and 2)::'
789 $ log '(1 and 2)::'
790 $ log '(1 and 2):'
790 $ log '(1 and 2):'
791 $ log '(1 and 2):3'
791 $ log '(1 and 2):3'
792 $ log 'sort(head(), -rev)'
792 $ log 'sort(head(), -rev)'
793 9
793 9
794 7
794 7
795 6
795 6
796 5
796 5
797 4
797 4
798 3
798 3
799 2
799 2
800 1
800 1
801 0
801 0
802 $ log '4::8 - 8'
802 $ log '4::8 - 8'
803 4
803 4
804 $ log 'matching(1 or 2 or 3) and (2 or 3 or 1)'
804 $ log 'matching(1 or 2 or 3) and (2 or 3 or 1)'
805 2
805 2
806 3
806 3
807 1
807 1
808
808
809 $ log 'named("unknown")'
809 $ log 'named("unknown")'
810 abort: namespace 'unknown' does not exist!
810 abort: namespace 'unknown' does not exist!
811 [255]
811 [255]
812 $ log 'named("re:unknown")'
812 $ log 'named("re:unknown")'
813 abort: no namespace exists that match 'unknown'!
813 abort: no namespace exists that match 'unknown'!
814 [255]
814 [255]
815 $ log 'present(named("unknown"))'
815 $ log 'present(named("unknown"))'
816 $ log 'present(named("re:unknown"))'
816 $ log 'present(named("re:unknown"))'
817
817
818 $ log 'tag()'
818 $ log 'tag()'
819 6
819 6
820 $ log 'named("tags")'
820 $ log 'named("tags")'
821 6
821 6
822
822
823 issue2437
823 issue2437
824
824
825 $ log '3 and p1(5)'
825 $ log '3 and p1(5)'
826 3
826 3
827 $ log '4 and p2(6)'
827 $ log '4 and p2(6)'
828 4
828 4
829 $ log '1 and parents(:2)'
829 $ log '1 and parents(:2)'
830 1
830 1
831 $ log '2 and children(1:)'
831 $ log '2 and children(1:)'
832 2
832 2
833 $ log 'roots(all()) or roots(all())'
833 $ log 'roots(all()) or roots(all())'
834 0
834 0
835 $ hg debugrevspec 'roots(all()) or roots(all())'
835 $ hg debugrevspec 'roots(all()) or roots(all())'
836 0
836 0
837 $ log 'heads(branch(Γ©)) or heads(branch(Γ©))'
837 $ log 'heads(branch(Γ©)) or heads(branch(Γ©))'
838 9
838 9
839 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(Γ©)))'
839 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(Γ©)))'
840 4
840 4
841
841
842 issue2654: report a parse error if the revset was not completely parsed
842 issue2654: report a parse error if the revset was not completely parsed
843
843
844 $ log '1 OR 2'
844 $ log '1 OR 2'
845 hg: parse error at 2: invalid token
845 hg: parse error at 2: invalid token
846 [255]
846 [255]
847
847
848 or operator should preserve ordering:
848 or operator should preserve ordering:
849 $ log 'reverse(2::4) or tip'
849 $ log 'reverse(2::4) or tip'
850 4
850 4
851 2
851 2
852 9
852 9
853
853
854 parentrevspec
854 parentrevspec
855
855
856 $ log 'merge()^0'
856 $ log 'merge()^0'
857 6
857 6
858 $ log 'merge()^'
858 $ log 'merge()^'
859 5
859 5
860 $ log 'merge()^1'
860 $ log 'merge()^1'
861 5
861 5
862 $ log 'merge()^2'
862 $ log 'merge()^2'
863 4
863 4
864 $ log 'merge()^^'
864 $ log 'merge()^^'
865 3
865 3
866 $ log 'merge()^1^'
866 $ log 'merge()^1^'
867 3
867 3
868 $ log 'merge()^^^'
868 $ log 'merge()^^^'
869 1
869 1
870
870
871 $ log 'merge()~0'
871 $ log 'merge()~0'
872 6
872 6
873 $ log 'merge()~1'
873 $ log 'merge()~1'
874 5
874 5
875 $ log 'merge()~2'
875 $ log 'merge()~2'
876 3
876 3
877 $ log 'merge()~2^1'
877 $ log 'merge()~2^1'
878 1
878 1
879 $ log 'merge()~3'
879 $ log 'merge()~3'
880 1
880 1
881
881
882 $ log '(-3:tip)^'
882 $ log '(-3:tip)^'
883 4
883 4
884 6
884 6
885 8
885 8
886
886
887 $ log 'tip^foo'
887 $ log 'tip^foo'
888 hg: parse error: ^ expects a number 0, 1, or 2
888 hg: parse error: ^ expects a number 0, 1, or 2
889 [255]
889 [255]
890
890
891 Bogus function gets suggestions
892 $ log 'add()'
893 hg: parse error: not a function: add
894 [255]
895 $ log 'added()'
896 hg: parse error: not a function: added
897 [255]
898 $ log 'remo()'
899 hg: parse error: not a function: remo
900 [255]
901 $ log 'babar()'
902 hg: parse error: not a function: babar
903 [255]
904
891 multiple revspecs
905 multiple revspecs
892
906
893 $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'
907 $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n'
894 8
908 8
895 9
909 9
896 4
910 4
897 5
911 5
898 6
912 6
899 7
913 7
900
914
901 test usage in revpair (with "+")
915 test usage in revpair (with "+")
902
916
903 (real pair)
917 (real pair)
904
918
905 $ hg diff -r 'tip^^' -r 'tip'
919 $ hg diff -r 'tip^^' -r 'tip'
906 diff -r 2326846efdab -r 24286f4ae135 .hgtags
920 diff -r 2326846efdab -r 24286f4ae135 .hgtags
907 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
921 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
908 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
922 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
909 @@ -0,0 +1,1 @@
923 @@ -0,0 +1,1 @@
910 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
924 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
911 $ hg diff -r 'tip^^::tip'
925 $ hg diff -r 'tip^^::tip'
912 diff -r 2326846efdab -r 24286f4ae135 .hgtags
926 diff -r 2326846efdab -r 24286f4ae135 .hgtags
913 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
927 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
914 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
928 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
915 @@ -0,0 +1,1 @@
929 @@ -0,0 +1,1 @@
916 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
930 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
917
931
918 (single rev)
932 (single rev)
919
933
920 $ hg diff -r 'tip^' -r 'tip^'
934 $ hg diff -r 'tip^' -r 'tip^'
921 $ hg diff -r 'tip^::tip^ or tip^'
935 $ hg diff -r 'tip^::tip^ or tip^'
922
936
923 (single rev that does not looks like a range)
937 (single rev that does not looks like a range)
924
938
925 $ hg diff -r 'tip^ or tip^'
939 $ hg diff -r 'tip^ or tip^'
926 diff -r d5d0dcbdc4d9 .hgtags
940 diff -r d5d0dcbdc4d9 .hgtags
927 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
941 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
928 +++ b/.hgtags * (glob)
942 +++ b/.hgtags * (glob)
929 @@ -0,0 +1,1 @@
943 @@ -0,0 +1,1 @@
930 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
944 +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0
931
945
932 (no rev)
946 (no rev)
933
947
934 $ hg diff -r 'author("babar") or author("celeste")'
948 $ hg diff -r 'author("babar") or author("celeste")'
935 abort: empty revision range
949 abort: empty revision range
936 [255]
950 [255]
937
951
938 aliases:
952 aliases:
939
953
940 $ echo '[revsetalias]' >> .hg/hgrc
954 $ echo '[revsetalias]' >> .hg/hgrc
941 $ echo 'm = merge()' >> .hg/hgrc
955 $ echo 'm = merge()' >> .hg/hgrc
942 $ echo 'sincem = descendants(m)' >> .hg/hgrc
956 $ echo 'sincem = descendants(m)' >> .hg/hgrc
943 $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc
957 $ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc
944 $ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
958 $ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
945 $ echo 'rs4(ARG1, ARGA, ARGB, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
959 $ echo 'rs4(ARG1, ARGA, ARGB, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
946
960
947 $ try m
961 $ try m
948 ('symbol', 'm')
962 ('symbol', 'm')
949 (func
963 (func
950 ('symbol', 'merge')
964 ('symbol', 'merge')
951 None)
965 None)
952 6
966 6
953
967
954 test alias recursion
968 test alias recursion
955
969
956 $ try sincem
970 $ try sincem
957 ('symbol', 'sincem')
971 ('symbol', 'sincem')
958 (func
972 (func
959 ('symbol', 'descendants')
973 ('symbol', 'descendants')
960 (func
974 (func
961 ('symbol', 'merge')
975 ('symbol', 'merge')
962 None))
976 None))
963 6
977 6
964 7
978 7
965
979
966 test infinite recursion
980 test infinite recursion
967
981
968 $ echo 'recurse1 = recurse2' >> .hg/hgrc
982 $ echo 'recurse1 = recurse2' >> .hg/hgrc
969 $ echo 'recurse2 = recurse1' >> .hg/hgrc
983 $ echo 'recurse2 = recurse1' >> .hg/hgrc
970 $ try recurse1
984 $ try recurse1
971 ('symbol', 'recurse1')
985 ('symbol', 'recurse1')
972 hg: parse error: infinite expansion of revset alias "recurse1" detected
986 hg: parse error: infinite expansion of revset alias "recurse1" detected
973 [255]
987 [255]
974
988
975 $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc
989 $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc
976 $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc
990 $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc
977 $ try "level2(level1(1, 2), 3)"
991 $ try "level2(level1(1, 2), 3)"
978 (func
992 (func
979 ('symbol', 'level2')
993 ('symbol', 'level2')
980 (list
994 (list
981 (func
995 (func
982 ('symbol', 'level1')
996 ('symbol', 'level1')
983 (list
997 (list
984 ('symbol', '1')
998 ('symbol', '1')
985 ('symbol', '2')))
999 ('symbol', '2')))
986 ('symbol', '3')))
1000 ('symbol', '3')))
987 (or
1001 (or
988 ('symbol', '3')
1002 ('symbol', '3')
989 (or
1003 (or
990 ('symbol', '1')
1004 ('symbol', '1')
991 ('symbol', '2')))
1005 ('symbol', '2')))
992 3
1006 3
993 1
1007 1
994 2
1008 2
995
1009
996 test nesting and variable passing
1010 test nesting and variable passing
997
1011
998 $ echo 'nested($1) = nested2($1)' >> .hg/hgrc
1012 $ echo 'nested($1) = nested2($1)' >> .hg/hgrc
999 $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc
1013 $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc
1000 $ echo 'nested3($1) = max($1)' >> .hg/hgrc
1014 $ echo 'nested3($1) = max($1)' >> .hg/hgrc
1001 $ try 'nested(2:5)'
1015 $ try 'nested(2:5)'
1002 (func
1016 (func
1003 ('symbol', 'nested')
1017 ('symbol', 'nested')
1004 (range
1018 (range
1005 ('symbol', '2')
1019 ('symbol', '2')
1006 ('symbol', '5')))
1020 ('symbol', '5')))
1007 (func
1021 (func
1008 ('symbol', 'max')
1022 ('symbol', 'max')
1009 (range
1023 (range
1010 ('symbol', '2')
1024 ('symbol', '2')
1011 ('symbol', '5')))
1025 ('symbol', '5')))
1012 5
1026 5
1013
1027
1014 test variable isolation, variable placeholders are rewritten as string
1028 test variable isolation, variable placeholders are rewritten as string
1015 then parsed and matched again as string. Check they do not leak too
1029 then parsed and matched again as string. Check they do not leak too
1016 far away.
1030 far away.
1017
1031
1018 $ echo 'injectparamasstring = max("$1")' >> .hg/hgrc
1032 $ echo 'injectparamasstring = max("$1")' >> .hg/hgrc
1019 $ echo 'callinjection($1) = descendants(injectparamasstring)' >> .hg/hgrc
1033 $ echo 'callinjection($1) = descendants(injectparamasstring)' >> .hg/hgrc
1020 $ try 'callinjection(2:5)'
1034 $ try 'callinjection(2:5)'
1021 (func
1035 (func
1022 ('symbol', 'callinjection')
1036 ('symbol', 'callinjection')
1023 (range
1037 (range
1024 ('symbol', '2')
1038 ('symbol', '2')
1025 ('symbol', '5')))
1039 ('symbol', '5')))
1026 (func
1040 (func
1027 ('symbol', 'descendants')
1041 ('symbol', 'descendants')
1028 (func
1042 (func
1029 ('symbol', 'max')
1043 ('symbol', 'max')
1030 ('string', '$1')))
1044 ('string', '$1')))
1031 abort: unknown revision '$1'!
1045 abort: unknown revision '$1'!
1032 [255]
1046 [255]
1033
1047
1034 $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc
1048 $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc
1035 $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc
1049 $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc
1036 $ try 'callinjection2(2:5)'
1050 $ try 'callinjection2(2:5)'
1037 (func
1051 (func
1038 ('symbol', 'callinjection2')
1052 ('symbol', 'callinjection2')
1039 (range
1053 (range
1040 ('symbol', '2')
1054 ('symbol', '2')
1041 ('symbol', '5')))
1055 ('symbol', '5')))
1042 abort: failed to parse the definition of revset alias "injectparamasstring2": not a function: _aliasarg
1056 abort: failed to parse the definition of revset alias "injectparamasstring2": not a function: _aliasarg
1043 [255]
1057 [255]
1044 $ hg debugrevspec --debug --config revsetalias.anotherbadone='branch(' "tip"
1058 $ hg debugrevspec --debug --config revsetalias.anotherbadone='branch(' "tip"
1045 ('symbol', 'tip')
1059 ('symbol', 'tip')
1046 warning: failed to parse the definition of revset alias "anotherbadone": at 7: not a prefix: end
1060 warning: failed to parse the definition of revset alias "anotherbadone": at 7: not a prefix: end
1047 warning: failed to parse the definition of revset alias "injectparamasstring2": not a function: _aliasarg
1061 warning: failed to parse the definition of revset alias "injectparamasstring2": not a function: _aliasarg
1048 9
1062 9
1049 >>> data = file('.hg/hgrc', 'rb').read()
1063 >>> data = file('.hg/hgrc', 'rb').read()
1050 >>> file('.hg/hgrc', 'wb').write(data.replace('_aliasarg', ''))
1064 >>> file('.hg/hgrc', 'wb').write(data.replace('_aliasarg', ''))
1051
1065
1052 $ try 'tip'
1066 $ try 'tip'
1053 ('symbol', 'tip')
1067 ('symbol', 'tip')
1054 9
1068 9
1055
1069
1056 $ hg debugrevspec --debug --config revsetalias.'bad name'='tip' "tip"
1070 $ hg debugrevspec --debug --config revsetalias.'bad name'='tip' "tip"
1057 ('symbol', 'tip')
1071 ('symbol', 'tip')
1058 warning: failed to parse the declaration of revset alias "bad name": at 4: invalid token
1072 warning: failed to parse the declaration of revset alias "bad name": at 4: invalid token
1059 9
1073 9
1060 $ echo 'strictreplacing($1, $10) = $10 or desc("$1")' >> .hg/hgrc
1074 $ echo 'strictreplacing($1, $10) = $10 or desc("$1")' >> .hg/hgrc
1061 $ try 'strictreplacing("foo", tip)'
1075 $ try 'strictreplacing("foo", tip)'
1062 (func
1076 (func
1063 ('symbol', 'strictreplacing')
1077 ('symbol', 'strictreplacing')
1064 (list
1078 (list
1065 ('string', 'foo')
1079 ('string', 'foo')
1066 ('symbol', 'tip')))
1080 ('symbol', 'tip')))
1067 (or
1081 (or
1068 ('symbol', 'tip')
1082 ('symbol', 'tip')
1069 (func
1083 (func
1070 ('symbol', 'desc')
1084 ('symbol', 'desc')
1071 ('string', '$1')))
1085 ('string', '$1')))
1072 9
1086 9
1073
1087
1074 $ try 'd(2:5)'
1088 $ try 'd(2:5)'
1075 (func
1089 (func
1076 ('symbol', 'd')
1090 ('symbol', 'd')
1077 (range
1091 (range
1078 ('symbol', '2')
1092 ('symbol', '2')
1079 ('symbol', '5')))
1093 ('symbol', '5')))
1080 (func
1094 (func
1081 ('symbol', 'reverse')
1095 ('symbol', 'reverse')
1082 (func
1096 (func
1083 ('symbol', 'sort')
1097 ('symbol', 'sort')
1084 (list
1098 (list
1085 (range
1099 (range
1086 ('symbol', '2')
1100 ('symbol', '2')
1087 ('symbol', '5'))
1101 ('symbol', '5'))
1088 ('symbol', 'date'))))
1102 ('symbol', 'date'))))
1089 4
1103 4
1090 5
1104 5
1091 3
1105 3
1092 2
1106 2
1093 $ try 'rs(2 or 3, date)'
1107 $ try 'rs(2 or 3, date)'
1094 (func
1108 (func
1095 ('symbol', 'rs')
1109 ('symbol', 'rs')
1096 (list
1110 (list
1097 (or
1111 (or
1098 ('symbol', '2')
1112 ('symbol', '2')
1099 ('symbol', '3'))
1113 ('symbol', '3'))
1100 ('symbol', 'date')))
1114 ('symbol', 'date')))
1101 (func
1115 (func
1102 ('symbol', 'reverse')
1116 ('symbol', 'reverse')
1103 (func
1117 (func
1104 ('symbol', 'sort')
1118 ('symbol', 'sort')
1105 (list
1119 (list
1106 (or
1120 (or
1107 ('symbol', '2')
1121 ('symbol', '2')
1108 ('symbol', '3'))
1122 ('symbol', '3'))
1109 ('symbol', 'date'))))
1123 ('symbol', 'date'))))
1110 3
1124 3
1111 2
1125 2
1112 $ try 'rs()'
1126 $ try 'rs()'
1113 (func
1127 (func
1114 ('symbol', 'rs')
1128 ('symbol', 'rs')
1115 None)
1129 None)
1116 hg: parse error: invalid number of arguments: 0
1130 hg: parse error: invalid number of arguments: 0
1117 [255]
1131 [255]
1118 $ try 'rs(2)'
1132 $ try 'rs(2)'
1119 (func
1133 (func
1120 ('symbol', 'rs')
1134 ('symbol', 'rs')
1121 ('symbol', '2'))
1135 ('symbol', '2'))
1122 hg: parse error: invalid number of arguments: 1
1136 hg: parse error: invalid number of arguments: 1
1123 [255]
1137 [255]
1124 $ try 'rs(2, data, 7)'
1138 $ try 'rs(2, data, 7)'
1125 (func
1139 (func
1126 ('symbol', 'rs')
1140 ('symbol', 'rs')
1127 (list
1141 (list
1128 (list
1142 (list
1129 ('symbol', '2')
1143 ('symbol', '2')
1130 ('symbol', 'data'))
1144 ('symbol', 'data'))
1131 ('symbol', '7')))
1145 ('symbol', '7')))
1132 hg: parse error: invalid number of arguments: 3
1146 hg: parse error: invalid number of arguments: 3
1133 [255]
1147 [255]
1134 $ try 'rs4(2 or 3, x, x, date)'
1148 $ try 'rs4(2 or 3, x, x, date)'
1135 (func
1149 (func
1136 ('symbol', 'rs4')
1150 ('symbol', 'rs4')
1137 (list
1151 (list
1138 (list
1152 (list
1139 (list
1153 (list
1140 (or
1154 (or
1141 ('symbol', '2')
1155 ('symbol', '2')
1142 ('symbol', '3'))
1156 ('symbol', '3'))
1143 ('symbol', 'x'))
1157 ('symbol', 'x'))
1144 ('symbol', 'x'))
1158 ('symbol', 'x'))
1145 ('symbol', 'date')))
1159 ('symbol', 'date')))
1146 (func
1160 (func
1147 ('symbol', 'reverse')
1161 ('symbol', 'reverse')
1148 (func
1162 (func
1149 ('symbol', 'sort')
1163 ('symbol', 'sort')
1150 (list
1164 (list
1151 (or
1165 (or
1152 ('symbol', '2')
1166 ('symbol', '2')
1153 ('symbol', '3'))
1167 ('symbol', '3'))
1154 ('symbol', 'date'))))
1168 ('symbol', 'date'))))
1155 3
1169 3
1156 2
1170 2
1157
1171
1158 issue4553: check that revset aliases override existing hash prefix
1172 issue4553: check that revset aliases override existing hash prefix
1159
1173
1160 $ hg log -qr e
1174 $ hg log -qr e
1161 6:e0cc66ef77e8
1175 6:e0cc66ef77e8
1162
1176
1163 $ hg log -qr e --config revsetalias.e="all()"
1177 $ hg log -qr e --config revsetalias.e="all()"
1164 0:2785f51eece5
1178 0:2785f51eece5
1165 1:d75937da8da0
1179 1:d75937da8da0
1166 2:5ed5505e9f1c
1180 2:5ed5505e9f1c
1167 3:8528aa5637f2
1181 3:8528aa5637f2
1168 4:2326846efdab
1182 4:2326846efdab
1169 5:904fa392b941
1183 5:904fa392b941
1170 6:e0cc66ef77e8
1184 6:e0cc66ef77e8
1171 7:013af1973af4
1185 7:013af1973af4
1172 8:d5d0dcbdc4d9
1186 8:d5d0dcbdc4d9
1173 9:24286f4ae135
1187 9:24286f4ae135
1174
1188
1175 $ hg log -qr e: --config revsetalias.e="0"
1189 $ hg log -qr e: --config revsetalias.e="0"
1176 0:2785f51eece5
1190 0:2785f51eece5
1177 1:d75937da8da0
1191 1:d75937da8da0
1178 2:5ed5505e9f1c
1192 2:5ed5505e9f1c
1179 3:8528aa5637f2
1193 3:8528aa5637f2
1180 4:2326846efdab
1194 4:2326846efdab
1181 5:904fa392b941
1195 5:904fa392b941
1182 6:e0cc66ef77e8
1196 6:e0cc66ef77e8
1183 7:013af1973af4
1197 7:013af1973af4
1184 8:d5d0dcbdc4d9
1198 8:d5d0dcbdc4d9
1185 9:24286f4ae135
1199 9:24286f4ae135
1186
1200
1187 $ hg log -qr :e --config revsetalias.e="9"
1201 $ hg log -qr :e --config revsetalias.e="9"
1188 0:2785f51eece5
1202 0:2785f51eece5
1189 1:d75937da8da0
1203 1:d75937da8da0
1190 2:5ed5505e9f1c
1204 2:5ed5505e9f1c
1191 3:8528aa5637f2
1205 3:8528aa5637f2
1192 4:2326846efdab
1206 4:2326846efdab
1193 5:904fa392b941
1207 5:904fa392b941
1194 6:e0cc66ef77e8
1208 6:e0cc66ef77e8
1195 7:013af1973af4
1209 7:013af1973af4
1196 8:d5d0dcbdc4d9
1210 8:d5d0dcbdc4d9
1197 9:24286f4ae135
1211 9:24286f4ae135
1198
1212
1199 $ hg log -qr e:
1213 $ hg log -qr e:
1200 6:e0cc66ef77e8
1214 6:e0cc66ef77e8
1201 7:013af1973af4
1215 7:013af1973af4
1202 8:d5d0dcbdc4d9
1216 8:d5d0dcbdc4d9
1203 9:24286f4ae135
1217 9:24286f4ae135
1204
1218
1205 $ hg log -qr :e
1219 $ hg log -qr :e
1206 0:2785f51eece5
1220 0:2785f51eece5
1207 1:d75937da8da0
1221 1:d75937da8da0
1208 2:5ed5505e9f1c
1222 2:5ed5505e9f1c
1209 3:8528aa5637f2
1223 3:8528aa5637f2
1210 4:2326846efdab
1224 4:2326846efdab
1211 5:904fa392b941
1225 5:904fa392b941
1212 6:e0cc66ef77e8
1226 6:e0cc66ef77e8
1213
1227
1214 issue2549 - correct optimizations
1228 issue2549 - correct optimizations
1215
1229
1216 $ log 'limit(1 or 2 or 3, 2) and not 2'
1230 $ log 'limit(1 or 2 or 3, 2) and not 2'
1217 1
1231 1
1218 $ log 'max(1 or 2) and not 2'
1232 $ log 'max(1 or 2) and not 2'
1219 $ log 'min(1 or 2) and not 1'
1233 $ log 'min(1 or 2) and not 1'
1220 $ log 'last(1 or 2, 1) and not 2'
1234 $ log 'last(1 or 2, 1) and not 2'
1221
1235
1222 issue4289 - ordering of built-ins
1236 issue4289 - ordering of built-ins
1223 $ hg log -M -q -r 3:2
1237 $ hg log -M -q -r 3:2
1224 3:8528aa5637f2
1238 3:8528aa5637f2
1225 2:5ed5505e9f1c
1239 2:5ed5505e9f1c
1226
1240
1227 test revsets started with 40-chars hash (issue3669)
1241 test revsets started with 40-chars hash (issue3669)
1228
1242
1229 $ ISSUE3669_TIP=`hg tip --template '{node}'`
1243 $ ISSUE3669_TIP=`hg tip --template '{node}'`
1230 $ hg log -r "${ISSUE3669_TIP}" --template '{rev}\n'
1244 $ hg log -r "${ISSUE3669_TIP}" --template '{rev}\n'
1231 9
1245 9
1232 $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n'
1246 $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n'
1233 8
1247 8
1234
1248
1235 test or-ed indirect predicates (issue3775)
1249 test or-ed indirect predicates (issue3775)
1236
1250
1237 $ log '6 or 6^1' | sort
1251 $ log '6 or 6^1' | sort
1238 5
1252 5
1239 6
1253 6
1240 $ log '6^1 or 6' | sort
1254 $ log '6^1 or 6' | sort
1241 5
1255 5
1242 6
1256 6
1243 $ log '4 or 4~1' | sort
1257 $ log '4 or 4~1' | sort
1244 2
1258 2
1245 4
1259 4
1246 $ log '4~1 or 4' | sort
1260 $ log '4~1 or 4' | sort
1247 2
1261 2
1248 4
1262 4
1249 $ log '(0 or 2):(4 or 6) or 0 or 6' | sort
1263 $ log '(0 or 2):(4 or 6) or 0 or 6' | sort
1250 0
1264 0
1251 1
1265 1
1252 2
1266 2
1253 3
1267 3
1254 4
1268 4
1255 5
1269 5
1256 6
1270 6
1257 $ log '0 or 6 or (0 or 2):(4 or 6)' | sort
1271 $ log '0 or 6 or (0 or 2):(4 or 6)' | sort
1258 0
1272 0
1259 1
1273 1
1260 2
1274 2
1261 3
1275 3
1262 4
1276 4
1263 5
1277 5
1264 6
1278 6
1265
1279
1266 tests for 'remote()' predicate:
1280 tests for 'remote()' predicate:
1267 #. (csets in remote) (id) (remote)
1281 #. (csets in remote) (id) (remote)
1268 1. less than local current branch "default"
1282 1. less than local current branch "default"
1269 2. same with local specified "default"
1283 2. same with local specified "default"
1270 3. more than local specified specified
1284 3. more than local specified specified
1271
1285
1272 $ hg clone --quiet -U . ../remote3
1286 $ hg clone --quiet -U . ../remote3
1273 $ cd ../remote3
1287 $ cd ../remote3
1274 $ hg update -q 7
1288 $ hg update -q 7
1275 $ echo r > r
1289 $ echo r > r
1276 $ hg ci -Aqm 10
1290 $ hg ci -Aqm 10
1277 $ log 'remote()'
1291 $ log 'remote()'
1278 7
1292 7
1279 $ log 'remote("a-b-c-")'
1293 $ log 'remote("a-b-c-")'
1280 2
1294 2
1281 $ cd ../repo
1295 $ cd ../repo
1282 $ log 'remote(".a.b.c.", "../remote3")'
1296 $ log 'remote(".a.b.c.", "../remote3")'
1283
1297
1284 tests for concatenation of strings/symbols by "##"
1298 tests for concatenation of strings/symbols by "##"
1285
1299
1286 $ try "278 ## '5f5' ## 1ee ## 'ce5'"
1300 $ try "278 ## '5f5' ## 1ee ## 'ce5'"
1287 (_concat
1301 (_concat
1288 (_concat
1302 (_concat
1289 (_concat
1303 (_concat
1290 ('symbol', '278')
1304 ('symbol', '278')
1291 ('string', '5f5'))
1305 ('string', '5f5'))
1292 ('symbol', '1ee'))
1306 ('symbol', '1ee'))
1293 ('string', 'ce5'))
1307 ('string', 'ce5'))
1294 ('string', '2785f51eece5')
1308 ('string', '2785f51eece5')
1295 0
1309 0
1296
1310
1297 $ echo 'cat4($1, $2, $3, $4) = $1 ## $2 ## $3 ## $4' >> .hg/hgrc
1311 $ echo 'cat4($1, $2, $3, $4) = $1 ## $2 ## $3 ## $4' >> .hg/hgrc
1298 $ try "cat4(278, '5f5', 1ee, 'ce5')"
1312 $ try "cat4(278, '5f5', 1ee, 'ce5')"
1299 (func
1313 (func
1300 ('symbol', 'cat4')
1314 ('symbol', 'cat4')
1301 (list
1315 (list
1302 (list
1316 (list
1303 (list
1317 (list
1304 ('symbol', '278')
1318 ('symbol', '278')
1305 ('string', '5f5'))
1319 ('string', '5f5'))
1306 ('symbol', '1ee'))
1320 ('symbol', '1ee'))
1307 ('string', 'ce5')))
1321 ('string', 'ce5')))
1308 (_concat
1322 (_concat
1309 (_concat
1323 (_concat
1310 (_concat
1324 (_concat
1311 ('symbol', '278')
1325 ('symbol', '278')
1312 ('string', '5f5'))
1326 ('string', '5f5'))
1313 ('symbol', '1ee'))
1327 ('symbol', '1ee'))
1314 ('string', 'ce5'))
1328 ('string', 'ce5'))
1315 ('string', '2785f51eece5')
1329 ('string', '2785f51eece5')
1316 0
1330 0
1317
1331
1318 (check concatenation in alias nesting)
1332 (check concatenation in alias nesting)
1319
1333
1320 $ echo 'cat2($1, $2) = $1 ## $2' >> .hg/hgrc
1334 $ echo 'cat2($1, $2) = $1 ## $2' >> .hg/hgrc
1321 $ echo 'cat2x2($1, $2, $3, $4) = cat2($1 ## $2, $3 ## $4)' >> .hg/hgrc
1335 $ echo 'cat2x2($1, $2, $3, $4) = cat2($1 ## $2, $3 ## $4)' >> .hg/hgrc
1322 $ log "cat2x2(278, '5f5', 1ee, 'ce5')"
1336 $ log "cat2x2(278, '5f5', 1ee, 'ce5')"
1323 0
1337 0
1324
1338
1325 (check operator priority)
1339 (check operator priority)
1326
1340
1327 $ echo 'cat2n2($1, $2, $3, $4) = $1 ## $2 or $3 ## $4~2' >> .hg/hgrc
1341 $ echo 'cat2n2($1, $2, $3, $4) = $1 ## $2 or $3 ## $4~2' >> .hg/hgrc
1328 $ log "cat2n2(2785f5, 1eece5, 24286f, 4ae135)"
1342 $ log "cat2n2(2785f5, 1eece5, 24286f, 4ae135)"
1329 0
1343 0
1330 4
1344 4
1331
1345
1332 $ cd ..
1346 $ cd ..
1333
1347
1334 test author/desc/keyword in problematic encoding
1348 test author/desc/keyword in problematic encoding
1335 # unicode: cp932:
1349 # unicode: cp932:
1336 # u30A2 0x83 0x41(= 'A')
1350 # u30A2 0x83 0x41(= 'A')
1337 # u30C2 0x83 0x61(= 'a')
1351 # u30C2 0x83 0x61(= 'a')
1338
1352
1339 $ hg init problematicencoding
1353 $ hg init problematicencoding
1340 $ cd problematicencoding
1354 $ cd problematicencoding
1341
1355
1342 $ python > setup.sh <<EOF
1356 $ python > setup.sh <<EOF
1343 > print u'''
1357 > print u'''
1344 > echo a > text
1358 > echo a > text
1345 > hg add text
1359 > hg add text
1346 > hg --encoding utf-8 commit -u '\u30A2' -m none
1360 > hg --encoding utf-8 commit -u '\u30A2' -m none
1347 > echo b > text
1361 > echo b > text
1348 > hg --encoding utf-8 commit -u '\u30C2' -m none
1362 > hg --encoding utf-8 commit -u '\u30C2' -m none
1349 > echo c > text
1363 > echo c > text
1350 > hg --encoding utf-8 commit -u none -m '\u30A2'
1364 > hg --encoding utf-8 commit -u none -m '\u30A2'
1351 > echo d > text
1365 > echo d > text
1352 > hg --encoding utf-8 commit -u none -m '\u30C2'
1366 > hg --encoding utf-8 commit -u none -m '\u30C2'
1353 > '''.encode('utf-8')
1367 > '''.encode('utf-8')
1354 > EOF
1368 > EOF
1355 $ sh < setup.sh
1369 $ sh < setup.sh
1356
1370
1357 test in problematic encoding
1371 test in problematic encoding
1358 $ python > test.sh <<EOF
1372 $ python > test.sh <<EOF
1359 > print u'''
1373 > print u'''
1360 > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
1374 > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
1361 > echo ====
1375 > echo ====
1362 > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
1376 > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
1363 > echo ====
1377 > echo ====
1364 > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
1378 > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
1365 > echo ====
1379 > echo ====
1366 > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
1380 > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
1367 > echo ====
1381 > echo ====
1368 > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
1382 > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
1369 > echo ====
1383 > echo ====
1370 > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
1384 > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
1371 > '''.encode('cp932')
1385 > '''.encode('cp932')
1372 > EOF
1386 > EOF
1373 $ sh < test.sh
1387 $ sh < test.sh
1374 0
1388 0
1375 ====
1389 ====
1376 1
1390 1
1377 ====
1391 ====
1378 2
1392 2
1379 ====
1393 ====
1380 3
1394 3
1381 ====
1395 ====
1382 0
1396 0
1383 2
1397 2
1384 ====
1398 ====
1385 1
1399 1
1386 3
1400 3
1387
1401
1388 $ cd ..
1402 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now