Mercurial > evolve
comparison tests/test-topic-fold.t @ 5972:656edde3a8ce
tests: use common.sh for creating commits
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Wed, 03 Feb 2021 13:23:41 +0530 |
parents | a1dad44fe3da |
children | caf302fb8f4d |
comparison
equal
deleted
inserted
replaced
5971:3f9a5c910131 | 5972:656edde3a8ce |
---|---|
1 test of the fold command | 1 test of the fold command |
2 ------------------------ | 2 ------------------------ |
3 | 3 |
4 $ . $TESTDIR/testlib/common.sh | |
4 $ cat >> $HGRCPATH <<EOF | 5 $ cat >> $HGRCPATH <<EOF |
5 > [ui] | 6 > [ui] |
6 > interactive = true | 7 > interactive = true |
7 > [extensions] | 8 > [extensions] |
9 > evolve = | |
10 > topic = | |
8 > EOF | 11 > EOF |
9 $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH | 12 |
10 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH | |
11 $ mkcommit() { | |
12 > echo "$1" > "$1" | |
13 > hg add "$1" | |
14 > hg ci -m "add $1" $2 $3 | |
15 > } | |
16 $ logtopic() { | 13 $ logtopic() { |
17 > hg log -G -T "{rev}:{node}\ntopics: {topics}" | 14 > hg log -G -T "{rev}:{node}\ntopics: {topics}" |
18 > } | 15 > } |
19 | 16 |
20 Check that fold keep the topic if all revisions have the topic | 17 Check that fold keep the topic if all revisions have the topic |
28 $ mkcommit feature1 | 25 $ mkcommit feature1 |
29 active topic 'myfeature' grew its first changeset | 26 active topic 'myfeature' grew its first changeset |
30 (see 'hg help topics' for more information) | 27 (see 'hg help topics' for more information) |
31 $ mkcommit feature2 | 28 $ mkcommit feature2 |
32 $ logtopic | 29 $ logtopic |
33 @ 2:d76a6166b18c835be9a487c5e21c7d260f0a1676 | 30 @ 2:6e0fb07fa151928b633485a01b6d815b27f5a26d |
34 | topics: myfeature | 31 | topics: myfeature |
35 o 1:39e7a938055e87615edf675c24a10997ff05bb06 | 32 o 1:95b29fc10be4e6343c8d344ad4354d6ff4098df1 |
36 | topics: myfeature | 33 | topics: myfeature |
37 o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 | 34 o 0:ea207398892eb49e06441f10dda2a731f0450f20 |
38 topics: | 35 topics: |
39 $ hg fold --exact -r "(tip~1)::" -m "folded" | 36 $ hg fold --exact -r "(tip~1)::" -m "folded" |
40 2 changesets folded | 37 2 changesets folded |
41 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 38 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
42 $ hg stack | 39 $ hg stack |
43 ### topic: myfeature | 40 ### topic: myfeature |
44 ### target: default (branch) | 41 ### target: default (branch) |
45 s1@ folded (current) | 42 s1@ folded (current) |
46 s0^ add ROOT (base) | 43 s0^ ROOT (base) |
47 $ logtopic | 44 $ logtopic |
48 @ 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c | 45 @ 3:ba602426356f35854a83b02183d999749142443c |
49 | topics: myfeature | 46 | topics: myfeature |
50 o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 | 47 o 0:ea207398892eb49e06441f10dda2a731f0450f20 |
51 topics: | 48 topics: |
52 $ hg summary | 49 $ hg summary |
53 parent: 3:4fd43e5bdc44 tip | 50 parent: 3:ba602426356f tip |
54 folded | 51 folded |
55 branch: default:myfeature | 52 branch: default:myfeature |
56 commit: (clean) | 53 commit: (clean) |
57 update: (current) | 54 update: (current) |
58 phases: 2 draft | 55 phases: 2 draft |
71 marked working directory as topic: myotherfeature | 68 marked working directory as topic: myotherfeature |
72 $ mkcommit feature4 | 69 $ mkcommit feature4 |
73 active topic 'myotherfeature' grew its first changeset | 70 active topic 'myotherfeature' grew its first changeset |
74 (see 'hg help topics' for more information) | 71 (see 'hg help topics' for more information) |
75 $ logtopic | 72 $ logtopic |
76 @ 5:5ded4d6d578c37f339b0716de2e46e12ece7cbde | 73 @ 5:85e76d22bde1cb5ce44b00fc91a88cb805c93b1b |
77 | topics: myotherfeature | 74 | topics: myotherfeature |
78 o 4:bdf6950b9b5b7c6b377c8132667c73ec86d5734f | 75 o 4:6508e0bfb6a188bb94d77c107f4e969291010b42 |
79 | topics: | 76 | topics: |
80 o 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c | 77 o 3:ba602426356f35854a83b02183d999749142443c |
81 | topics: myfeature | 78 | topics: myfeature |
82 o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 | 79 o 0:ea207398892eb49e06441f10dda2a731f0450f20 |
83 topics: | 80 topics: |
84 $ hg fold --exact -r "(tip~1)::" -m "folded 2" | 81 $ hg fold --exact -r "(tip~1)::" -m "folded 2" |
85 active topic 'myotherfeature' is now empty | 82 active topic 'myotherfeature' is now empty |
86 2 changesets folded | 83 2 changesets folded |
87 clearing empty topic "myotherfeature" | 84 clearing empty topic "myotherfeature" |
88 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 85 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
89 $ logtopic | 86 $ logtopic |
90 @ 6:03da8f7238e9a4d708d6b8af402c91c68f271477 | 87 @ 6:9fa327ea84f90ba000b75b90446680c993972df0 |
91 | topics: | 88 | topics: |
92 o 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c | 89 o 3:ba602426356f35854a83b02183d999749142443c |
93 | topics: myfeature | 90 | topics: myfeature |
94 o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 | 91 o 0:ea207398892eb49e06441f10dda2a731f0450f20 |
95 topics: | 92 topics: |
96 $ hg summary | 93 $ hg summary |
97 parent: 6:03da8f7238e9 tip | 94 parent: 6:9fa327ea84f9 tip |
98 folded 2 | 95 folded 2 |
99 branch: default | 96 branch: default |
100 commit: (clean) | 97 commit: (clean) |
101 update: (current) | 98 update: (current) |
102 phases: 3 draft | 99 phases: 3 draft |