comparison tests/test-topic-debugcb.t @ 2905:610d06bcd714

convertbookmark: properly exclude public changeset Public changeset are immutable and cannot have a topic anyway.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2017 17:04:21 +0200
parents 4ae89b5834e6
children 9ce092b17530
comparison
equal deleted inserted replaced
2904:4ae89b5834e6 2905:610d06bcd714
17 17
18 $ hg init repo 18 $ hg init repo
19 $ cd repo 19 $ cd repo
20 $ echo "Hello" > root 20 $ echo "Hello" > root
21 $ hg commit -Aqm "root" 21 $ hg commit -Aqm "root"
22 $ hg phase --public .
22 $ echo "Hello" > a 23 $ echo "Hello" > a
23 $ hg commit -Aqm "First commit" 24 $ hg commit -Aqm "First commit"
24 $ echo "Hello" > b 25 $ echo "Hello" > b
25 $ hg commit -Aqm "Second commit" 26 $ hg commit -Aqm "Second commit"
26 $ hg bookmark "hellos" 27 $ hg bookmark "hellos"
155 $ rm -rf repo 156 $ rm -rf repo
156 $ hg init setup1 157 $ hg init setup1
157 $ cd setup1 158 $ cd setup1
158 $ echo "Hello" > root 159 $ echo "Hello" > root
159 $ hg commit -Aqm "root" 160 $ hg commit -Aqm "root"
161 $ hg phase --public .
160 $ echo "Hello" > A 162 $ echo "Hello" > A
161 $ hg commit -Aqm "A" 163 $ hg commit -Aqm "A"
162 $ echo "Hello" > B 164 $ echo "Hello" > B
163 $ hg commit -Aqm "B" 165 $ hg commit -Aqm "B"
164 $ echo "Hello" > C 166 $ echo "Hello" > C
216 $ rm -rf setup1 218 $ rm -rf setup1
217 $ hg init setup2 219 $ hg init setup2
218 $ cd setup2 220 $ cd setup2
219 $ echo "Hello" > root 221 $ echo "Hello" > root
220 $ hg commit -Aqm "root" 222 $ hg commit -Aqm "root"
223 $ hg phase --public .
221 $ echo "Hello" > A 224 $ echo "Hello" > A
222 $ hg commit -Aqm "A" 225 $ hg commit -Aqm "A"
223 $ hg phase --public . 226 $ hg phase --public .
224 $ echo "Hello" > B 227 $ echo "Hello" > B
225 $ hg commit -Aqm "B" 228 $ hg commit -Aqm "B"
263 | 266 |
264 o [1:e34122c9a2bf] A 267 o [1:e34122c9a2bf] A
265 | 268 |
266 o [0:249055fcca50] root 269 o [0:249055fcca50] root
267 270
271
272 Check that phase are properly take in account
273 ---------------------------------------------
274
275 (we reuse above test, taking advantage of a small bug regarding stacked bookmarks. we can fuse the two tests once that bug is fixed)
276
277 $ cd ..
278 $ hg init setup-phases
279 $ cd setup-phases
280 $ echo "Hello" > root
281 $ hg commit -Aqm "root"
282 $ hg phase --public .
283 $ echo "Hello" > A
284 $ hg commit -Aqm "A"
285 $ echo "Hello" > B
286 $ hg commit -Aqm "B"
287 $ echo "Hello" > C
288 $ hg commit -Aqm "C"
289 $ hg bookmark -r . bar
290 $ hg log -G
291 @ [3:ac05e0d05d00] C
292 | bookmark: bar
293 o [2:10f317d09e78] B
294 |
295 o [1:e34122c9a2bf] A
296 |
297 o [0:249055fcca50] root
298
299
300 $ hg debugconvertbookmark --all
301 switching to topic bar
302 changed topic to "bar" on 3 revisions
303 $ hg log -G
304 @ [6:863c43a7951c] C
305 | topic: bar
306 o [5:ac7f12ac947f] B
307 | topic: bar
308 o [4:fc82c8c14b4c] A
309 | topic: bar
310 o [0:249055fcca50] root
311