Mercurial > hg
comparison tests/test-revset.t @ 25265:e16456831516 stable
revset: drop magic of fullreposet membership test (issue4682)
This patch partially backs out d2de20e1451f and adds an alternative workaround
to functions that evaluate "null" and "wdir()". Because the new workaround is
incomplete, "first(null)" and "min(null)" don't work as expected. But they were
not usable until 3.4 and "null" isn't commonly used, we can postpone a complete
fix for 3.5.
The issue4682 was caused because "branch(default)" is evaluated to
"<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will
fix crash on "branch(null)", but without this patch, it would make
"null in <branch(default)>" be True, which means "children(branch(default))"
would return all revisions but merge (p2 != null).
I believe the right fix is to stop propagating fullreposet magic on filter(),
but it wouldn't fit to stable release. Also, we should discuss how to handle
"null" and "wdir()" in revset before.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 24 May 2015 10:29:33 +0900 |
parents | 8b99e9a8db05 |
children | 38117278f295 |
comparison
equal
deleted
inserted
replaced
25263:fd905b2bea59 | 25265:e16456831516 |
---|---|
617 $ log 'ancestors(null)' | 617 $ log 'ancestors(null)' |
618 -1 | 618 -1 |
619 $ log 'reverse(null:)' | tail -2 | 619 $ log 'reverse(null:)' | tail -2 |
620 0 | 620 0 |
621 -1 | 621 -1 |
622 BROKEN: should be '-1' | |
622 $ log 'first(null:)' | 623 $ log 'first(null:)' |
623 -1 | 624 BROKEN: should be '-1' |
624 $ log 'min(null:)' | 625 $ log 'min(null:)' |
625 -1 | |
626 $ log 'tip:null and all()' | tail -2 | 626 $ log 'tip:null and all()' | tail -2 |
627 1 | 627 1 |
628 0 | 628 0 |
629 | 629 |
630 Test working-directory revision | 630 Test working-directory revision |
631 $ hg debugrevspec 'wdir()' | 631 $ hg debugrevspec 'wdir()' |
632 None | 632 None |
633 BROKEN: should include 'None' | |
633 $ hg debugrevspec 'tip or wdir()' | 634 $ hg debugrevspec 'tip or wdir()' |
634 9 | 635 9 |
635 None | |
636 $ hg debugrevspec '0:tip and wdir()' | 636 $ hg debugrevspec '0:tip and wdir()' |
637 | 637 |
638 $ log 'outgoing()' | 638 $ log 'outgoing()' |
639 8 | 639 8 |
640 9 | 640 9 |
1575 | 1575 |
1576 $ echo 'cat2n2($1, $2, $3, $4) = $1 ## $2 or $3 ## $4~2' >> .hg/hgrc | 1576 $ echo 'cat2n2($1, $2, $3, $4) = $1 ## $2 or $3 ## $4~2' >> .hg/hgrc |
1577 $ log "cat2n2(2785f5, 1eece5, 24286f, 4ae135)" | 1577 $ log "cat2n2(2785f5, 1eece5, 24286f, 4ae135)" |
1578 0 | 1578 0 |
1579 4 | 1579 4 |
1580 | |
1581 $ cd .. | |
1582 | |
1583 prepare repository that has "default" branches of multiple roots | |
1584 | |
1585 $ hg init namedbranch | |
1586 $ cd namedbranch | |
1587 | |
1588 $ echo default0 >> a | |
1589 $ hg ci -Aqm0 | |
1590 $ echo default1 >> a | |
1591 $ hg ci -m1 | |
1592 | |
1593 $ hg branch -q stable | |
1594 $ echo stable2 >> a | |
1595 $ hg ci -m2 | |
1596 $ echo stable3 >> a | |
1597 $ hg ci -m3 | |
1598 | |
1599 $ hg update -q null | |
1600 $ echo default4 >> a | |
1601 $ hg ci -Aqm4 | |
1602 $ echo default5 >> a | |
1603 $ hg ci -m5 | |
1604 | |
1605 "null" revision belongs to "default" branch, but it shouldn't appear in set | |
1606 unless explicitly specified (issue4682) | |
1607 | |
1608 $ log 'children(branch(default))' | |
1609 1 | |
1610 2 | |
1611 5 | |
1580 | 1612 |
1581 $ cd .. | 1613 $ cd .. |
1582 | 1614 |
1583 test author/desc/keyword in problematic encoding | 1615 test author/desc/keyword in problematic encoding |
1584 # unicode: cp932: | 1616 # unicode: cp932: |