##// END OF EJS Templates
test-revset: check that #generations[1:-1] doesn't result in any errors
av6 -
r41432:947b8156 default
parent child Browse files
Show More
@@ -1,2979 +1,2980
1 1 $ HGENCODING=utf-8
2 2 $ export HGENCODING
3 3 $ cat > testrevset.py << EOF
4 4 > import mercurial.revset
5 5 >
6 6 > baseset = mercurial.revset.baseset
7 7 >
8 8 > def r3232(repo, subset, x):
9 9 > """"simple revset that return [3,2,3,2]
10 10 >
11 11 > revisions duplicated on purpose.
12 12 > """
13 13 > if 3 not in subset:
14 14 > if 2 in subset:
15 15 > return baseset([2,2])
16 16 > return baseset()
17 17 > return baseset([3,3,2,2])
18 18 >
19 19 > mercurial.revset.symbols[b'r3232'] = r3232
20 20 > EOF
21 21 $ cat >> $HGRCPATH << EOF
22 22 > [extensions]
23 23 > drawdag=$TESTDIR/drawdag.py
24 24 > testrevset=$TESTTMP/testrevset.py
25 25 > EOF
26 26
27 27 $ try() {
28 28 > hg debugrevspec --debug "$@"
29 29 > }
30 30
31 31 $ log() {
32 32 > hg log --template '{rev}\n' -r "$1"
33 33 > }
34 34
35 35 extension to build '_intlist()' and '_hexlist()', which is necessary because
36 36 these predicates use '\0' as a separator:
37 37
38 38 $ cat <<EOF > debugrevlistspec.py
39 39 > from __future__ import absolute_import
40 40 > from mercurial import (
41 41 > node as nodemod,
42 42 > registrar,
43 43 > revset,
44 44 > revsetlang,
45 45 > )
46 46 > from mercurial.utils import stringutil
47 47 > cmdtable = {}
48 48 > command = registrar.command(cmdtable)
49 49 > @command(b'debugrevlistspec',
50 50 > [(b'', b'optimize', None, b'print parsed tree after optimizing'),
51 51 > (b'', b'bin', None, b'unhexlify arguments')])
52 52 > def debugrevlistspec(ui, repo, fmt, *args, **opts):
53 53 > if opts['bin']:
54 54 > args = map(nodemod.bin, args)
55 55 > expr = revsetlang.formatspec(fmt, list(args))
56 56 > if ui.verbose:
57 57 > tree = revsetlang.parse(expr, lookup=revset.lookupfn(repo))
58 58 > ui.note(revsetlang.prettyformat(tree), b"\n")
59 59 > if opts["optimize"]:
60 60 > opttree = revsetlang.optimize(revsetlang.analyze(tree))
61 61 > ui.note(b"* optimized:\n", revsetlang.prettyformat(opttree),
62 62 > b"\n")
63 63 > func = revset.match(ui, expr, lookup=revset.lookupfn(repo))
64 64 > revs = func(repo)
65 65 > if ui.verbose:
66 66 > ui.note(b"* set:\n", stringutil.prettyrepr(revs), b"\n")
67 67 > for c in revs:
68 68 > ui.write(b"%d\n" % c)
69 69 > EOF
70 70 $ cat <<EOF >> $HGRCPATH
71 71 > [extensions]
72 72 > debugrevlistspec = $TESTTMP/debugrevlistspec.py
73 73 > EOF
74 74 $ trylist() {
75 75 > hg debugrevlistspec --debug "$@"
76 76 > }
77 77
78 78 $ hg init repo
79 79 $ cd repo
80 80
81 81 $ echo a > a
82 82 $ hg branch a
83 83 marked working directory as branch a
84 84 (branches are permanent and global, did you want a bookmark?)
85 85 $ hg ci -Aqm0
86 86
87 87 $ echo b > b
88 88 $ hg branch b
89 89 marked working directory as branch b
90 90 $ hg ci -Aqm1
91 91
92 92 $ rm a
93 93 $ hg branch a-b-c-
94 94 marked working directory as branch a-b-c-
95 95 $ hg ci -Aqm2 -u Bob
96 96
97 97 $ hg log -r "extra('branch', 'a-b-c-')" --template '{rev}\n'
98 98 2
99 99 $ hg log -r "extra('branch')" --template '{rev}\n'
100 100 0
101 101 1
102 102 2
103 103 $ hg log -r "extra('branch', 're:a')" --template '{rev} {branch}\n'
104 104 0 a
105 105 2 a-b-c-
106 106
107 107 $ hg co 1
108 108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 109 $ hg branch +a+b+c+
110 110 marked working directory as branch +a+b+c+
111 111 $ hg ci -Aqm3
112 112
113 113 $ hg co 2 # interleave
114 114 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
115 115 $ echo bb > b
116 116 $ hg branch -- -a-b-c-
117 117 marked working directory as branch -a-b-c-
118 118 $ hg ci -Aqm4 -d "May 12 2005"
119 119
120 120 $ hg co 3
121 121 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 122 $ hg branch !a/b/c/
123 123 marked working directory as branch !a/b/c/
124 124 $ hg ci -Aqm"5 bug"
125 125
126 126 $ hg merge 4
127 127 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
128 128 (branch merge, don't forget to commit)
129 129 $ hg branch _a_b_c_
130 130 marked working directory as branch _a_b_c_
131 131 $ hg ci -Aqm"6 issue619"
132 132
133 133 $ hg branch .a.b.c.
134 134 marked working directory as branch .a.b.c.
135 135 $ hg ci -Aqm7
136 136
137 137 $ hg branch all
138 138 marked working directory as branch all
139 139
140 140 $ hg co 4
141 141 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 142 $ hg branch Γ©
143 143 marked working directory as branch \xc3\xa9 (esc)
144 144 $ hg ci -Aqm9
145 145
146 146 $ hg tag -r6 1.0
147 147 $ hg bookmark -r6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
148 148
149 149 $ hg clone --quiet -U -r 7 . ../remote1
150 150 $ hg clone --quiet -U -r 8 . ../remote2
151 151 $ echo "[paths]" >> .hg/hgrc
152 152 $ echo "default = ../remote1" >> .hg/hgrc
153 153
154 154 trivial
155 155
156 156 $ try 0:1
157 157 (range
158 158 (symbol '0')
159 159 (symbol '1'))
160 160 * set:
161 161 <spanset+ 0:2>
162 162 0
163 163 1
164 164 $ try --optimize :
165 165 (rangeall
166 166 None)
167 167 * optimized:
168 168 (rangeall
169 169 None)
170 170 * set:
171 171 <spanset+ 0:10>
172 172 0
173 173 1
174 174 2
175 175 3
176 176 4
177 177 5
178 178 6
179 179 7
180 180 8
181 181 9
182 182 $ try 3::6
183 183 (dagrange
184 184 (symbol '3')
185 185 (symbol '6'))
186 186 * set:
187 187 <baseset+ [3, 5, 6]>
188 188 3
189 189 5
190 190 6
191 191 $ try '0|1|2'
192 192 (or
193 193 (list
194 194 (symbol '0')
195 195 (symbol '1')
196 196 (symbol '2')))
197 197 * set:
198 198 <baseset [0, 1, 2]>
199 199 0
200 200 1
201 201 2
202 202
203 203 names that should work without quoting
204 204
205 205 $ try a
206 206 (symbol 'a')
207 207 * set:
208 208 <baseset [0]>
209 209 0
210 210 $ try b-a
211 211 (minus
212 212 (symbol 'b')
213 213 (symbol 'a'))
214 214 * set:
215 215 <filteredset
216 216 <baseset [1]>,
217 217 <not
218 218 <baseset [0]>>>
219 219 1
220 220 $ try _a_b_c_
221 221 (symbol '_a_b_c_')
222 222 * set:
223 223 <baseset [6]>
224 224 6
225 225 $ try _a_b_c_-a
226 226 (minus
227 227 (symbol '_a_b_c_')
228 228 (symbol 'a'))
229 229 * set:
230 230 <filteredset
231 231 <baseset [6]>,
232 232 <not
233 233 <baseset [0]>>>
234 234 6
235 235 $ try .a.b.c.
236 236 (symbol '.a.b.c.')
237 237 * set:
238 238 <baseset [7]>
239 239 7
240 240 $ try .a.b.c.-a
241 241 (minus
242 242 (symbol '.a.b.c.')
243 243 (symbol 'a'))
244 244 * set:
245 245 <filteredset
246 246 <baseset [7]>,
247 247 <not
248 248 <baseset [0]>>>
249 249 7
250 250
251 251 names that should be caught by fallback mechanism
252 252
253 253 $ try -- '-a-b-c-'
254 254 (symbol '-a-b-c-')
255 255 * set:
256 256 <baseset [4]>
257 257 4
258 258 $ log -a-b-c-
259 259 4
260 260 $ try '+a+b+c+'
261 261 (symbol '+a+b+c+')
262 262 * set:
263 263 <baseset [3]>
264 264 3
265 265 $ try '+a+b+c+:'
266 266 (rangepost
267 267 (symbol '+a+b+c+'))
268 268 * set:
269 269 <spanset+ 3:10>
270 270 3
271 271 4
272 272 5
273 273 6
274 274 7
275 275 8
276 276 9
277 277 $ try ':+a+b+c+'
278 278 (rangepre
279 279 (symbol '+a+b+c+'))
280 280 * set:
281 281 <spanset+ 0:4>
282 282 0
283 283 1
284 284 2
285 285 3
286 286 $ try -- '-a-b-c-:+a+b+c+'
287 287 (range
288 288 (symbol '-a-b-c-')
289 289 (symbol '+a+b+c+'))
290 290 * set:
291 291 <spanset- 3:5>
292 292 4
293 293 3
294 294 $ log '-a-b-c-:+a+b+c+'
295 295 4
296 296 3
297 297
298 298 $ try -- -a-b-c--a # complains
299 299 (minus
300 300 (minus
301 301 (minus
302 302 (negate
303 303 (symbol 'a'))
304 304 (symbol 'b'))
305 305 (symbol 'c'))
306 306 (negate
307 307 (symbol 'a')))
308 308 abort: unknown revision '-a'!
309 309 [255]
310 310 $ try Γ©
311 311 (symbol '\xc3\xa9')
312 312 * set:
313 313 <baseset [9]>
314 314 9
315 315
316 316 no quoting needed
317 317
318 318 $ log ::a-b-c-
319 319 0
320 320 1
321 321 2
322 322
323 323 quoting needed
324 324
325 325 $ try '"-a-b-c-"-a'
326 326 (minus
327 327 (string '-a-b-c-')
328 328 (symbol 'a'))
329 329 * set:
330 330 <filteredset
331 331 <baseset [4]>,
332 332 <not
333 333 <baseset [0]>>>
334 334 4
335 335
336 336 $ log '1 or 2'
337 337 1
338 338 2
339 339 $ log '1|2'
340 340 1
341 341 2
342 342 $ log '1 and 2'
343 343 $ log '1&2'
344 344 $ try '1&2|3' # precedence - and is higher
345 345 (or
346 346 (list
347 347 (and
348 348 (symbol '1')
349 349 (symbol '2'))
350 350 (symbol '3')))
351 351 * set:
352 352 <addset
353 353 <baseset []>,
354 354 <baseset [3]>>
355 355 3
356 356 $ try '1|2&3'
357 357 (or
358 358 (list
359 359 (symbol '1')
360 360 (and
361 361 (symbol '2')
362 362 (symbol '3'))))
363 363 * set:
364 364 <addset
365 365 <baseset [1]>,
366 366 <baseset []>>
367 367 1
368 368 $ try '1&2&3' # associativity
369 369 (and
370 370 (and
371 371 (symbol '1')
372 372 (symbol '2'))
373 373 (symbol '3'))
374 374 * set:
375 375 <baseset []>
376 376 $ try '1|(2|3)'
377 377 (or
378 378 (list
379 379 (symbol '1')
380 380 (group
381 381 (or
382 382 (list
383 383 (symbol '2')
384 384 (symbol '3'))))))
385 385 * set:
386 386 <addset
387 387 <baseset [1]>,
388 388 <baseset [2, 3]>>
389 389 1
390 390 2
391 391 3
392 392 $ log '1.0' # tag
393 393 6
394 394 $ log 'a' # branch
395 395 0
396 396 $ log '2785f51ee'
397 397 0
398 398 $ log 'date(2005)'
399 399 4
400 400 $ log 'date(this is a test)'
401 401 hg: parse error at 10: unexpected token: symbol
402 402 (date(this is a test)
403 403 ^ here)
404 404 [255]
405 405 $ log 'date()'
406 406 hg: parse error: date requires a string
407 407 [255]
408 408 $ log 'date'
409 409 abort: unknown revision 'date'!
410 410 [255]
411 411 $ log 'date('
412 412 hg: parse error at 5: not a prefix: end
413 413 (date(
414 414 ^ here)
415 415 [255]
416 416 $ log 'date("\xy")'
417 417 hg: parse error: invalid \x escape* (glob)
418 418 [255]
419 419 $ log 'date(tip)'
420 420 hg: parse error: invalid date: 'tip'
421 421 [255]
422 422 $ log '0:date'
423 423 abort: unknown revision 'date'!
424 424 [255]
425 425 $ log '::"date"'
426 426 abort: unknown revision 'date'!
427 427 [255]
428 428 $ hg book date -r 4
429 429 $ log '0:date'
430 430 0
431 431 1
432 432 2
433 433 3
434 434 4
435 435 $ log '::date'
436 436 0
437 437 1
438 438 2
439 439 4
440 440 $ log '::"date"'
441 441 0
442 442 1
443 443 2
444 444 4
445 445 $ log 'date(2005) and 1::'
446 446 4
447 447 $ hg book -d date
448 448
449 449 function name should be a symbol
450 450
451 451 $ log '"date"(2005)'
452 452 hg: parse error: not a symbol
453 453 [255]
454 454
455 455 keyword arguments
456 456
457 457 $ log 'extra(branch, value=a)'
458 458 0
459 459
460 460 $ log 'extra(branch, a, b)'
461 461 hg: parse error: extra takes at most 2 positional arguments
462 462 [255]
463 463 $ log 'extra(a, label=b)'
464 464 hg: parse error: extra got multiple values for keyword argument 'label'
465 465 [255]
466 466 $ log 'extra(label=branch, default)'
467 467 hg: parse error: extra got an invalid argument
468 468 [255]
469 469 $ log 'extra(branch, foo+bar=baz)'
470 470 hg: parse error: extra got an invalid argument
471 471 [255]
472 472 $ log 'extra(unknown=branch)'
473 473 hg: parse error: extra got an unexpected keyword argument 'unknown'
474 474 [255]
475 475
476 476 $ try 'foo=bar|baz'
477 477 (keyvalue
478 478 (symbol 'foo')
479 479 (or
480 480 (list
481 481 (symbol 'bar')
482 482 (symbol 'baz'))))
483 483 hg: parse error: can't use a key-value pair in this context
484 484 [255]
485 485
486 486 right-hand side should be optimized recursively
487 487
488 488 $ try --optimize 'foo=(not public())'
489 489 (keyvalue
490 490 (symbol 'foo')
491 491 (group
492 492 (not
493 493 (func
494 494 (symbol 'public')
495 495 None))))
496 496 * optimized:
497 497 (keyvalue
498 498 (symbol 'foo')
499 499 (func
500 500 (symbol '_notpublic')
501 501 None))
502 502 hg: parse error: can't use a key-value pair in this context
503 503 [255]
504 504
505 505 relation-subscript operator has the highest binding strength (as function call):
506 506
507 507 $ hg debugrevspec -p parsed 'tip:tip^#generations[-1]'
508 508 * parsed:
509 509 (range
510 510 (symbol 'tip')
511 511 (relsubscript
512 512 (parentpost
513 513 (symbol 'tip'))
514 514 (symbol 'generations')
515 515 (negate
516 516 (symbol '1'))))
517 517 9
518 518 8
519 519 7
520 520 6
521 521 5
522 522 4
523 523
524 524 $ hg debugrevspec -p parsed --no-show-revs 'not public()#generations[0]'
525 525 * parsed:
526 526 (not
527 527 (relsubscript
528 528 (func
529 529 (symbol 'public')
530 530 None)
531 531 (symbol 'generations')
532 532 (symbol '0')))
533 533
534 534 left-hand side of relation-subscript operator should be optimized recursively:
535 535
536 536 $ hg debugrevspec -p analyzed -p optimized --no-show-revs \
537 537 > '(not public())#generations[0]'
538 538 * analyzed:
539 539 (relsubscript
540 540 (not
541 541 (func
542 542 (symbol 'public')
543 543 None))
544 544 (symbol 'generations')
545 545 (symbol '0'))
546 546 * optimized:
547 547 (relsubscript
548 548 (func
549 549 (symbol '_notpublic')
550 550 None)
551 551 (symbol 'generations')
552 552 (symbol '0'))
553 553
554 554 resolution of subscript and relation-subscript ternary operators:
555 555
556 556 $ hg debugrevspec -p analyzed 'tip[0]'
557 557 * analyzed:
558 558 (subscript
559 559 (symbol 'tip')
560 560 (symbol '0'))
561 561 hg: parse error: can't use a subscript in this context
562 562 [255]
563 563
564 564 $ hg debugrevspec -p analyzed 'tip#rel[0]'
565 565 * analyzed:
566 566 (relsubscript
567 567 (symbol 'tip')
568 568 (symbol 'rel')
569 569 (symbol '0'))
570 570 hg: parse error: unknown identifier: rel
571 571 [255]
572 572
573 573 $ hg debugrevspec -p analyzed '(tip#rel)[0]'
574 574 * analyzed:
575 575 (subscript
576 576 (relation
577 577 (symbol 'tip')
578 578 (symbol 'rel'))
579 579 (symbol '0'))
580 580 hg: parse error: can't use a subscript in this context
581 581 [255]
582 582
583 583 $ hg debugrevspec -p analyzed 'tip#rel[0][1]'
584 584 * analyzed:
585 585 (subscript
586 586 (relsubscript
587 587 (symbol 'tip')
588 588 (symbol 'rel')
589 589 (symbol '0'))
590 590 (symbol '1'))
591 591 hg: parse error: can't use a subscript in this context
592 592 [255]
593 593
594 594 $ hg debugrevspec -p analyzed 'tip#rel0#rel1[1]'
595 595 * analyzed:
596 596 (relsubscript
597 597 (relation
598 598 (symbol 'tip')
599 599 (symbol 'rel0'))
600 600 (symbol 'rel1')
601 601 (symbol '1'))
602 602 hg: parse error: unknown identifier: rel1
603 603 [255]
604 604
605 605 $ hg debugrevspec -p analyzed 'tip#rel0[0]#rel1[1]'
606 606 * analyzed:
607 607 (relsubscript
608 608 (relsubscript
609 609 (symbol 'tip')
610 610 (symbol 'rel0')
611 611 (symbol '0'))
612 612 (symbol 'rel1')
613 613 (symbol '1'))
614 614 hg: parse error: unknown identifier: rel1
615 615 [255]
616 616
617 617 parse errors of relation, subscript and relation-subscript operators:
618 618
619 619 $ hg debugrevspec '[0]'
620 620 hg: parse error at 0: not a prefix: [
621 621 ([0]
622 622 ^ here)
623 623 [255]
624 624 $ hg debugrevspec '.#'
625 625 hg: parse error at 2: not a prefix: end
626 626 (.#
627 627 ^ here)
628 628 [255]
629 629 $ hg debugrevspec '#rel'
630 630 hg: parse error at 0: not a prefix: #
631 631 (#rel
632 632 ^ here)
633 633 [255]
634 634 $ hg debugrevspec '.#rel[0'
635 635 hg: parse error at 7: unexpected token: end
636 636 (.#rel[0
637 637 ^ here)
638 638 [255]
639 639 $ hg debugrevspec '.]'
640 640 hg: parse error at 1: invalid token
641 641 (.]
642 642 ^ here)
643 643 [255]
644 644
645 645 $ hg debugrevspec '.#generations[a]'
646 646 hg: parse error: relation subscript must be an integer
647 647 [255]
648 648 $ hg debugrevspec '.#generations[1-2]'
649 649 hg: parse error: relation subscript must be an integer
650 650 [255]
651 651 $ hg debugrevspec '.#generations[foo:bar]'
652 652 hg: parse error: relation subscript bounds must be integers
653 653 [255]
654 654
655 655 suggested relations
656 656
657 657 $ hg debugrevspec '.#generafions[0]'
658 658 hg: parse error: unknown identifier: generafions
659 659 (did you mean generations?)
660 660 [255]
661 661
662 662 $ hg debugrevspec '.#f[0]'
663 663 hg: parse error: unknown identifier: f
664 664 [255]
665 665
666 666 parsed tree at stages:
667 667
668 668 $ hg debugrevspec -p all '()'
669 669 * parsed:
670 670 (group
671 671 None)
672 672 * expanded:
673 673 (group
674 674 None)
675 675 * concatenated:
676 676 (group
677 677 None)
678 678 * analyzed:
679 679 None
680 680 * optimized:
681 681 None
682 682 hg: parse error: missing argument
683 683 [255]
684 684
685 685 $ hg debugrevspec --no-optimized -p all '()'
686 686 * parsed:
687 687 (group
688 688 None)
689 689 * expanded:
690 690 (group
691 691 None)
692 692 * concatenated:
693 693 (group
694 694 None)
695 695 * analyzed:
696 696 None
697 697 hg: parse error: missing argument
698 698 [255]
699 699
700 700 $ hg debugrevspec -p parsed -p analyzed -p optimized '(0|1)-1'
701 701 * parsed:
702 702 (minus
703 703 (group
704 704 (or
705 705 (list
706 706 (symbol '0')
707 707 (symbol '1'))))
708 708 (symbol '1'))
709 709 * analyzed:
710 710 (and
711 711 (or
712 712 (list
713 713 (symbol '0')
714 714 (symbol '1')))
715 715 (not
716 716 (symbol '1')))
717 717 * optimized:
718 718 (difference
719 719 (func
720 720 (symbol '_list')
721 721 (string '0\x001'))
722 722 (symbol '1'))
723 723 0
724 724
725 725 $ hg debugrevspec -p unknown '0'
726 726 abort: invalid stage name: unknown
727 727 [255]
728 728
729 729 $ hg debugrevspec -p all --optimize '0'
730 730 abort: cannot use --optimize with --show-stage
731 731 [255]
732 732
733 733 verify optimized tree:
734 734
735 735 $ hg debugrevspec --verify '0|1'
736 736
737 737 $ hg debugrevspec --verify -v -p analyzed -p optimized 'r3232() & 2'
738 738 * analyzed:
739 739 (and
740 740 (func
741 741 (symbol 'r3232')
742 742 None)
743 743 (symbol '2'))
744 744 * optimized:
745 745 (andsmally
746 746 (func
747 747 (symbol 'r3232')
748 748 None)
749 749 (symbol '2'))
750 750 * analyzed set:
751 751 <baseset [2]>
752 752 * optimized set:
753 753 <baseset [2, 2]>
754 754 --- analyzed
755 755 +++ optimized
756 756 2
757 757 +2
758 758 [1]
759 759
760 760 $ hg debugrevspec --no-optimized --verify-optimized '0'
761 761 abort: cannot use --verify-optimized with --no-optimized
762 762 [255]
763 763
764 764 Test that symbols only get parsed as functions if there's an opening
765 765 parenthesis.
766 766
767 767 $ hg book only -r 9
768 768 $ log 'only(only)' # Outer "only" is a function, inner "only" is the bookmark
769 769 8
770 770 9
771 771
772 772 ':y' behaves like '0:y', but can't be rewritten as such since the revision '0'
773 773 may be hidden (issue5385)
774 774
775 775 $ try -p parsed -p analyzed ':'
776 776 * parsed:
777 777 (rangeall
778 778 None)
779 779 * analyzed:
780 780 (rangeall
781 781 None)
782 782 * set:
783 783 <spanset+ 0:10>
784 784 0
785 785 1
786 786 2
787 787 3
788 788 4
789 789 5
790 790 6
791 791 7
792 792 8
793 793 9
794 794 $ try -p analyzed ':1'
795 795 * analyzed:
796 796 (rangepre
797 797 (symbol '1'))
798 798 * set:
799 799 <spanset+ 0:2>
800 800 0
801 801 1
802 802 $ try -p analyzed ':(1|2)'
803 803 * analyzed:
804 804 (rangepre
805 805 (or
806 806 (list
807 807 (symbol '1')
808 808 (symbol '2'))))
809 809 * set:
810 810 <spanset+ 0:3>
811 811 0
812 812 1
813 813 2
814 814 $ try -p analyzed ':(1&2)'
815 815 * analyzed:
816 816 (rangepre
817 817 (and
818 818 (symbol '1')
819 819 (symbol '2')))
820 820 * set:
821 821 <baseset []>
822 822
823 823 infix/suffix resolution of ^ operator (issue2884, issue5764):
824 824
825 825 x^:y means (x^):y
826 826
827 827 $ try '1^:2'
828 828 (range
829 829 (parentpost
830 830 (symbol '1'))
831 831 (symbol '2'))
832 832 * set:
833 833 <spanset+ 0:3>
834 834 0
835 835 1
836 836 2
837 837
838 838 $ try '1^::2'
839 839 (dagrange
840 840 (parentpost
841 841 (symbol '1'))
842 842 (symbol '2'))
843 843 * set:
844 844 <baseset+ [0, 1, 2]>
845 845 0
846 846 1
847 847 2
848 848
849 849 $ try '1^..2'
850 850 (dagrange
851 851 (parentpost
852 852 (symbol '1'))
853 853 (symbol '2'))
854 854 * set:
855 855 <baseset+ [0, 1, 2]>
856 856 0
857 857 1
858 858 2
859 859
860 860 $ try '9^:'
861 861 (rangepost
862 862 (parentpost
863 863 (symbol '9')))
864 864 * set:
865 865 <spanset+ 8:10>
866 866 8
867 867 9
868 868
869 869 $ try '9^::'
870 870 (dagrangepost
871 871 (parentpost
872 872 (symbol '9')))
873 873 * set:
874 874 <generatorsetasc+>
875 875 8
876 876 9
877 877
878 878 $ try '9^..'
879 879 (dagrangepost
880 880 (parentpost
881 881 (symbol '9')))
882 882 * set:
883 883 <generatorsetasc+>
884 884 8
885 885 9
886 886
887 887 x^:y should be resolved before omitting group operators
888 888
889 889 $ try '1^(:2)'
890 890 (parent
891 891 (symbol '1')
892 892 (group
893 893 (rangepre
894 894 (symbol '2'))))
895 895 hg: parse error: ^ expects a number 0, 1, or 2
896 896 [255]
897 897
898 898 x^:y should be resolved recursively
899 899
900 900 $ try 'sort(1^:2)'
901 901 (func
902 902 (symbol 'sort')
903 903 (range
904 904 (parentpost
905 905 (symbol '1'))
906 906 (symbol '2')))
907 907 * set:
908 908 <spanset+ 0:3>
909 909 0
910 910 1
911 911 2
912 912
913 913 $ try '(3^:4)^:2'
914 914 (range
915 915 (parentpost
916 916 (group
917 917 (range
918 918 (parentpost
919 919 (symbol '3'))
920 920 (symbol '4'))))
921 921 (symbol '2'))
922 922 * set:
923 923 <spanset+ 0:3>
924 924 0
925 925 1
926 926 2
927 927
928 928 $ try '(3^::4)^::2'
929 929 (dagrange
930 930 (parentpost
931 931 (group
932 932 (dagrange
933 933 (parentpost
934 934 (symbol '3'))
935 935 (symbol '4'))))
936 936 (symbol '2'))
937 937 * set:
938 938 <baseset+ [0, 1, 2]>
939 939 0
940 940 1
941 941 2
942 942
943 943 $ try '(9^:)^:'
944 944 (rangepost
945 945 (parentpost
946 946 (group
947 947 (rangepost
948 948 (parentpost
949 949 (symbol '9'))))))
950 950 * set:
951 951 <spanset+ 4:10>
952 952 4
953 953 5
954 954 6
955 955 7
956 956 8
957 957 9
958 958
959 959 x^ in alias should also be resolved
960 960
961 961 $ try 'A' --config 'revsetalias.A=1^:2'
962 962 (symbol 'A')
963 963 * expanded:
964 964 (range
965 965 (parentpost
966 966 (symbol '1'))
967 967 (symbol '2'))
968 968 * set:
969 969 <spanset+ 0:3>
970 970 0
971 971 1
972 972 2
973 973
974 974 $ try 'A:2' --config 'revsetalias.A=1^'
975 975 (range
976 976 (symbol 'A')
977 977 (symbol '2'))
978 978 * expanded:
979 979 (range
980 980 (parentpost
981 981 (symbol '1'))
982 982 (symbol '2'))
983 983 * set:
984 984 <spanset+ 0:3>
985 985 0
986 986 1
987 987 2
988 988
989 989 but not beyond the boundary of alias expansion, because the resolution should
990 990 be made at the parsing stage
991 991
992 992 $ try '1^A' --config 'revsetalias.A=:2'
993 993 (parent
994 994 (symbol '1')
995 995 (symbol 'A'))
996 996 * expanded:
997 997 (parent
998 998 (symbol '1')
999 999 (rangepre
1000 1000 (symbol '2')))
1001 1001 hg: parse error: ^ expects a number 0, 1, or 2
1002 1002 [255]
1003 1003
1004 1004 '::' itself isn't a valid expression
1005 1005
1006 1006 $ try '::'
1007 1007 (dagrangeall
1008 1008 None)
1009 1009 hg: parse error: can't use '::' in this context
1010 1010 [255]
1011 1011
1012 1012 ancestor can accept 0 or more arguments
1013 1013
1014 1014 $ log 'ancestor()'
1015 1015 $ log 'ancestor(1)'
1016 1016 1
1017 1017 $ log 'ancestor(4,5)'
1018 1018 1
1019 1019 $ log 'ancestor(4,5) and 4'
1020 1020 $ log 'ancestor(0,0,1,3)'
1021 1021 0
1022 1022 $ log 'ancestor(3,1,5,3,5,1)'
1023 1023 1
1024 1024 $ log 'ancestor(0,1,3,5)'
1025 1025 0
1026 1026 $ log 'ancestor(1,2,3,4,5)'
1027 1027 1
1028 1028
1029 1029 test ancestors
1030 1030
1031 1031 $ hg log -G -T '{rev}\n' --config experimental.graphshorten=True
1032 1032 @ 9
1033 1033 o 8
1034 1034 | o 7
1035 1035 | o 6
1036 1036 |/|
1037 1037 | o 5
1038 1038 o | 4
1039 1039 | o 3
1040 1040 o | 2
1041 1041 |/
1042 1042 o 1
1043 1043 o 0
1044 1044
1045 1045 $ log 'ancestors(5)'
1046 1046 0
1047 1047 1
1048 1048 3
1049 1049 5
1050 1050 $ log 'ancestor(ancestors(5))'
1051 1051 0
1052 1052 $ log '::r3232()'
1053 1053 0
1054 1054 1
1055 1055 2
1056 1056 3
1057 1057
1058 1058 test common ancestors
1059 1059
1060 1060 $ hg log -T '{rev}\n' -r 'commonancestors(7 + 9)'
1061 1061 0
1062 1062 1
1063 1063 2
1064 1064 4
1065 1065
1066 1066 $ hg log -T '{rev}\n' -r 'commonancestors(heads(all()))'
1067 1067 0
1068 1068 1
1069 1069 2
1070 1070 4
1071 1071
1072 1072 $ hg log -T '{rev}\n' -r 'commonancestors(9)'
1073 1073 0
1074 1074 1
1075 1075 2
1076 1076 4
1077 1077 8
1078 1078 9
1079 1079
1080 1080 $ hg log -T '{rev}\n' -r 'commonancestors(8 + 9)'
1081 1081 0
1082 1082 1
1083 1083 2
1084 1084 4
1085 1085 8
1086 1086
1087 1087 test the specialized implementation of heads(commonancestors(..))
1088 1088 (2 gcas is tested in test-merge-criss-cross.t)
1089 1089
1090 1090 $ hg log -T '{rev}\n' -r 'heads(commonancestors(7 + 9))'
1091 1091 4
1092 1092 $ hg log -T '{rev}\n' -r 'heads(commonancestors(heads(all())))'
1093 1093 4
1094 1094 $ hg log -T '{rev}\n' -r 'heads(commonancestors(9))'
1095 1095 9
1096 1096 $ hg log -T '{rev}\n' -r 'heads(commonancestors(8 + 9))'
1097 1097 8
1098 1098
1099 1099 test ancestor variants of empty revision
1100 1100
1101 1101 $ log 'ancestor(none())'
1102 1102 $ log 'ancestors(none())'
1103 1103 $ log 'commonancestors(none())'
1104 1104 $ log 'heads(commonancestors(none()))'
1105 1105
1106 1106 test ancestors with depth limit
1107 1107
1108 1108 (depth=0 selects the node itself)
1109 1109
1110 1110 $ log 'reverse(ancestors(9, depth=0))'
1111 1111 9
1112 1112
1113 1113 (interleaved: '4' would be missing if heap queue were higher depth first)
1114 1114
1115 1115 $ log 'reverse(ancestors(8:9, depth=1))'
1116 1116 9
1117 1117 8
1118 1118 4
1119 1119
1120 1120 (interleaved: '2' would be missing if heap queue were higher depth first)
1121 1121
1122 1122 $ log 'reverse(ancestors(7+8, depth=2))'
1123 1123 8
1124 1124 7
1125 1125 6
1126 1126 5
1127 1127 4
1128 1128 2
1129 1129
1130 1130 (walk example above by separate queries)
1131 1131
1132 1132 $ log 'reverse(ancestors(8, depth=2)) + reverse(ancestors(7, depth=2))'
1133 1133 8
1134 1134 4
1135 1135 2
1136 1136 7
1137 1137 6
1138 1138 5
1139 1139
1140 1140 (walk 2nd and 3rd ancestors)
1141 1141
1142 1142 $ log 'reverse(ancestors(7, depth=3, startdepth=2))'
1143 1143 5
1144 1144 4
1145 1145 3
1146 1146 2
1147 1147
1148 1148 (interleaved: '4' would be missing if higher-depth ancestors weren't scanned)
1149 1149
1150 1150 $ log 'reverse(ancestors(7+8, depth=2, startdepth=2))'
1151 1151 5
1152 1152 4
1153 1153 2
1154 1154
1155 1155 (note that 'ancestors(x, depth=y, startdepth=z)' does not identical to
1156 1156 'ancestors(x, depth=y) - ancestors(x, depth=z-1)' because a node may have
1157 1157 multiple depths)
1158 1158
1159 1159 $ log 'reverse(ancestors(7+8, depth=2) - ancestors(7+8, depth=1))'
1160 1160 5
1161 1161 2
1162 1162
1163 1163 test bad arguments passed to ancestors()
1164 1164
1165 1165 $ log 'ancestors(., depth=-1)'
1166 1166 hg: parse error: negative depth
1167 1167 [255]
1168 1168 $ log 'ancestors(., depth=foo)'
1169 1169 hg: parse error: ancestors expects an integer depth
1170 1170 [255]
1171 1171
1172 1172 test descendants
1173 1173
1174 1174 $ hg log -G -T '{rev}\n' --config experimental.graphshorten=True
1175 1175 @ 9
1176 1176 o 8
1177 1177 | o 7
1178 1178 | o 6
1179 1179 |/|
1180 1180 | o 5
1181 1181 o | 4
1182 1182 | o 3
1183 1183 o | 2
1184 1184 |/
1185 1185 o 1
1186 1186 o 0
1187 1187
1188 1188 (null is ultimate root and has optimized path)
1189 1189
1190 1190 $ log 'null:4 & descendants(null)'
1191 1191 -1
1192 1192 0
1193 1193 1
1194 1194 2
1195 1195 3
1196 1196 4
1197 1197
1198 1198 (including merge)
1199 1199
1200 1200 $ log ':8 & descendants(2)'
1201 1201 2
1202 1202 4
1203 1203 6
1204 1204 7
1205 1205 8
1206 1206
1207 1207 (multiple roots)
1208 1208
1209 1209 $ log ':8 & descendants(2+5)'
1210 1210 2
1211 1211 4
1212 1212 5
1213 1213 6
1214 1214 7
1215 1215 8
1216 1216
1217 1217 test descendants with depth limit
1218 1218
1219 1219 (depth=0 selects the node itself)
1220 1220
1221 1221 $ log 'descendants(0, depth=0)'
1222 1222 0
1223 1223 $ log 'null: & descendants(null, depth=0)'
1224 1224 -1
1225 1225
1226 1226 (p2 = null should be ignored)
1227 1227
1228 1228 $ log 'null: & descendants(null, depth=2)'
1229 1229 -1
1230 1230 0
1231 1231 1
1232 1232
1233 1233 (multiple paths: depth(6) = (2, 3))
1234 1234
1235 1235 $ log 'descendants(1+3, depth=2)'
1236 1236 1
1237 1237 2
1238 1238 3
1239 1239 4
1240 1240 5
1241 1241 6
1242 1242
1243 1243 (multiple paths: depth(5) = (1, 2), depth(6) = (2, 3))
1244 1244
1245 1245 $ log 'descendants(3+1, depth=2, startdepth=2)'
1246 1246 4
1247 1247 5
1248 1248 6
1249 1249
1250 1250 (multiple depths: depth(6) = (0, 2, 4), search for depth=2)
1251 1251
1252 1252 $ log 'descendants(0+3+6, depth=3, startdepth=1)'
1253 1253 1
1254 1254 2
1255 1255 3
1256 1256 4
1257 1257 5
1258 1258 6
1259 1259 7
1260 1260
1261 1261 (multiple depths: depth(6) = (0, 4), no match)
1262 1262
1263 1263 $ log 'descendants(0+6, depth=3, startdepth=1)'
1264 1264 1
1265 1265 2
1266 1266 3
1267 1267 4
1268 1268 5
1269 1269 7
1270 1270
1271 1271 test ancestors/descendants relation subscript:
1272 1272
1273 1273 $ log 'tip#generations[0]'
1274 1274 9
1275 1275 $ log '.#generations[-1]'
1276 1276 8
1277 1277 $ log '.#g[(-1)]'
1278 1278 8
1279 1279
1280 1280 $ log '6#generations[0:1]'
1281 1281 6
1282 1282 7
1283 1283 $ log '6#generations[-1:1]'
1284 1284 4
1285 1285 5
1286 1286 6
1287 1287 7
1288 1288 $ log '6#generations[0:]'
1289 1289 6
1290 1290 7
1291 1291 $ log '5#generations[:0]'
1292 1292 0
1293 1293 1
1294 1294 3
1295 1295 5
1296 1296 $ log '3#generations[:]'
1297 1297 0
1298 1298 1
1299 1299 3
1300 1300 5
1301 1301 6
1302 1302 7
1303 $ log 'tip#generations[1:-1]'
1303 1304
1304 1305 $ hg debugrevspec -p parsed 'roots(:)#g[2]'
1305 1306 * parsed:
1306 1307 (relsubscript
1307 1308 (func
1308 1309 (symbol 'roots')
1309 1310 (rangeall
1310 1311 None))
1311 1312 (symbol 'g')
1312 1313 (symbol '2'))
1313 1314 2
1314 1315 3
1315 1316
1316 1317 test author
1317 1318
1318 1319 $ log 'author(bob)'
1319 1320 2
1320 1321 $ log 'author("re:bob|test")'
1321 1322 0
1322 1323 1
1323 1324 2
1324 1325 3
1325 1326 4
1326 1327 5
1327 1328 6
1328 1329 7
1329 1330 8
1330 1331 9
1331 1332 $ log 'author(r"re:\S")'
1332 1333 0
1333 1334 1
1334 1335 2
1335 1336 3
1336 1337 4
1337 1338 5
1338 1339 6
1339 1340 7
1340 1341 8
1341 1342 9
1342 1343 $ log 'branch(Γ©)'
1343 1344 8
1344 1345 9
1345 1346 $ log 'branch(a)'
1346 1347 0
1347 1348 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n'
1348 1349 0 a
1349 1350 2 a-b-c-
1350 1351 3 +a+b+c+
1351 1352 4 -a-b-c-
1352 1353 5 !a/b/c/
1353 1354 6 _a_b_c_
1354 1355 7 .a.b.c.
1355 1356 $ log 'children(ancestor(4,5))'
1356 1357 2
1357 1358 3
1358 1359
1359 1360 $ log 'children(4)'
1360 1361 6
1361 1362 8
1362 1363 $ log 'children(null)'
1363 1364 0
1364 1365
1365 1366 $ log 'closed()'
1366 1367 $ log 'contains(a)'
1367 1368 0
1368 1369 1
1369 1370 3
1370 1371 5
1371 1372 $ log 'contains("../repo/a")'
1372 1373 0
1373 1374 1
1374 1375 3
1375 1376 5
1376 1377 $ log 'desc(B)'
1377 1378 5
1378 1379 $ hg log -r 'desc(r"re:S?u")' --template "{rev} {desc|firstline}\n"
1379 1380 5 5 bug
1380 1381 6 6 issue619
1381 1382 $ log 'descendants(2 or 3)'
1382 1383 2
1383 1384 3
1384 1385 4
1385 1386 5
1386 1387 6
1387 1388 7
1388 1389 8
1389 1390 9
1390 1391 $ log 'file("b*")'
1391 1392 1
1392 1393 4
1393 1394 $ log 'filelog("b")'
1394 1395 1
1395 1396 4
1396 1397 $ log 'filelog("../repo/b")'
1397 1398 1
1398 1399 4
1399 1400 $ log 'follow()'
1400 1401 0
1401 1402 1
1402 1403 2
1403 1404 4
1404 1405 8
1405 1406 9
1406 1407 $ log 'grep("issue\d+")'
1407 1408 6
1408 1409 $ try 'grep("(")' # invalid regular expression
1409 1410 (func
1410 1411 (symbol 'grep')
1411 1412 (string '('))
1412 1413 hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re)
1413 1414 [255]
1414 1415 $ try 'grep("\bissue\d+")'
1415 1416 (func
1416 1417 (symbol 'grep')
1417 1418 (string '\x08issue\\d+'))
1418 1419 * set:
1419 1420 <filteredset
1420 1421 <fullreposet+ 0:10>,
1421 1422 <grep '\x08issue\\d+'>>
1422 1423 $ try 'grep(r"\bissue\d+")'
1423 1424 (func
1424 1425 (symbol 'grep')
1425 1426 (string '\\bissue\\d+'))
1426 1427 * set:
1427 1428 <filteredset
1428 1429 <fullreposet+ 0:10>,
1429 1430 <grep '\\bissue\\d+'>>
1430 1431 6
1431 1432 $ try 'grep(r"\")'
1432 1433 hg: parse error at 7: unterminated string
1433 1434 (grep(r"\")
1434 1435 ^ here)
1435 1436 [255]
1436 1437 $ log 'head()'
1437 1438 0
1438 1439 1
1439 1440 2
1440 1441 3
1441 1442 4
1442 1443 5
1443 1444 6
1444 1445 7
1445 1446 9
1446 1447
1447 1448 Test heads
1448 1449
1449 1450 $ log 'heads(6::)'
1450 1451 7
1451 1452
1452 1453 heads() can be computed in subset '9:'
1453 1454
1454 1455 $ hg debugrevspec -s '9: & heads(all())'
1455 1456 * set:
1456 1457 <filteredset
1457 1458 <baseset [9]>,
1458 1459 <baseset+ [7, 9]>>
1459 1460 9
1460 1461
1461 1462 but should follow the order of the subset
1462 1463
1463 1464 $ log 'heads(all())'
1464 1465 7
1465 1466 9
1466 1467 $ log 'heads(tip:0)'
1467 1468 7
1468 1469 9
1469 1470 $ log 'tip:0 & heads(all())'
1470 1471 9
1471 1472 7
1472 1473 $ log 'tip:0 & heads(0:tip)'
1473 1474 9
1474 1475 7
1475 1476
1476 1477 $ log 'keyword(issue)'
1477 1478 6
1478 1479 $ log 'keyword("test a")'
1479 1480
1480 1481 Test first (=limit) and last
1481 1482
1482 1483 $ log 'limit(head(), 1)'
1483 1484 0
1484 1485 $ log 'limit(author("re:bob|test"), 3, 5)'
1485 1486 5
1486 1487 6
1487 1488 7
1488 1489 $ log 'limit(author("re:bob|test"), offset=6)'
1489 1490 6
1490 1491 $ log 'limit(author("re:bob|test"), offset=10)'
1491 1492 $ log 'limit(all(), 1, -1)'
1492 1493 hg: parse error: negative offset
1493 1494 [255]
1494 1495 $ log 'limit(all(), -1)'
1495 1496 hg: parse error: negative number to select
1496 1497 [255]
1497 1498 $ log 'limit(all(), 0)'
1498 1499
1499 1500 $ log 'last(all(), -1)'
1500 1501 hg: parse error: negative number to select
1501 1502 [255]
1502 1503 $ log 'last(all(), 0)'
1503 1504 $ log 'last(all(), 1)'
1504 1505 9
1505 1506 $ log 'last(all(), 2)'
1506 1507 8
1507 1508 9
1508 1509
1509 1510 Test smartset.slice() by first/last()
1510 1511
1511 1512 (using unoptimized set, filteredset as example)
1512 1513
1513 1514 $ hg debugrevspec --no-show-revs -s '0:7 & branch("re:")'
1514 1515 * set:
1515 1516 <filteredset
1516 1517 <spanset+ 0:8>,
1517 1518 <branch 're:'>>
1518 1519 $ log 'limit(0:7 & branch("re:"), 3, 4)'
1519 1520 4
1520 1521 5
1521 1522 6
1522 1523 $ log 'limit(7:0 & branch("re:"), 3, 4)'
1523 1524 3
1524 1525 2
1525 1526 1
1526 1527 $ log 'last(0:7 & branch("re:"), 2)'
1527 1528 6
1528 1529 7
1529 1530
1530 1531 (using baseset)
1531 1532
1532 1533 $ hg debugrevspec --no-show-revs -s 0+1+2+3+4+5+6+7
1533 1534 * set:
1534 1535 <baseset [0, 1, 2, 3, 4, 5, 6, 7]>
1535 1536 $ hg debugrevspec --no-show-revs -s 0::7
1536 1537 * set:
1537 1538 <baseset+ [0, 1, 2, 3, 4, 5, 6, 7]>
1538 1539 $ log 'limit(0+1+2+3+4+5+6+7, 3, 4)'
1539 1540 4
1540 1541 5
1541 1542 6
1542 1543 $ log 'limit(sort(0::7, rev), 3, 4)'
1543 1544 4
1544 1545 5
1545 1546 6
1546 1547 $ log 'limit(sort(0::7, -rev), 3, 4)'
1547 1548 3
1548 1549 2
1549 1550 1
1550 1551 $ log 'last(sort(0::7, rev), 2)'
1551 1552 6
1552 1553 7
1553 1554 $ hg debugrevspec -s 'limit(sort(0::7, rev), 3, 6)'
1554 1555 * set:
1555 1556 <baseset+ [6, 7]>
1556 1557 6
1557 1558 7
1558 1559 $ hg debugrevspec -s 'limit(sort(0::7, rev), 3, 9)'
1559 1560 * set:
1560 1561 <baseset+ []>
1561 1562 $ hg debugrevspec -s 'limit(sort(0::7, -rev), 3, 6)'
1562 1563 * set:
1563 1564 <baseset- [0, 1]>
1564 1565 1
1565 1566 0
1566 1567 $ hg debugrevspec -s 'limit(sort(0::7, -rev), 3, 9)'
1567 1568 * set:
1568 1569 <baseset- []>
1569 1570 $ hg debugrevspec -s 'limit(0::7, 0)'
1570 1571 * set:
1571 1572 <baseset+ []>
1572 1573
1573 1574 (using spanset)
1574 1575
1575 1576 $ hg debugrevspec --no-show-revs -s 0:7
1576 1577 * set:
1577 1578 <spanset+ 0:8>
1578 1579 $ log 'limit(0:7, 3, 4)'
1579 1580 4
1580 1581 5
1581 1582 6
1582 1583 $ log 'limit(7:0, 3, 4)'
1583 1584 3
1584 1585 2
1585 1586 1
1586 1587 $ log 'limit(0:7, 3, 6)'
1587 1588 6
1588 1589 7
1589 1590 $ log 'limit(7:0, 3, 6)'
1590 1591 1
1591 1592 0
1592 1593 $ log 'last(0:7, 2)'
1593 1594 6
1594 1595 7
1595 1596 $ hg debugrevspec -s 'limit(0:7, 3, 6)'
1596 1597 * set:
1597 1598 <spanset+ 6:8>
1598 1599 6
1599 1600 7
1600 1601 $ hg debugrevspec -s 'limit(0:7, 3, 9)'
1601 1602 * set:
1602 1603 <spanset+ 8:8>
1603 1604 $ hg debugrevspec -s 'limit(7:0, 3, 6)'
1604 1605 * set:
1605 1606 <spanset- 0:2>
1606 1607 1
1607 1608 0
1608 1609 $ hg debugrevspec -s 'limit(7:0, 3, 9)'
1609 1610 * set:
1610 1611 <spanset- 0:0>
1611 1612 $ hg debugrevspec -s 'limit(0:7, 0)'
1612 1613 * set:
1613 1614 <spanset+ 0:0>
1614 1615
1615 1616 Test order of first/last revisions
1616 1617
1617 1618 $ hg debugrevspec -s 'first(4:0, 3) & 3:'
1618 1619 * set:
1619 1620 <filteredset
1620 1621 <spanset- 2:5>,
1621 1622 <spanset+ 3:10>>
1622 1623 4
1623 1624 3
1624 1625
1625 1626 $ hg debugrevspec -s '3: & first(4:0, 3)'
1626 1627 * set:
1627 1628 <filteredset
1628 1629 <spanset+ 3:10>,
1629 1630 <spanset- 2:5>>
1630 1631 3
1631 1632 4
1632 1633
1633 1634 $ hg debugrevspec -s 'last(4:0, 3) & :1'
1634 1635 * set:
1635 1636 <filteredset
1636 1637 <spanset- 0:3>,
1637 1638 <spanset+ 0:2>>
1638 1639 1
1639 1640 0
1640 1641
1641 1642 $ hg debugrevspec -s ':1 & last(4:0, 3)'
1642 1643 * set:
1643 1644 <filteredset
1644 1645 <spanset+ 0:2>,
1645 1646 <spanset+ 0:3>>
1646 1647 0
1647 1648 1
1648 1649
1649 1650 Test scmutil.revsingle() should return the last revision
1650 1651
1651 1652 $ hg debugrevspec -s 'last(0::)'
1652 1653 * set:
1653 1654 <baseset slice=0:1
1654 1655 <generatorsetasc->>
1655 1656 9
1656 1657 $ hg identify -r '0::' --num
1657 1658 9
1658 1659
1659 1660 Test matching
1660 1661
1661 1662 $ log 'matching(6)'
1662 1663 6
1663 1664 $ log 'matching(6:7, "phase parents user date branch summary files description substate")'
1664 1665 6
1665 1666 7
1666 1667
1667 1668 Testing min and max
1668 1669
1669 1670 max: simple
1670 1671
1671 1672 $ log 'max(contains(a))'
1672 1673 5
1673 1674
1674 1675 max: simple on unordered set)
1675 1676
1676 1677 $ log 'max((4+0+2+5+7) and contains(a))'
1677 1678 5
1678 1679
1679 1680 max: no result
1680 1681
1681 1682 $ log 'max(contains(stringthatdoesnotappearanywhere))'
1682 1683
1683 1684 max: no result on unordered set
1684 1685
1685 1686 $ log 'max((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
1686 1687
1687 1688 min: simple
1688 1689
1689 1690 $ log 'min(contains(a))'
1690 1691 0
1691 1692
1692 1693 min: simple on unordered set
1693 1694
1694 1695 $ log 'min((4+0+2+5+7) and contains(a))'
1695 1696 0
1696 1697
1697 1698 min: empty
1698 1699
1699 1700 $ log 'min(contains(stringthatdoesnotappearanywhere))'
1700 1701
1701 1702 min: empty on unordered set
1702 1703
1703 1704 $ log 'min((4+0+2+5+7) and contains(stringthatdoesnotappearanywhere))'
1704 1705
1705 1706
1706 1707 $ log 'merge()'
1707 1708 6
1708 1709 $ log 'branchpoint()'
1709 1710 1
1710 1711 4
1711 1712 $ log 'modifies(b)'
1712 1713 4
1713 1714 $ log 'modifies("path:b")'
1714 1715 4
1715 1716 $ log 'modifies("*")'
1716 1717 4
1717 1718 6
1718 1719 $ log 'modifies("set:modified()")'
1719 1720 4
1720 1721 $ log 'id(5)'
1721 1722 2
1722 1723 $ log 'only(9)'
1723 1724 8
1724 1725 9
1725 1726 $ log 'only(8)'
1726 1727 8
1727 1728 $ log 'only(9, 5)'
1728 1729 2
1729 1730 4
1730 1731 8
1731 1732 9
1732 1733 $ log 'only(7 + 9, 5 + 2)'
1733 1734 4
1734 1735 6
1735 1736 7
1736 1737 8
1737 1738 9
1738 1739
1739 1740 Test empty set input
1740 1741 $ log 'only(p2())'
1741 1742 $ log 'only(p1(), p2())'
1742 1743 0
1743 1744 1
1744 1745 2
1745 1746 4
1746 1747 8
1747 1748 9
1748 1749
1749 1750 Test '%' operator
1750 1751
1751 1752 $ log '9%'
1752 1753 8
1753 1754 9
1754 1755 $ log '9%5'
1755 1756 2
1756 1757 4
1757 1758 8
1758 1759 9
1759 1760 $ log '(7 + 9)%(5 + 2)'
1760 1761 4
1761 1762 6
1762 1763 7
1763 1764 8
1764 1765 9
1765 1766
1766 1767 Test operand of '%' is optimized recursively (issue4670)
1767 1768
1768 1769 $ try --optimize '8:9-8%'
1769 1770 (onlypost
1770 1771 (minus
1771 1772 (range
1772 1773 (symbol '8')
1773 1774 (symbol '9'))
1774 1775 (symbol '8')))
1775 1776 * optimized:
1776 1777 (func
1777 1778 (symbol 'only')
1778 1779 (difference
1779 1780 (range
1780 1781 (symbol '8')
1781 1782 (symbol '9'))
1782 1783 (symbol '8')))
1783 1784 * set:
1784 1785 <baseset+ [8, 9]>
1785 1786 8
1786 1787 9
1787 1788 $ try --optimize '(9)%(5)'
1788 1789 (only
1789 1790 (group
1790 1791 (symbol '9'))
1791 1792 (group
1792 1793 (symbol '5')))
1793 1794 * optimized:
1794 1795 (func
1795 1796 (symbol 'only')
1796 1797 (list
1797 1798 (symbol '9')
1798 1799 (symbol '5')))
1799 1800 * set:
1800 1801 <baseset+ [2, 4, 8, 9]>
1801 1802 2
1802 1803 4
1803 1804 8
1804 1805 9
1805 1806
1806 1807 Test the order of operations
1807 1808
1808 1809 $ log '7 + 9%5 + 2'
1809 1810 7
1810 1811 2
1811 1812 4
1812 1813 8
1813 1814 9
1814 1815
1815 1816 Test explicit numeric revision
1816 1817 $ log 'rev(-2)'
1817 1818 $ log 'rev(-1)'
1818 1819 -1
1819 1820 $ log 'rev(0)'
1820 1821 0
1821 1822 $ log 'rev(9)'
1822 1823 9
1823 1824 $ log 'rev(10)'
1824 1825 $ log 'rev(tip)'
1825 1826 hg: parse error: rev expects a number
1826 1827 [255]
1827 1828
1828 1829 Test hexadecimal revision
1829 1830 $ log 'id(2)'
1830 1831 $ log 'id(5)'
1831 1832 2
1832 1833 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x5)'
1833 1834 2
1834 1835 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x5'
1835 1836 2
1836 1837 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x)'
1837 1838 $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x'
1838 1839 abort: 00changelog.i@: ambiguous identifier!
1839 1840 [255]
1840 1841 $ log 'id(23268)'
1841 1842 4
1842 1843 $ log 'id(2785f51eece)'
1843 1844 0
1844 1845 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532c)'
1845 1846 8
1846 1847 $ log 'id(d5d0dcbdc4a)'
1847 1848 $ log 'id(d5d0dcbdc4w)'
1848 1849 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532d)'
1849 1850 $ log 'id(d5d0dcbdc4d9ff5dbb2d336f32f0bb561c1a532q)'
1850 1851 $ log 'id(1.0)'
1851 1852 $ log 'id(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)'
1852 1853
1853 1854 Test null revision
1854 1855 $ log '(null)'
1855 1856 -1
1856 1857 $ log '(null:0)'
1857 1858 -1
1858 1859 0
1859 1860 $ log '(0:null)'
1860 1861 0
1861 1862 -1
1862 1863 $ log 'null::0'
1863 1864 -1
1864 1865 0
1865 1866 $ log 'null:tip - 0:'
1866 1867 -1
1867 1868 $ log 'null: and null::' | head -1
1868 1869 -1
1869 1870 $ log 'null: or 0:' | head -2
1870 1871 -1
1871 1872 0
1872 1873 $ log 'ancestors(null)'
1873 1874 -1
1874 1875 $ log 'reverse(null:)' | tail -2
1875 1876 0
1876 1877 -1
1877 1878 $ log 'first(null:)'
1878 1879 -1
1879 1880 $ log 'min(null:)'
1880 1881 BROKEN: should be '-1'
1881 1882 $ log 'tip:null and all()' | tail -2
1882 1883 1
1883 1884 0
1884 1885
1885 1886 Test working-directory revision
1886 1887 $ hg debugrevspec 'wdir()'
1887 1888 2147483647
1888 1889 $ hg debugrevspec 'wdir()^'
1889 1890 9
1890 1891 $ hg up 7
1891 1892 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1892 1893 $ hg debugrevspec 'wdir()^'
1893 1894 7
1894 1895 $ hg debugrevspec 'wdir()^0'
1895 1896 2147483647
1896 1897 $ hg debugrevspec 'wdir()~3'
1897 1898 5
1898 1899 $ hg debugrevspec 'ancestors(wdir())'
1899 1900 0
1900 1901 1
1901 1902 2
1902 1903 3
1903 1904 4
1904 1905 5
1905 1906 6
1906 1907 7
1907 1908 2147483647
1908 1909 $ hg debugrevspec '0:wdir() & ancestor(wdir())'
1909 1910 2147483647
1910 1911 $ hg debugrevspec '0:wdir() & ancestor(.:wdir())'
1911 1912 4
1912 1913 $ hg debugrevspec '0:wdir() & ancestor(wdir(), wdir())'
1913 1914 2147483647
1914 1915 $ hg debugrevspec '0:wdir() & ancestor(wdir(), tip)'
1915 1916 4
1916 1917 $ hg debugrevspec 'null:wdir() & ancestor(wdir(), null)'
1917 1918 -1
1918 1919 $ hg debugrevspec 'wdir()~0'
1919 1920 2147483647
1920 1921 $ hg debugrevspec 'p1(wdir())'
1921 1922 7
1922 1923 $ hg debugrevspec 'p2(wdir())'
1923 1924 $ hg debugrevspec 'parents(wdir())'
1924 1925 7
1925 1926 $ hg debugrevspec 'wdir()^1'
1926 1927 7
1927 1928 $ hg debugrevspec 'wdir()^2'
1928 1929 $ hg debugrevspec 'wdir()^3'
1929 1930 hg: parse error: ^ expects a number 0, 1, or 2
1930 1931 [255]
1931 1932 For tests consistency
1932 1933 $ hg up 9
1933 1934 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1934 1935 $ hg debugrevspec 'tip or wdir()'
1935 1936 9
1936 1937 2147483647
1937 1938 $ hg debugrevspec '0:tip and wdir()'
1938 1939 $ log '0:wdir()' | tail -3
1939 1940 8
1940 1941 9
1941 1942 2147483647
1942 1943 $ log 'wdir():0' | head -3
1943 1944 2147483647
1944 1945 9
1945 1946 8
1946 1947 $ log 'wdir():wdir()'
1947 1948 2147483647
1948 1949 $ log '(all() + wdir()) & min(. + wdir())'
1949 1950 9
1950 1951 $ log '(all() + wdir()) & max(. + wdir())'
1951 1952 2147483647
1952 1953 $ log 'first(wdir() + .)'
1953 1954 2147483647
1954 1955 $ log 'last(. + wdir())'
1955 1956 2147483647
1956 1957
1957 1958 Test working-directory integer revision and node id
1958 1959 (BUG: '0:wdir()' is still needed to populate wdir revision)
1959 1960
1960 1961 $ hg debugrevspec '0:wdir() & 2147483647'
1961 1962 2147483647
1962 1963 $ hg debugrevspec '0:wdir() & rev(2147483647)'
1963 1964 2147483647
1964 1965 $ hg debugrevspec '0:wdir() & ffffffffffffffffffffffffffffffffffffffff'
1965 1966 2147483647
1966 1967 $ hg debugrevspec '0:wdir() & ffffffffffff'
1967 1968 2147483647
1968 1969 $ hg debugrevspec '0:wdir() & id(ffffffffffffffffffffffffffffffffffffffff)'
1969 1970 2147483647
1970 1971 $ hg debugrevspec '0:wdir() & id(ffffffffffff)'
1971 1972 2147483647
1972 1973
1973 1974 $ cd ..
1974 1975
1975 1976 Test short 'ff...' hash collision
1976 1977 (BUG: '0:wdir()' is still needed to populate wdir revision)
1977 1978
1978 1979 $ hg init wdir-hashcollision
1979 1980 $ cd wdir-hashcollision
1980 1981 $ cat <<EOF >> .hg/hgrc
1981 1982 > [experimental]
1982 1983 > evolution.createmarkers=True
1983 1984 > EOF
1984 1985 $ echo 0 > a
1985 1986 $ hg ci -qAm 0
1986 1987 $ for i in 2463 2961 6726 78127; do
1987 1988 > hg up -q 0
1988 1989 > echo $i > a
1989 1990 > hg ci -qm $i
1990 1991 > done
1991 1992 $ hg up -q null
1992 1993 $ hg log -r '0:wdir()' -T '{rev}:{node} {shortest(node, 3)}\n'
1993 1994 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a b4e
1994 1995 1:fffbae3886c8fbb2114296380d276fd37715d571 fffba
1995 1996 2:fffb6093b00943f91034b9bdad069402c834e572 fffb6
1996 1997 3:fff48a9b9de34a4d64120c29548214c67980ade3 fff4
1997 1998 4:ffff85cff0ff78504fcdc3c0bc10de0c65379249 ffff8
1998 1999 2147483647:ffffffffffffffffffffffffffffffffffffffff fffff
1999 2000 $ hg debugobsolete fffbae3886c8fbb2114296380d276fd37715d571
2000 2001 obsoleted 1 changesets
2001 2002
2002 2003 $ hg debugrevspec '0:wdir() & fff'
2003 2004 abort: 00changelog.i@fff: ambiguous identifier!
2004 2005 [255]
2005 2006 $ hg debugrevspec '0:wdir() & ffff'
2006 2007 abort: 00changelog.i@ffff: ambiguous identifier!
2007 2008 [255]
2008 2009 $ hg debugrevspec '0:wdir() & fffb'
2009 2010 abort: 00changelog.i@fffb: ambiguous identifier!
2010 2011 [255]
2011 2012 BROKEN should be '2' (node lookup uses unfiltered repo)
2012 2013 $ hg debugrevspec '0:wdir() & id(fffb)'
2013 2014 BROKEN should be '2' (node lookup uses unfiltered repo)
2014 2015 $ hg debugrevspec '0:wdir() & ffff8'
2015 2016 4
2016 2017 $ hg debugrevspec '0:wdir() & fffff'
2017 2018 2147483647
2018 2019
2019 2020 $ cd ..
2020 2021
2021 2022 Test branch() with wdir()
2022 2023
2023 2024 $ cd repo
2024 2025
2025 2026 $ log '0:wdir() & branch("literal:Γ©")'
2026 2027 8
2027 2028 9
2028 2029 2147483647
2029 2030 $ log '0:wdir() & branch("re:Γ©")'
2030 2031 8
2031 2032 9
2032 2033 2147483647
2033 2034 $ log '0:wdir() & branch("re:^a")'
2034 2035 0
2035 2036 2
2036 2037 $ log '0:wdir() & branch(8)'
2037 2038 8
2038 2039 9
2039 2040 2147483647
2040 2041
2041 2042 branch(wdir()) returns all revisions belonging to the working branch. The wdir
2042 2043 itself isn't returned unless it is explicitly populated.
2043 2044
2044 2045 $ log 'branch(wdir())'
2045 2046 8
2046 2047 9
2047 2048 $ log '0:wdir() & branch(wdir())'
2048 2049 8
2049 2050 9
2050 2051 2147483647
2051 2052
2052 2053 $ log 'outgoing()'
2053 2054 8
2054 2055 9
2055 2056 $ log 'outgoing("../remote1")'
2056 2057 8
2057 2058 9
2058 2059 $ log 'outgoing("../remote2")'
2059 2060 3
2060 2061 5
2061 2062 6
2062 2063 7
2063 2064 9
2064 2065 $ log 'p1(merge())'
2065 2066 5
2066 2067 $ log 'p2(merge())'
2067 2068 4
2068 2069 $ log 'parents(merge())'
2069 2070 4
2070 2071 5
2071 2072 $ log 'p1(branchpoint())'
2072 2073 0
2073 2074 2
2074 2075 $ log 'p2(branchpoint())'
2075 2076 $ log 'parents(branchpoint())'
2076 2077 0
2077 2078 2
2078 2079 $ log 'removes(a)'
2079 2080 2
2080 2081 6
2081 2082 $ log 'roots(all())'
2082 2083 0
2083 2084 $ log 'reverse(2 or 3 or 4 or 5)'
2084 2085 5
2085 2086 4
2086 2087 3
2087 2088 2
2088 2089 $ log 'reverse(all())'
2089 2090 9
2090 2091 8
2091 2092 7
2092 2093 6
2093 2094 5
2094 2095 4
2095 2096 3
2096 2097 2
2097 2098 1
2098 2099 0
2099 2100 $ log 'reverse(all()) & filelog(b)'
2100 2101 4
2101 2102 1
2102 2103 $ log 'rev(5)'
2103 2104 5
2104 2105 $ log 'sort(limit(reverse(all()), 3))'
2105 2106 7
2106 2107 8
2107 2108 9
2108 2109 $ log 'sort(2 or 3 or 4 or 5, date)'
2109 2110 2
2110 2111 3
2111 2112 5
2112 2113 4
2113 2114 $ log 'tagged()'
2114 2115 6
2115 2116 $ log 'tag()'
2116 2117 6
2117 2118 $ log 'tag(1.0)'
2118 2119 6
2119 2120 $ log 'tag(tip)'
2120 2121 9
2121 2122
2122 2123 Test order of revisions in compound expression
2123 2124 ----------------------------------------------
2124 2125
2125 2126 The general rule is that only the outermost (= leftmost) predicate can
2126 2127 enforce its ordering requirement. The other predicates should take the
2127 2128 ordering defined by it.
2128 2129
2129 2130 'A & B' should follow the order of 'A':
2130 2131
2131 2132 $ log '2:0 & 0::2'
2132 2133 2
2133 2134 1
2134 2135 0
2135 2136
2136 2137 'head()' combines sets in right order:
2137 2138
2138 2139 $ log '2:0 & head()'
2139 2140 2
2140 2141 1
2141 2142 0
2142 2143
2143 2144 'x:y' takes ordering parameter into account:
2144 2145
2145 2146 $ try -p optimized '3:0 & 0:3 & not 2:1'
2146 2147 * optimized:
2147 2148 (difference
2148 2149 (and
2149 2150 (range
2150 2151 (symbol '3')
2151 2152 (symbol '0'))
2152 2153 (range
2153 2154 (symbol '0')
2154 2155 (symbol '3')))
2155 2156 (range
2156 2157 (symbol '2')
2157 2158 (symbol '1')))
2158 2159 * set:
2159 2160 <filteredset
2160 2161 <filteredset
2161 2162 <spanset- 0:4>,
2162 2163 <spanset+ 0:4>>,
2163 2164 <not
2164 2165 <spanset+ 1:3>>>
2165 2166 3
2166 2167 0
2167 2168
2168 2169 'a + b', which is optimized to '_list(a b)', should take the ordering of
2169 2170 the left expression:
2170 2171
2171 2172 $ try --optimize '2:0 & (0 + 1 + 2)'
2172 2173 (and
2173 2174 (range
2174 2175 (symbol '2')
2175 2176 (symbol '0'))
2176 2177 (group
2177 2178 (or
2178 2179 (list
2179 2180 (symbol '0')
2180 2181 (symbol '1')
2181 2182 (symbol '2')))))
2182 2183 * optimized:
2183 2184 (and
2184 2185 (range
2185 2186 (symbol '2')
2186 2187 (symbol '0'))
2187 2188 (func
2188 2189 (symbol '_list')
2189 2190 (string '0\x001\x002')))
2190 2191 * set:
2191 2192 <filteredset
2192 2193 <spanset- 0:3>,
2193 2194 <baseset [0, 1, 2]>>
2194 2195 2
2195 2196 1
2196 2197 0
2197 2198
2198 2199 'A + B' should take the ordering of the left expression:
2199 2200
2200 2201 $ try --optimize '2:0 & (0:1 + 2)'
2201 2202 (and
2202 2203 (range
2203 2204 (symbol '2')
2204 2205 (symbol '0'))
2205 2206 (group
2206 2207 (or
2207 2208 (list
2208 2209 (range
2209 2210 (symbol '0')
2210 2211 (symbol '1'))
2211 2212 (symbol '2')))))
2212 2213 * optimized:
2213 2214 (and
2214 2215 (range
2215 2216 (symbol '2')
2216 2217 (symbol '0'))
2217 2218 (or
2218 2219 (list
2219 2220 (range
2220 2221 (symbol '0')
2221 2222 (symbol '1'))
2222 2223 (symbol '2'))))
2223 2224 * set:
2224 2225 <filteredset
2225 2226 <spanset- 0:3>,
2226 2227 <addset
2227 2228 <spanset+ 0:2>,
2228 2229 <baseset [2]>>>
2229 2230 2
2230 2231 1
2231 2232 0
2232 2233
2233 2234 '_intlist(a b)' should behave like 'a + b':
2234 2235
2235 2236 $ trylist --optimize '2:0 & %ld' 0 1 2
2236 2237 (and
2237 2238 (range
2238 2239 (symbol '2')
2239 2240 (symbol '0'))
2240 2241 (func
2241 2242 (symbol '_intlist')
2242 2243 (string '0\x001\x002')))
2243 2244 * optimized:
2244 2245 (andsmally
2245 2246 (range
2246 2247 (symbol '2')
2247 2248 (symbol '0'))
2248 2249 (func
2249 2250 (symbol '_intlist')
2250 2251 (string '0\x001\x002')))
2251 2252 * set:
2252 2253 <filteredset
2253 2254 <spanset- 0:3>,
2254 2255 <baseset+ [0, 1, 2]>>
2255 2256 2
2256 2257 1
2257 2258 0
2258 2259
2259 2260 $ trylist --optimize '%ld & 2:0' 0 2 1
2260 2261 (and
2261 2262 (func
2262 2263 (symbol '_intlist')
2263 2264 (string '0\x002\x001'))
2264 2265 (range
2265 2266 (symbol '2')
2266 2267 (symbol '0')))
2267 2268 * optimized:
2268 2269 (and
2269 2270 (func
2270 2271 (symbol '_intlist')
2271 2272 (string '0\x002\x001'))
2272 2273 (range
2273 2274 (symbol '2')
2274 2275 (symbol '0')))
2275 2276 * set:
2276 2277 <filteredset
2277 2278 <baseset [0, 2, 1]>,
2278 2279 <spanset- 0:3>>
2279 2280 0
2280 2281 2
2281 2282 1
2282 2283
2283 2284 '_hexlist(a b)' should behave like 'a + b':
2284 2285
2285 2286 $ trylist --optimize --bin '2:0 & %ln' `hg log -T '{node} ' -r0:2`
2286 2287 (and
2287 2288 (range
2288 2289 (symbol '2')
2289 2290 (symbol '0'))
2290 2291 (func
2291 2292 (symbol '_hexlist')
2292 2293 (string '*'))) (glob)
2293 2294 * optimized:
2294 2295 (and
2295 2296 (range
2296 2297 (symbol '2')
2297 2298 (symbol '0'))
2298 2299 (func
2299 2300 (symbol '_hexlist')
2300 2301 (string '*'))) (glob)
2301 2302 * set:
2302 2303 <filteredset
2303 2304 <spanset- 0:3>,
2304 2305 <baseset [0, 1, 2]>>
2305 2306 2
2306 2307 1
2307 2308 0
2308 2309
2309 2310 $ trylist --optimize --bin '%ln & 2:0' `hg log -T '{node} ' -r0+2+1`
2310 2311 (and
2311 2312 (func
2312 2313 (symbol '_hexlist')
2313 2314 (string '*')) (glob)
2314 2315 (range
2315 2316 (symbol '2')
2316 2317 (symbol '0')))
2317 2318 * optimized:
2318 2319 (andsmally
2319 2320 (func
2320 2321 (symbol '_hexlist')
2321 2322 (string '*')) (glob)
2322 2323 (range
2323 2324 (symbol '2')
2324 2325 (symbol '0')))
2325 2326 * set:
2326 2327 <baseset [0, 2, 1]>
2327 2328 0
2328 2329 2
2329 2330 1
2330 2331
2331 2332 '_list' should not go through the slow follow-order path if order doesn't
2332 2333 matter:
2333 2334
2334 2335 $ try -p optimized '2:0 & not (0 + 1)'
2335 2336 * optimized:
2336 2337 (difference
2337 2338 (range
2338 2339 (symbol '2')
2339 2340 (symbol '0'))
2340 2341 (func
2341 2342 (symbol '_list')
2342 2343 (string '0\x001')))
2343 2344 * set:
2344 2345 <filteredset
2345 2346 <spanset- 0:3>,
2346 2347 <not
2347 2348 <baseset [0, 1]>>>
2348 2349 2
2349 2350
2350 2351 $ try -p optimized '2:0 & not (0:2 & (0 + 1))'
2351 2352 * optimized:
2352 2353 (difference
2353 2354 (range
2354 2355 (symbol '2')
2355 2356 (symbol '0'))
2356 2357 (and
2357 2358 (range
2358 2359 (symbol '0')
2359 2360 (symbol '2'))
2360 2361 (func
2361 2362 (symbol '_list')
2362 2363 (string '0\x001'))))
2363 2364 * set:
2364 2365 <filteredset
2365 2366 <spanset- 0:3>,
2366 2367 <not
2367 2368 <baseset [0, 1]>>>
2368 2369 2
2369 2370
2370 2371 because 'present()' does nothing other than suppressing an error, the
2371 2372 ordering requirement should be forwarded to the nested expression
2372 2373
2373 2374 $ try -p optimized 'present(2 + 0 + 1)'
2374 2375 * optimized:
2375 2376 (func
2376 2377 (symbol 'present')
2377 2378 (func
2378 2379 (symbol '_list')
2379 2380 (string '2\x000\x001')))
2380 2381 * set:
2381 2382 <baseset [2, 0, 1]>
2382 2383 2
2383 2384 0
2384 2385 1
2385 2386
2386 2387 $ try --optimize '2:0 & present(0 + 1 + 2)'
2387 2388 (and
2388 2389 (range
2389 2390 (symbol '2')
2390 2391 (symbol '0'))
2391 2392 (func
2392 2393 (symbol 'present')
2393 2394 (or
2394 2395 (list
2395 2396 (symbol '0')
2396 2397 (symbol '1')
2397 2398 (symbol '2')))))
2398 2399 * optimized:
2399 2400 (and
2400 2401 (range
2401 2402 (symbol '2')
2402 2403 (symbol '0'))
2403 2404 (func
2404 2405 (symbol 'present')
2405 2406 (func
2406 2407 (symbol '_list')
2407 2408 (string '0\x001\x002'))))
2408 2409 * set:
2409 2410 <filteredset
2410 2411 <spanset- 0:3>,
2411 2412 <baseset [0, 1, 2]>>
2412 2413 2
2413 2414 1
2414 2415 0
2415 2416
2416 2417 'reverse()' should take effect only if it is the outermost expression:
2417 2418
2418 2419 $ try --optimize '0:2 & reverse(all())'
2419 2420 (and
2420 2421 (range
2421 2422 (symbol '0')
2422 2423 (symbol '2'))
2423 2424 (func
2424 2425 (symbol 'reverse')
2425 2426 (func
2426 2427 (symbol 'all')
2427 2428 None)))
2428 2429 * optimized:
2429 2430 (and
2430 2431 (range
2431 2432 (symbol '0')
2432 2433 (symbol '2'))
2433 2434 (func
2434 2435 (symbol 'reverse')
2435 2436 (func
2436 2437 (symbol 'all')
2437 2438 None)))
2438 2439 * set:
2439 2440 <filteredset
2440 2441 <spanset+ 0:3>,
2441 2442 <spanset+ 0:10>>
2442 2443 0
2443 2444 1
2444 2445 2
2445 2446
2446 2447 'sort()' should take effect only if it is the outermost expression:
2447 2448
2448 2449 $ try --optimize '0:2 & sort(all(), -rev)'
2449 2450 (and
2450 2451 (range
2451 2452 (symbol '0')
2452 2453 (symbol '2'))
2453 2454 (func
2454 2455 (symbol 'sort')
2455 2456 (list
2456 2457 (func
2457 2458 (symbol 'all')
2458 2459 None)
2459 2460 (negate
2460 2461 (symbol 'rev')))))
2461 2462 * optimized:
2462 2463 (and
2463 2464 (range
2464 2465 (symbol '0')
2465 2466 (symbol '2'))
2466 2467 (func
2467 2468 (symbol 'sort')
2468 2469 (list
2469 2470 (func
2470 2471 (symbol 'all')
2471 2472 None)
2472 2473 (string '-rev'))))
2473 2474 * set:
2474 2475 <filteredset
2475 2476 <spanset+ 0:3>,
2476 2477 <spanset+ 0:10>>
2477 2478 0
2478 2479 1
2479 2480 2
2480 2481
2481 2482 invalid argument passed to noop sort():
2482 2483
2483 2484 $ log '0:2 & sort()'
2484 2485 hg: parse error: sort requires one or two arguments
2485 2486 [255]
2486 2487 $ log '0:2 & sort(all(), -invalid)'
2487 2488 hg: parse error: unknown sort key '-invalid'
2488 2489 [255]
2489 2490
2490 2491 for 'A & f(B)', 'B' should not be affected by the order of 'A':
2491 2492
2492 2493 $ try --optimize '2:0 & first(1 + 0 + 2)'
2493 2494 (and
2494 2495 (range
2495 2496 (symbol '2')
2496 2497 (symbol '0'))
2497 2498 (func
2498 2499 (symbol 'first')
2499 2500 (or
2500 2501 (list
2501 2502 (symbol '1')
2502 2503 (symbol '0')
2503 2504 (symbol '2')))))
2504 2505 * optimized:
2505 2506 (and
2506 2507 (range
2507 2508 (symbol '2')
2508 2509 (symbol '0'))
2509 2510 (func
2510 2511 (symbol 'first')
2511 2512 (func
2512 2513 (symbol '_list')
2513 2514 (string '1\x000\x002'))))
2514 2515 * set:
2515 2516 <filteredset
2516 2517 <baseset [1]>,
2517 2518 <spanset- 0:3>>
2518 2519 1
2519 2520
2520 2521 $ try --optimize '2:0 & not last(0 + 2 + 1)'
2521 2522 (and
2522 2523 (range
2523 2524 (symbol '2')
2524 2525 (symbol '0'))
2525 2526 (not
2526 2527 (func
2527 2528 (symbol 'last')
2528 2529 (or
2529 2530 (list
2530 2531 (symbol '0')
2531 2532 (symbol '2')
2532 2533 (symbol '1'))))))
2533 2534 * optimized:
2534 2535 (difference
2535 2536 (range
2536 2537 (symbol '2')
2537 2538 (symbol '0'))
2538 2539 (func
2539 2540 (symbol 'last')
2540 2541 (func
2541 2542 (symbol '_list')
2542 2543 (string '0\x002\x001'))))
2543 2544 * set:
2544 2545 <filteredset
2545 2546 <spanset- 0:3>,
2546 2547 <not
2547 2548 <baseset [1]>>>
2548 2549 2
2549 2550 0
2550 2551
2551 2552 for 'A & (op)(B)', 'B' should not be affected by the order of 'A':
2552 2553
2553 2554 $ try --optimize '2:0 & (1 + 0 + 2):(0 + 2 + 1)'
2554 2555 (and
2555 2556 (range
2556 2557 (symbol '2')
2557 2558 (symbol '0'))
2558 2559 (range
2559 2560 (group
2560 2561 (or
2561 2562 (list
2562 2563 (symbol '1')
2563 2564 (symbol '0')
2564 2565 (symbol '2'))))
2565 2566 (group
2566 2567 (or
2567 2568 (list
2568 2569 (symbol '0')
2569 2570 (symbol '2')
2570 2571 (symbol '1'))))))
2571 2572 * optimized:
2572 2573 (and
2573 2574 (range
2574 2575 (symbol '2')
2575 2576 (symbol '0'))
2576 2577 (range
2577 2578 (func
2578 2579 (symbol '_list')
2579 2580 (string '1\x000\x002'))
2580 2581 (func
2581 2582 (symbol '_list')
2582 2583 (string '0\x002\x001'))))
2583 2584 * set:
2584 2585 <filteredset
2585 2586 <spanset- 0:3>,
2586 2587 <baseset [1]>>
2587 2588 1
2588 2589
2589 2590 'A & B' can be rewritten as 'flipand(B, A)' by weight.
2590 2591
2591 2592 $ try --optimize 'contains("glob:*") & (2 + 0 + 1)'
2592 2593 (and
2593 2594 (func
2594 2595 (symbol 'contains')
2595 2596 (string 'glob:*'))
2596 2597 (group
2597 2598 (or
2598 2599 (list
2599 2600 (symbol '2')
2600 2601 (symbol '0')
2601 2602 (symbol '1')))))
2602 2603 * optimized:
2603 2604 (andsmally
2604 2605 (func
2605 2606 (symbol 'contains')
2606 2607 (string 'glob:*'))
2607 2608 (func
2608 2609 (symbol '_list')
2609 2610 (string '2\x000\x001')))
2610 2611 * set:
2611 2612 <filteredset
2612 2613 <baseset+ [0, 1, 2]>,
2613 2614 <contains 'glob:*'>>
2614 2615 0
2615 2616 1
2616 2617 2
2617 2618
2618 2619 and in this example, 'A & B' is rewritten as 'B & A', but 'A' overrides
2619 2620 the order appropriately:
2620 2621
2621 2622 $ try --optimize 'reverse(contains("glob:*")) & (0 + 2 + 1)'
2622 2623 (and
2623 2624 (func
2624 2625 (symbol 'reverse')
2625 2626 (func
2626 2627 (symbol 'contains')
2627 2628 (string 'glob:*')))
2628 2629 (group
2629 2630 (or
2630 2631 (list
2631 2632 (symbol '0')
2632 2633 (symbol '2')
2633 2634 (symbol '1')))))
2634 2635 * optimized:
2635 2636 (andsmally
2636 2637 (func
2637 2638 (symbol 'reverse')
2638 2639 (func
2639 2640 (symbol 'contains')
2640 2641 (string 'glob:*')))
2641 2642 (func
2642 2643 (symbol '_list')
2643 2644 (string '0\x002\x001')))
2644 2645 * set:
2645 2646 <filteredset
2646 2647 <baseset- [0, 1, 2]>,
2647 2648 <contains 'glob:*'>>
2648 2649 2
2649 2650 1
2650 2651 0
2651 2652
2652 2653 test sort revset
2653 2654 --------------------------------------------
2654 2655
2655 2656 test when adding two unordered revsets
2656 2657
2657 2658 $ log 'sort(keyword(issue) or modifies(b))'
2658 2659 4
2659 2660 6
2660 2661
2661 2662 test when sorting a reversed collection in the same way it is
2662 2663
2663 2664 $ log 'sort(reverse(all()), -rev)'
2664 2665 9
2665 2666 8
2666 2667 7
2667 2668 6
2668 2669 5
2669 2670 4
2670 2671 3
2671 2672 2
2672 2673 1
2673 2674 0
2674 2675
2675 2676 test when sorting a reversed collection
2676 2677
2677 2678 $ log 'sort(reverse(all()), rev)'
2678 2679 0
2679 2680 1
2680 2681 2
2681 2682 3
2682 2683 4
2683 2684 5
2684 2685 6
2685 2686 7
2686 2687 8
2687 2688 9
2688 2689
2689 2690
2690 2691 test sorting two sorted collections in different orders
2691 2692
2692 2693 $ log 'sort(outgoing() or reverse(removes(a)), rev)'
2693 2694 2
2694 2695 6
2695 2696 8
2696 2697 9
2697 2698
2698 2699 test sorting two sorted collections in different orders backwards
2699 2700
2700 2701 $ log 'sort(outgoing() or reverse(removes(a)), -rev)'
2701 2702 9
2702 2703 8
2703 2704 6
2704 2705 2
2705 2706
2706 2707 test empty sort key which is noop
2707 2708
2708 2709 $ log 'sort(0 + 2 + 1, "")'
2709 2710 0
2710 2711 2
2711 2712 1
2712 2713
2713 2714 test invalid sort keys
2714 2715
2715 2716 $ log 'sort(all(), -invalid)'
2716 2717 hg: parse error: unknown sort key '-invalid'
2717 2718 [255]
2718 2719
2719 2720 $ cd ..
2720 2721
2721 2722 test sorting by multiple keys including variable-length strings
2722 2723
2723 2724 $ hg init sorting
2724 2725 $ cd sorting
2725 2726 $ cat <<EOF >> .hg/hgrc
2726 2727 > [ui]
2727 2728 > logtemplate = '{rev} {branch|p5}{desc|p5}{author|p5}{date|hgdate}\n'
2728 2729 > [templatealias]
2729 2730 > p5(s) = pad(s, 5)
2730 2731 > EOF
2731 2732 $ hg branch -qf b12
2732 2733 $ hg ci -m m111 -u u112 -d '111 10800'
2733 2734 $ hg branch -qf b11
2734 2735 $ hg ci -m m12 -u u111 -d '112 7200'
2735 2736 $ hg branch -qf b111
2736 2737 $ hg ci -m m11 -u u12 -d '111 3600'
2737 2738 $ hg branch -qf b112
2738 2739 $ hg ci -m m111 -u u11 -d '120 0'
2739 2740 $ hg branch -qf b111
2740 2741 $ hg ci -m m112 -u u111 -d '110 14400'
2741 2742 created new head
2742 2743
2743 2744 compare revisions (has fast path):
2744 2745
2745 2746 $ hg log -r 'sort(all(), rev)'
2746 2747 0 b12 m111 u112 111 10800
2747 2748 1 b11 m12 u111 112 7200
2748 2749 2 b111 m11 u12 111 3600
2749 2750 3 b112 m111 u11 120 0
2750 2751 4 b111 m112 u111 110 14400
2751 2752
2752 2753 $ hg log -r 'sort(all(), -rev)'
2753 2754 4 b111 m112 u111 110 14400
2754 2755 3 b112 m111 u11 120 0
2755 2756 2 b111 m11 u12 111 3600
2756 2757 1 b11 m12 u111 112 7200
2757 2758 0 b12 m111 u112 111 10800
2758 2759
2759 2760 compare variable-length strings (issue5218):
2760 2761
2761 2762 $ hg log -r 'sort(all(), branch)'
2762 2763 1 b11 m12 u111 112 7200
2763 2764 2 b111 m11 u12 111 3600
2764 2765 4 b111 m112 u111 110 14400
2765 2766 3 b112 m111 u11 120 0
2766 2767 0 b12 m111 u112 111 10800
2767 2768
2768 2769 $ hg log -r 'sort(all(), -branch)'
2769 2770 0 b12 m111 u112 111 10800
2770 2771 3 b112 m111 u11 120 0
2771 2772 2 b111 m11 u12 111 3600
2772 2773 4 b111 m112 u111 110 14400
2773 2774 1 b11 m12 u111 112 7200
2774 2775
2775 2776 $ hg log -r 'sort(all(), desc)'
2776 2777 2 b111 m11 u12 111 3600
2777 2778 0 b12 m111 u112 111 10800
2778 2779 3 b112 m111 u11 120 0
2779 2780 4 b111 m112 u111 110 14400
2780 2781 1 b11 m12 u111 112 7200
2781 2782
2782 2783 $ hg log -r 'sort(all(), -desc)'
2783 2784 1 b11 m12 u111 112 7200
2784 2785 4 b111 m112 u111 110 14400
2785 2786 0 b12 m111 u112 111 10800
2786 2787 3 b112 m111 u11 120 0
2787 2788 2 b111 m11 u12 111 3600
2788 2789
2789 2790 $ hg log -r 'sort(all(), user)'
2790 2791 3 b112 m111 u11 120 0
2791 2792 1 b11 m12 u111 112 7200
2792 2793 4 b111 m112 u111 110 14400
2793 2794 0 b12 m111 u112 111 10800
2794 2795 2 b111 m11 u12 111 3600
2795 2796
2796 2797 $ hg log -r 'sort(all(), -user)'
2797 2798 2 b111 m11 u12 111 3600
2798 2799 0 b12 m111 u112 111 10800
2799 2800 1 b11 m12 u111 112 7200
2800 2801 4 b111 m112 u111 110 14400
2801 2802 3 b112 m111 u11 120 0
2802 2803
2803 2804 compare dates (tz offset should have no effect):
2804 2805
2805 2806 $ hg log -r 'sort(all(), date)'
2806 2807 4 b111 m112 u111 110 14400
2807 2808 0 b12 m111 u112 111 10800
2808 2809 2 b111 m11 u12 111 3600
2809 2810 1 b11 m12 u111 112 7200
2810 2811 3 b112 m111 u11 120 0
2811 2812
2812 2813 $ hg log -r 'sort(all(), -date)'
2813 2814 3 b112 m111 u11 120 0
2814 2815 1 b11 m12 u111 112 7200
2815 2816 0 b12 m111 u112 111 10800
2816 2817 2 b111 m11 u12 111 3600
2817 2818 4 b111 m112 u111 110 14400
2818 2819
2819 2820 be aware that 'sort(x, -k)' is not exactly the same as 'reverse(sort(x, k))'
2820 2821 because '-k' reverses the comparison, not the list itself:
2821 2822
2822 2823 $ hg log -r 'sort(0 + 2, date)'
2823 2824 0 b12 m111 u112 111 10800
2824 2825 2 b111 m11 u12 111 3600
2825 2826
2826 2827 $ hg log -r 'sort(0 + 2, -date)'
2827 2828 0 b12 m111 u112 111 10800
2828 2829 2 b111 m11 u12 111 3600
2829 2830
2830 2831 $ hg log -r 'reverse(sort(0 + 2, date))'
2831 2832 2 b111 m11 u12 111 3600
2832 2833 0 b12 m111 u112 111 10800
2833 2834
2834 2835 sort by multiple keys:
2835 2836
2836 2837 $ hg log -r 'sort(all(), "branch -rev")'
2837 2838 1 b11 m12 u111 112 7200
2838 2839 4 b111 m112 u111 110 14400
2839 2840 2 b111 m11 u12 111 3600
2840 2841 3 b112 m111 u11 120 0
2841 2842 0 b12 m111 u112 111 10800
2842 2843
2843 2844 $ hg log -r 'sort(all(), "-desc -date")'
2844 2845 1 b11 m12 u111 112 7200
2845 2846 4 b111 m112 u111 110 14400
2846 2847 3 b112 m111 u11 120 0
2847 2848 0 b12 m111 u112 111 10800
2848 2849 2 b111 m11 u12 111 3600
2849 2850
2850 2851 $ hg log -r 'sort(all(), "user -branch date rev")'
2851 2852 3 b112 m111 u11 120 0
2852 2853 4 b111 m112 u111 110 14400
2853 2854 1 b11 m12 u111 112 7200
2854 2855 0 b12 m111 u112 111 10800
2855 2856 2 b111 m11 u12 111 3600
2856 2857
2857 2858 toposort prioritises graph branches
2858 2859
2859 2860 $ hg up 2
2860 2861 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2861 2862 $ touch a
2862 2863 $ hg addremove
2863 2864 adding a
2864 2865 $ hg ci -m 't1' -u 'tu' -d '130 0'
2865 2866 created new head
2866 2867 $ echo 'a' >> a
2867 2868 $ hg ci -m 't2' -u 'tu' -d '130 0'
2868 2869 $ hg book book1
2869 2870 $ hg up 4
2870 2871 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2871 2872 (leaving bookmark book1)
2872 2873 $ touch a
2873 2874 $ hg addremove
2874 2875 adding a
2875 2876 $ hg ci -m 't3' -u 'tu' -d '130 0'
2876 2877
2877 2878 $ hg log -r 'sort(all(), topo)'
2878 2879 7 b111 t3 tu 130 0
2879 2880 4 b111 m112 u111 110 14400
2880 2881 3 b112 m111 u11 120 0
2881 2882 6 b111 t2 tu 130 0
2882 2883 5 b111 t1 tu 130 0
2883 2884 2 b111 m11 u12 111 3600
2884 2885 1 b11 m12 u111 112 7200
2885 2886 0 b12 m111 u112 111 10800
2886 2887
2887 2888 $ hg log -r 'sort(all(), -topo)'
2888 2889 0 b12 m111 u112 111 10800
2889 2890 1 b11 m12 u111 112 7200
2890 2891 2 b111 m11 u12 111 3600
2891 2892 5 b111 t1 tu 130 0
2892 2893 6 b111 t2 tu 130 0
2893 2894 3 b112 m111 u11 120 0
2894 2895 4 b111 m112 u111 110 14400
2895 2896 7 b111 t3 tu 130 0
2896 2897
2897 2898 $ hg log -r 'sort(all(), topo, topo.firstbranch=book1)'
2898 2899 6 b111 t2 tu 130 0
2899 2900 5 b111 t1 tu 130 0
2900 2901 7 b111 t3 tu 130 0
2901 2902 4 b111 m112 u111 110 14400
2902 2903 3 b112 m111 u11 120 0
2903 2904 2 b111 m11 u12 111 3600
2904 2905 1 b11 m12 u111 112 7200
2905 2906 0 b12 m111 u112 111 10800
2906 2907
2907 2908 topographical sorting can't be combined with other sort keys, and you can't
2908 2909 use the topo.firstbranch option when topo sort is not active:
2909 2910
2910 2911 $ hg log -r 'sort(all(), "topo user")'
2911 2912 hg: parse error: topo sort order cannot be combined with other sort keys
2912 2913 [255]
2913 2914
2914 2915 $ hg log -r 'sort(all(), user, topo.firstbranch=book1)'
2915 2916 hg: parse error: topo.firstbranch can only be used when using the topo sort key
2916 2917 [255]
2917 2918
2918 2919 topo.firstbranch should accept any kind of expressions:
2919 2920
2920 2921 $ hg log -r 'sort(0, topo, topo.firstbranch=(book1))'
2921 2922 0 b12 m111 u112 111 10800
2922 2923
2923 2924 $ cd ..
2924 2925 $ cd repo
2925 2926
2926 2927 test multiline revset with errors
2927 2928
2928 2929 $ echo > multiline-revset
2929 2930 $ echo '. +' >> multiline-revset
2930 2931 $ echo '.^ +' >> multiline-revset
2931 2932 $ hg log -r "`cat multiline-revset`"
2932 2933 hg: parse error at 9: not a prefix: end
2933 2934 ( . + .^ +
2934 2935 ^ here)
2935 2936 [255]
2936 2937 $ hg debugrevspec -v 'revset(first(rev(0)))' -p all
2937 2938 * parsed:
2938 2939 (func
2939 2940 (symbol 'revset')
2940 2941 (func
2941 2942 (symbol 'first')
2942 2943 (func
2943 2944 (symbol 'rev')
2944 2945 (symbol '0'))))
2945 2946 * expanded:
2946 2947 (func
2947 2948 (symbol 'revset')
2948 2949 (func
2949 2950 (symbol 'first')
2950 2951 (func
2951 2952 (symbol 'rev')
2952 2953 (symbol '0'))))
2953 2954 * concatenated:
2954 2955 (func
2955 2956 (symbol 'revset')
2956 2957 (func
2957 2958 (symbol 'first')
2958 2959 (func
2959 2960 (symbol 'rev')
2960 2961 (symbol '0'))))
2961 2962 * analyzed:
2962 2963 (func
2963 2964 (symbol 'revset')
2964 2965 (func
2965 2966 (symbol 'first')
2966 2967 (func
2967 2968 (symbol 'rev')
2968 2969 (symbol '0'))))
2969 2970 * optimized:
2970 2971 (func
2971 2972 (symbol 'revset')
2972 2973 (func
2973 2974 (symbol 'first')
2974 2975 (func
2975 2976 (symbol 'rev')
2976 2977 (symbol '0'))))
2977 2978 * set:
2978 2979 <baseset+ [0]>
2979 2980 0
General Comments 0
You need to be logged in to leave comments. Login now