Mercurial > hg > mercurial-source
comparison tests/test-revset.t @ 16778:2ac08d8b21aa
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 22 May 2012 14:37:20 -0500 |
parents | de4b42daf396 30e46d7138de |
children | 20f55613fb2a |
comparison
equal
deleted
inserted
replaced
16777:058e14da7044 | 16778:2ac08d8b21aa |
---|---|
525 $ try recurse1 | 525 $ try recurse1 |
526 ('symbol', 'recurse1') | 526 ('symbol', 'recurse1') |
527 hg: parse error: infinite expansion of revset alias "recurse1" detected | 527 hg: parse error: infinite expansion of revset alias "recurse1" detected |
528 [255] | 528 [255] |
529 | 529 |
530 $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc | |
531 $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc | |
532 $ try "level2(level1(1, 2), 3)" | |
533 (func | |
534 ('symbol', 'level2') | |
535 (list | |
536 (func | |
537 ('symbol', 'level1') | |
538 (list | |
539 ('symbol', '1') | |
540 ('symbol', '2'))) | |
541 ('symbol', '3'))) | |
542 (or | |
543 ('symbol', '3') | |
544 (or | |
545 ('symbol', '1') | |
546 ('symbol', '2'))) | |
547 3 | |
548 1 | |
549 2 | |
550 | |
530 test nesting and variable passing | 551 test nesting and variable passing |
531 | 552 |
532 $ echo 'nested($1) = nested2($1)' >> .hg/hgrc | 553 $ echo 'nested($1) = nested2($1)' >> .hg/hgrc |
533 $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc | 554 $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc |
534 $ echo 'nested3($1) = max($1)' >> .hg/hgrc | 555 $ echo 'nested3($1) = max($1)' >> .hg/hgrc |
562 (func | 583 (func |
563 ('symbol', 'max') | 584 ('symbol', 'max') |
564 ('string', '$1'))) | 585 ('string', '$1'))) |
565 abort: unknown revision '$1'! | 586 abort: unknown revision '$1'! |
566 [255] | 587 [255] |
588 | |
589 $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc | |
590 $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc | |
591 $ try 'callinjection2(2:5)' | |
592 (func | |
593 ('symbol', 'callinjection2') | |
594 (range | |
595 ('symbol', '2') | |
596 ('symbol', '5'))) | |
597 hg: parse error: not a function: _aliasarg | |
598 [255] | |
599 >>> data = file('.hg/hgrc', 'rb').read() | |
600 >>> file('.hg/hgrc', 'wb').write(data.replace('_aliasarg', '')) | |
567 | 601 |
568 $ try 'd(2:5)' | 602 $ try 'd(2:5)' |
569 (func | 603 (func |
570 ('symbol', 'd') | 604 ('symbol', 'd') |
571 (range | 605 (range |