comparison tests/test-topic.t @ 4339:0f015fe4f71f

topic: make revsets like 'foo#topic[0]' work Essentially, 'topic' relation subscript function is the same as 'generations', but is limited to revisions marked with one particular topic.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 26 Dec 2018 14:52:07 +0800
parents 482992803db6
children a71f2271ed76 2893b127923b
comparison
equal deleted inserted replaced
4338:e2350851740a 4339:0f015fe4f71f
821 $ hg topics --age 821 $ hg topics --age
822 * fran (1970-01-01 by test, 1 changesets) 822 * fran (1970-01-01 by test, 1 changesets)
823 823
824 $ cd .. 824 $ cd ..
825 825
826 Stack relation subscript in revsets 826 Relation subscript in revsets
827 =================================== 827 =============================
828 828
829 $ hg init more-than-one-commit-per-topic 829 $ hg init more-than-one-commit-per-topic
830 $ cd more-than-one-commit-per-topic 830 $ cd more-than-one-commit-per-topic
831 $ cat > .hg/hgrc << EOF 831 $ cat > .hg/hgrc << EOF
832 > [phases] 832 > [phases]
851 0: 851 0:
852 1: featureA 852 1: featureA
853 2: featureA 853 2: featureA
854 3: featureA 854 3: featureA
855 4: 855 4:
856
857 topic subscript relation
858
859 $ tlog 'featureA'
860 3: featureA
861 $ tlog 'featureA#topic[0]'
862 3: featureA
863
864 $ tlog '2#t[-2]'
865 $ tlog '2#t[-1]'
866 1: featureA
867 $ tlog '2#t[0]'
868 2: featureA
869 $ tlog '2#t[1]'
870 3: featureA
871 $ tlog '2#t[2]'
872
873 stack subscript relation
856 874
857 $ hg stack 875 $ hg stack
858 ### target: default (branch) 876 ### target: default (branch)
859 s2@ 4 (current) 877 s2@ 4 (current)
860 ^ 3 878 ^ 3