Mercurial > evolve
comparison tests/test-evolve-topic.t @ 1626:0edb545503fe
topic: 'hg evolve --all' pick all trouble within current topic
This is the first changeset of a collaboration between the topic extensions and
evolve. If there is an active topic, 'hg evolve --all' will try to fix all
changesets in that topic wherever they are. Aspiring descendant that are not in
the current topic will be ignored.
For now, evolve behave as usual if there is no active topic. This is a bit
inconsistent and will probably be unified in the future.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Mar 2016 09:39:35 -0700 |
parents | |
children | a91115687a7e |
comparison
equal
deleted
inserted
replaced
1624:081605c2e9b6 | 1626:0edb545503fe |
---|---|
1 | |
2 Check we can find the topic extensions | |
3 | |
4 $ [ -e $TOPICROOT/hgext3rd/topic/__init__.py ] || exit 80 | |
5 $ cat >> $HGRCPATH <<EOF | |
6 > [defaults] | |
7 > amend=-d "0 0" | |
8 > fold=-d "0 0" | |
9 > [phases] | |
10 > publish = False | |
11 > [ui] | |
12 > logtemplate = {rev} - \{{get(namespaces, "topics")}} {node|short} {desc} ({phase})\n | |
13 > [diff] | |
14 > git = 1 | |
15 > unified = 0 | |
16 > [extensions] | |
17 > rebase = | |
18 > topic = $TOPICROOT/hgext3rd/topic/ | |
19 > EOF | |
20 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH | |
21 | |
22 $ mkcommit() { | |
23 > echo "$1" > "$1" | |
24 > hg add "$1" | |
25 > hg ci -m "add $1" | |
26 > } | |
27 | |
28 Create a simple setup | |
29 | |
30 $ hg init repoa | |
31 $ cd repoa | |
32 $ mkcommit aaa | |
33 $ mkcommit bbb | |
34 $ hg topic foo | |
35 $ mkcommit ccc | |
36 $ mkcommit ddd | |
37 created new head | |
38 $ mkcommit eee | |
39 created new head | |
40 $ mkcommit fff | |
41 created new head | |
42 $ hg topic bar | |
43 $ mkcommit ggg | |
44 created new head | |
45 $ mkcommit hhh | |
46 created new head | |
47 $ mkcommit iii | |
48 created new head | |
49 $ mkcommit jjj | |
50 created new head | |
51 | |
52 $ hg log -G | |
53 @ 9 - {bar} 1d964213b023 add jjj (draft) | |
54 | | |
55 o 8 - {bar} fcab990f3261 add iii (draft) | |
56 | | |
57 o 7 - {bar} b0c2554835ac add hhh (draft) | |
58 | | |
59 o 6 - {bar} c748293f1c1a add ggg (draft) | |
60 | | |
61 o 5 - {foo} 6a6b7365c751 add fff (draft) | |
62 | | |
63 o 4 - {foo} 3969ab847d9c add eee (draft) | |
64 | | |
65 o 3 - {foo} 4e3a154f38c7 add ddd (draft) | |
66 | | |
67 o 2 - {foo} cced9bac76e3 add ccc (draft) | |
68 | | |
69 o 1 - {} a4dbed0837ea add bbb (draft) | |
70 | | |
71 o 0 - {} 199cc73e9a0b add aaa (draft) | |
72 | |
73 | |
74 Test that evolve --all evolve the current topic | |
75 ----------------------------------------------- | |
76 | |
77 make a mess | |
78 | |
79 $ hg up foo | |
80 switching to topic foo | |
81 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
82 $ hg topic -l | |
83 _ add bbb | |
84 t0: add ccc | |
85 t1: add ddd | |
86 t2: add eee | |
87 t3@ add fff (current) | |
88 $ hg up 'desc(ddd)' | |
89 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
90 $ echo ddd >> ddd | |
91 $ hg amend | |
92 6 new unstable changesets | |
93 $ hg up 'desc(fff)' | |
94 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 $ echo fff >> fff | |
96 $ hg amend | |
97 | |
98 $ hg log -G | |
99 @ 13 - {foo} e104f49bab28 add fff (draft) | |
100 | | |
101 | o 11 - {foo} d9cacd156ffc add ddd (draft) | |
102 | | | |
103 | | o 9 - {bar} 1d964213b023 add jjj (draft) | |
104 | | | | |
105 | | o 8 - {bar} fcab990f3261 add iii (draft) | |
106 | | | | |
107 | | o 7 - {bar} b0c2554835ac add hhh (draft) | |
108 | | | | |
109 | | o 6 - {bar} c748293f1c1a add ggg (draft) | |
110 | | | | |
111 +---x 5 - {foo} 6a6b7365c751 add fff (draft) | |
112 | | | |
113 o | 4 - {foo} 3969ab847d9c add eee (draft) | |
114 | | | |
115 x | 3 - {foo} 4e3a154f38c7 add ddd (draft) | |
116 |/ | |
117 o 2 - {foo} cced9bac76e3 add ccc (draft) | |
118 | | |
119 o 1 - {} a4dbed0837ea add bbb (draft) | |
120 | | |
121 o 0 - {} 199cc73e9a0b add aaa (draft) | |
122 | |
123 | |
124 Run evolve --all | |
125 | |
126 $ hg evolve --all | |
127 move:[4] add eee | |
128 atop:[11] add ddd | |
129 move:[13] add fff | |
130 atop:[14] add eee | |
131 working directory is now at 070c5573d8f9 | |
132 $ hg log -G | |
133 @ 15 - {foo} 070c5573d8f9 add fff (draft) | |
134 | | |
135 o 14 - {foo} 42b49017ff90 add eee (draft) | |
136 | | |
137 o 11 - {foo} d9cacd156ffc add ddd (draft) | |
138 | | |
139 | o 9 - {bar} 1d964213b023 add jjj (draft) | |
140 | | | |
141 | o 8 - {bar} fcab990f3261 add iii (draft) | |
142 | | | |
143 | o 7 - {bar} b0c2554835ac add hhh (draft) | |
144 | | | |
145 | o 6 - {bar} c748293f1c1a add ggg (draft) | |
146 | | | |
147 | x 5 - {foo} 6a6b7365c751 add fff (draft) | |
148 | | | |
149 | x 4 - {foo} 3969ab847d9c add eee (draft) | |
150 | | | |
151 | x 3 - {foo} 4e3a154f38c7 add ddd (draft) | |
152 |/ | |
153 o 2 - {foo} cced9bac76e3 add ccc (draft) | |
154 | | |
155 o 1 - {} a4dbed0837ea add bbb (draft) | |
156 | | |
157 o 0 - {} 199cc73e9a0b add aaa (draft) | |
158 | |
159 |