Mercurial > evolve
comparison tests/test-topic-flow-publish-bare.t @ 3158:678a9802c56b
topic: add an option to automatically publish topic-less changeset
This new option will help playing with merge based workflow.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 01 Nov 2017 16:26:33 +0100 |
parents | |
children | f7129e3d5a38 |
comparison
equal
deleted
inserted
replaced
3157:f286eefbd20d | 3158:678a9802c56b |
---|---|
1 ===================== | |
2 Test workflow options | |
3 ===================== | |
4 | |
5 $ . "$TESTDIR/testlib/topic_setup.sh" | |
6 $ . "$TESTDIR/testlib/common.sh" | |
7 | |
8 Publishing of bare branch | |
9 ========================= | |
10 | |
11 $ hg init bare-branch-server | |
12 $ cd bare-branch-server | |
13 $ cat <<EOF >> .hg/hgrc | |
14 > [phases] | |
15 > publish = no | |
16 > [experimental] | |
17 > topic.publish-bare-branch = yes | |
18 > EOF | |
19 $ mkcommit ROOT | |
20 $ mkcommit c_dA0 | |
21 $ hg phase --public -r 'all()' | |
22 $ cd .. | |
23 | |
24 $ hg clone bare-branch-server bare-client | |
25 updating to branch default | |
26 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 | |
28 pushing a simple branch publish it | |
29 ---------------------------------- | |
30 | |
31 $ cd bare-client | |
32 $ mkcommit c_dB0 | |
33 $ hg push | |
34 pushing to $TESTTMP/bare-branch-server | |
35 searching for changes | |
36 adding changesets | |
37 adding manifests | |
38 adding file changes | |
39 added 1 changesets with 1 changes to 1 files | |
40 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
41 @ 2:286d02a6e2a2 c_dB0 public default | |
42 | | |
43 o 1:134bc3852ad2 c_dA0 public default | |
44 | | |
45 o 0:ea207398892e ROOT public default | |
46 | |
47 | |
48 pushing two heads at the same time | |
49 ---------------------------------- | |
50 | |
51 $ hg update 'desc("c_dA0")' | |
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
53 $ mkcommit c_dC0 | |
54 created new head | |
55 $ hg update 'desc("c_dA0")' | |
56 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
57 $ mkcommit c_dD0 | |
58 created new head | |
59 $ hg push -f | |
60 pushing to $TESTTMP/bare-branch-server | |
61 searching for changes | |
62 adding changesets | |
63 adding manifests | |
64 adding file changes | |
65 added 2 changesets with 2 changes to 2 files (+2 heads) | |
66 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
67 @ 4:9bf953aa81f6 c_dD0 public default | |
68 | | |
69 | o 3:9d5b8e1f08a4 c_dC0 public default | |
70 |/ | |
71 | o 2:286d02a6e2a2 c_dB0 public default | |
72 |/ | |
73 o 1:134bc3852ad2 c_dA0 public default | |
74 | | |
75 o 0:ea207398892e ROOT public default | |
76 | |
77 | |
78 pushing something not on default | |
79 -------------------------------- | |
80 | |
81 $ hg update 'desc("ROOT")' | |
82 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
83 $ hg branch branchA | |
84 marked working directory as branch branchA | |
85 (branches are permanent and global, did you want a bookmark?) | |
86 $ mkcommit c_aE0 | |
87 $ hg push --new-branch | |
88 pushing to $TESTTMP/bare-branch-server | |
89 searching for changes | |
90 adding changesets | |
91 adding manifests | |
92 adding file changes | |
93 added 1 changesets with 1 changes to 1 files (+1 heads) | |
94 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
95 @ 5:0db08e758601 c_aE0 public branchA | |
96 | | |
97 | o 4:9bf953aa81f6 c_dD0 public default | |
98 | | | |
99 | | o 3:9d5b8e1f08a4 c_dC0 public default | |
100 | |/ | |
101 | | o 2:286d02a6e2a2 c_dB0 public default | |
102 | |/ | |
103 | o 1:134bc3852ad2 c_dA0 public default | |
104 |/ | |
105 o 0:ea207398892e ROOT public default | |
106 | |
107 | |
108 pushing topic | |
109 ------------- | |
110 | |
111 $ hg update 'desc("c_dD0")' | |
112 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
113 $ hg topic foo | |
114 marked working directory as topic: foo | |
115 $ mkcommit c_dF0 | |
116 active topic 'foo' grew its first changeset | |
117 $ hg push | |
118 pushing to $TESTTMP/bare-branch-server | |
119 searching for changes | |
120 adding changesets | |
121 adding manifests | |
122 adding file changes | |
123 added 1 changesets with 1 changes to 1 files | |
124 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
125 @ 6:0867c4471796 c_dF0 draft default foo | |
126 | | |
127 o 4:9bf953aa81f6 c_dD0 public default | |
128 | | |
129 | o 3:9d5b8e1f08a4 c_dC0 public default | |
130 |/ | |
131 | o 2:286d02a6e2a2 c_dB0 public default | |
132 |/ | |
133 o 1:134bc3852ad2 c_dA0 public default | |
134 | | |
135 | o 5:0db08e758601 c_aE0 public branchA | |
136 |/ | |
137 o 0:ea207398892e ROOT public default | |
138 | |
139 | |
140 pushing topic over a bare branch | |
141 -------------------------------- | |
142 | |
143 $ hg update 'desc("c_dC0")' | |
144 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
145 $ mkcommit c_dG0 | |
146 $ hg topic bar | |
147 marked working directory as topic: bar | |
148 $ mkcommit c_dH0 | |
149 active topic 'bar' grew its first changeset | |
150 $ hg push | |
151 pushing to $TESTTMP/bare-branch-server | |
152 searching for changes | |
153 adding changesets | |
154 adding manifests | |
155 adding file changes | |
156 added 2 changesets with 2 changes to 2 files | |
157 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
158 @ 8:858be9a8daaf c_dH0 draft default bar | |
159 | | |
160 o 7:0e4041d324d0 c_dG0 public default | |
161 | | |
162 o 3:9d5b8e1f08a4 c_dC0 public default | |
163 | | |
164 | o 2:286d02a6e2a2 c_dB0 public default | |
165 |/ | |
166 | o 6:0867c4471796 c_dF0 draft default foo | |
167 | | | |
168 | o 4:9bf953aa81f6 c_dD0 public default | |
169 |/ | |
170 o 1:134bc3852ad2 c_dA0 public default | |
171 | | |
172 | o 5:0db08e758601 c_aE0 public branchA | |
173 |/ | |
174 o 0:ea207398892e ROOT public default | |
175 | |
176 | |
177 Pushing topic in between bare branch | |
178 ------------------------------------ | |
179 | |
180 $ hg update 'desc("c_dB0")' | |
181 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
182 $ mkcommit c_dI0 | |
183 $ hg update 'desc("c_dH0")' | |
184 switching to topic bar | |
185 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
186 $ mkcommit c_dJ0 | |
187 $ hg update 'desc("c_aE0")' | |
188 1 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
189 $ mkcommit c_aK0 | |
190 $ hg push | |
191 pushing to $TESTTMP/bare-branch-server | |
192 searching for changes | |
193 adding changesets | |
194 adding manifests | |
195 adding file changes | |
196 added 3 changesets with 3 changes to 3 files | |
197 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
198 @ 11:b0a00ebdfd24 c_aK0 public branchA | |
199 | | |
200 o 5:0db08e758601 c_aE0 public branchA | |
201 | | |
202 | o 10:abb5c84eb9e9 c_dJ0 draft default bar | |
203 | | | |
204 | o 8:858be9a8daaf c_dH0 draft default bar | |
205 | | | |
206 | o 7:0e4041d324d0 c_dG0 public default | |
207 | | | |
208 | o 3:9d5b8e1f08a4 c_dC0 public default | |
209 | | | |
210 | | o 9:4b5570d89f0f c_dI0 public default | |
211 | | | | |
212 | | o 2:286d02a6e2a2 c_dB0 public default | |
213 | |/ | |
214 | | o 6:0867c4471796 c_dF0 draft default foo | |
215 | | | | |
216 | | o 4:9bf953aa81f6 c_dD0 public default | |
217 | |/ | |
218 | o 1:134bc3852ad2 c_dA0 public default | |
219 |/ | |
220 o 0:ea207398892e ROOT public default | |
221 | |
222 | |
223 merging a topic in branch | |
224 ------------------------- | |
225 | |
226 $ hg update default | |
227 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
228 $ hg merge foo | |
229 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
230 (branch merge, don't forget to commit) | |
231 $ hg ci -m 'c_dL0' | |
232 $ hg push | |
233 pushing to $TESTTMP/bare-branch-server | |
234 searching for changes | |
235 adding changesets | |
236 adding manifests | |
237 adding file changes | |
238 added 1 changesets with 0 changes to 0 files (-1 heads) | |
239 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
240 @ 12:a6f9f8c6c6cc c_dL0 public default | |
241 |\ | |
242 | o 9:4b5570d89f0f c_dI0 public default | |
243 | | | |
244 o | 6:0867c4471796 c_dF0 public default | |
245 | | | |
246 o | 4:9bf953aa81f6 c_dD0 public default | |
247 | | | |
248 | | o 10:abb5c84eb9e9 c_dJ0 draft default bar | |
249 | | | | |
250 | | o 8:858be9a8daaf c_dH0 draft default bar | |
251 | | | | |
252 | | o 7:0e4041d324d0 c_dG0 public default | |
253 | | | | |
254 +---o 3:9d5b8e1f08a4 c_dC0 public default | |
255 | | | |
256 | o 2:286d02a6e2a2 c_dB0 public default | |
257 |/ | |
258 o 1:134bc3852ad2 c_dA0 public default | |
259 | | |
260 | o 11:b0a00ebdfd24 c_aK0 public branchA | |
261 | | | |
262 | o 5:0db08e758601 c_aE0 public branchA | |
263 |/ | |
264 o 0:ea207398892e ROOT public default | |
265 | |
266 $ hg log -R ../bare-branch-server --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
267 o 12:a6f9f8c6c6cc c_dL0 public default | |
268 |\ | |
269 | o 9:4b5570d89f0f c_dI0 public default | |
270 | | | |
271 o | 6:0867c4471796 c_dF0 public default | |
272 | | | |
273 o | 4:9bf953aa81f6 c_dD0 public default | |
274 | | | |
275 | | o 10:abb5c84eb9e9 c_dJ0 draft default bar | |
276 | | | | |
277 | | o 8:858be9a8daaf c_dH0 draft default bar | |
278 | | | | |
279 | | o 7:0e4041d324d0 c_dG0 public default | |
280 | | | | |
281 +---o 3:9d5b8e1f08a4 c_dC0 public default | |
282 | | | |
283 | o 2:286d02a6e2a2 c_dB0 public default | |
284 |/ | |
285 @ 1:134bc3852ad2 c_dA0 public default | |
286 | | |
287 | o 11:b0a00ebdfd24 c_aK0 public branchA | |
288 | | | |
289 | o 5:0db08e758601 c_aE0 public branchA | |
290 |/ | |
291 o 0:ea207398892e ROOT public default | |
292 |