Mercurial > evolve
comparison tests/test-evolve-obshistory-complex.t @ 2484:262d684851dc
obshistory: add the all option to obslog to show the while obs tree
Add a --all option to obslog in order to display also the successors of each
obs markers. It has the effect of showing a more comprehensive graph when a
split or a divergence happened.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 23 May 2017 19:48:04 +0200 |
parents | |
children | ca157d06b2dc b6458de417bb |
comparison
equal
deleted
inserted
replaced
2483:db565cc05987 | 2484:262d684851dc |
---|---|
1 Global setup | |
2 ============ | |
3 | |
4 $ . $TESTDIR/testlib/common.sh | |
5 $ cat >> $HGRCPATH <<EOF | |
6 > [ui] | |
7 > interactive = true | |
8 > [phases] | |
9 > publish=False | |
10 > [extensions] | |
11 > evolve = | |
12 > EOF | |
13 | |
14 Test obslog with split + fold + split | |
15 ===================================== | |
16 | |
17 Test setup | |
18 ---------- | |
19 | |
20 $ hg init $TESTTMP/splitfoldsplit | |
21 $ cd $TESTTMP/splitfoldsplit | |
22 $ mkcommit ROOT | |
23 $ mkcommit A | |
24 $ mkcommit B | |
25 $ mkcommit C | |
26 $ mkcommit D | |
27 $ mkcommit E | |
28 $ mkcommit F | |
29 $ hg log -G | |
30 @ changeset: 6:d9f908fde1a1 | |
31 | tag: tip | |
32 | user: test | |
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
34 | summary: F | |
35 | | |
36 o changeset: 5:0da815c333f6 | |
37 | user: test | |
38 | date: Thu Jan 01 00:00:00 1970 +0000 | |
39 | summary: E | |
40 | | |
41 o changeset: 4:868d2e0eb19c | |
42 | user: test | |
43 | date: Thu Jan 01 00:00:00 1970 +0000 | |
44 | summary: D | |
45 | | |
46 o changeset: 3:a8df460dbbfe | |
47 | user: test | |
48 | date: Thu Jan 01 00:00:00 1970 +0000 | |
49 | summary: C | |
50 | | |
51 o changeset: 2:c473644ee0e9 | |
52 | user: test | |
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: B | |
55 | | |
56 o changeset: 1:2a34000d3544 | |
57 | user: test | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: A | |
60 | | |
61 o changeset: 0:ea207398892e | |
62 user: test | |
63 date: Thu Jan 01 00:00:00 1970 +0000 | |
64 summary: ROOT | |
65 | |
66 Split commits two by two | |
67 ------------------------ | |
68 | |
69 $ hg fold --exact -r 1 -r 2 --date "0 0" -m "fold0" | |
70 2 changesets folded | |
71 4 new unstable changesets | |
72 $ hg fold --exact -r 3 -r 4 --date "0 0" -m "fold1" | |
73 2 changesets folded | |
74 $ hg fold --exact -r 5 -r 6 --date "0 0" -m "fold2" | |
75 2 changesets folded | |
76 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
77 $ hg log -G | |
78 @ changeset: 9:100cc25b765f | |
79 | tag: tip | |
80 | parent: 4:868d2e0eb19c | |
81 | user: test | |
82 | date: Thu Jan 01 00:00:00 1970 +0000 | |
83 | trouble: unstable | |
84 | summary: fold2 | |
85 | | |
86 | o changeset: 8:d15d0ffc75f6 | |
87 | | parent: 2:c473644ee0e9 | |
88 | | user: test | |
89 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
90 | | trouble: unstable | |
91 | | summary: fold1 | |
92 | | | |
93 | | o changeset: 7:b868bc49b0a4 | |
94 | | | parent: 0:ea207398892e | |
95 | | | user: test | |
96 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
97 | | | summary: fold0 | |
98 | | | | |
99 x | | changeset: 4:868d2e0eb19c | |
100 | | | user: test | |
101 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
102 | | | summary: D | |
103 | | | | |
104 x | | changeset: 3:a8df460dbbfe | |
105 |/ / user: test | |
106 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
107 | | summary: C | |
108 | | | |
109 x | changeset: 2:c473644ee0e9 | |
110 | | user: test | |
111 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
112 | | summary: B | |
113 | | | |
114 x | changeset: 1:2a34000d3544 | |
115 |/ user: test | |
116 | date: Thu Jan 01 00:00:00 1970 +0000 | |
117 | summary: A | |
118 | | |
119 o changeset: 0:ea207398892e | |
120 user: test | |
121 date: Thu Jan 01 00:00:00 1970 +0000 | |
122 summary: ROOT | |
123 | |
124 | |
125 Then split | |
126 ---------- | |
127 | |
128 $ hg split "desc(fold0)" -d "0 0" << EOF | |
129 > Y | |
130 > Y | |
131 > N | |
132 > N | |
133 > Y | |
134 > Y | |
135 > EOF | |
136 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
137 adding A | |
138 adding B | |
139 diff --git a/A b/A | |
140 new file mode 100644 | |
141 examine changes to 'A'? [Ynesfdaq?] Y | |
142 | |
143 @@ -0,0 +1,1 @@ | |
144 +A | |
145 record change 1/2 to 'A'? [Ynesfdaq?] Y | |
146 | |
147 diff --git a/B b/B | |
148 new file mode 100644 | |
149 examine changes to 'B'? [Ynesfdaq?] N | |
150 | |
151 created new head | |
152 Done splitting? [yN] N | |
153 diff --git a/B b/B | |
154 new file mode 100644 | |
155 examine changes to 'B'? [Ynesfdaq?] Y | |
156 | |
157 @@ -0,0 +1,1 @@ | |
158 +B | |
159 record this change to 'B'? [Ynesfdaq?] Y | |
160 | |
161 no more change to split | |
162 $ hg split "desc(fold1)" -d "0 0" << EOF | |
163 > Y | |
164 > Y | |
165 > N | |
166 > N | |
167 > Y | |
168 > Y | |
169 > EOF | |
170 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
171 adding C | |
172 adding D | |
173 diff --git a/C b/C | |
174 new file mode 100644 | |
175 examine changes to 'C'? [Ynesfdaq?] Y | |
176 | |
177 @@ -0,0 +1,1 @@ | |
178 +C | |
179 record change 1/2 to 'C'? [Ynesfdaq?] Y | |
180 | |
181 diff --git a/D b/D | |
182 new file mode 100644 | |
183 examine changes to 'D'? [Ynesfdaq?] N | |
184 | |
185 created new head | |
186 Done splitting? [yN] N | |
187 diff --git a/D b/D | |
188 new file mode 100644 | |
189 examine changes to 'D'? [Ynesfdaq?] Y | |
190 | |
191 @@ -0,0 +1,1 @@ | |
192 +D | |
193 record this change to 'D'? [Ynesfdaq?] Y | |
194 | |
195 no more change to split | |
196 $ hg split "desc(fold2)" -d "0 0" << EOF | |
197 > Y | |
198 > Y | |
199 > N | |
200 > N | |
201 > Y | |
202 > Y | |
203 > EOF | |
204 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 adding E | |
206 adding F | |
207 diff --git a/E b/E | |
208 new file mode 100644 | |
209 examine changes to 'E'? [Ynesfdaq?] Y | |
210 | |
211 @@ -0,0 +1,1 @@ | |
212 +E | |
213 record change 1/2 to 'E'? [Ynesfdaq?] Y | |
214 | |
215 diff --git a/F b/F | |
216 new file mode 100644 | |
217 examine changes to 'F'? [Ynesfdaq?] N | |
218 | |
219 created new head | |
220 Done splitting? [yN] N | |
221 diff --git a/F b/F | |
222 new file mode 100644 | |
223 examine changes to 'F'? [Ynesfdaq?] Y | |
224 | |
225 @@ -0,0 +1,1 @@ | |
226 +F | |
227 record this change to 'F'? [Ynesfdaq?] Y | |
228 | |
229 no more change to split | |
230 $ hg log -G | |
231 @ changeset: 15:d4a000f63ee9 | |
232 | tag: tip | |
233 | user: test | |
234 | date: Thu Jan 01 00:00:00 1970 +0000 | |
235 | trouble: unstable | |
236 | summary: fold2 | |
237 | | |
238 o changeset: 14:ec31316faa9d | |
239 | parent: 4:868d2e0eb19c | |
240 | user: test | |
241 | date: Thu Jan 01 00:00:00 1970 +0000 | |
242 | trouble: unstable | |
243 | summary: fold2 | |
244 | | |
245 | o changeset: 13:d0f33db50670 | |
246 | | user: test | |
247 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
248 | | trouble: unstable | |
249 | | summary: fold1 | |
250 | | | |
251 | o changeset: 12:7b3290f6e0a0 | |
252 | | parent: 2:c473644ee0e9 | |
253 | | user: test | |
254 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
255 | | trouble: unstable | |
256 | | summary: fold1 | |
257 | | | |
258 | | o changeset: 11:e036916b63ea | |
259 | | | user: test | |
260 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
261 | | | summary: fold0 | |
262 | | | | |
263 | | o changeset: 10:19e14c8397fc | |
264 | | | parent: 0:ea207398892e | |
265 | | | user: test | |
266 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
267 | | | summary: fold0 | |
268 | | | | |
269 x | | changeset: 4:868d2e0eb19c | |
270 | | | user: test | |
271 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
272 | | | summary: D | |
273 | | | | |
274 x | | changeset: 3:a8df460dbbfe | |
275 |/ / user: test | |
276 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
277 | | summary: C | |
278 | | | |
279 x | changeset: 2:c473644ee0e9 | |
280 | | user: test | |
281 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
282 | | summary: B | |
283 | | | |
284 x | changeset: 1:2a34000d3544 | |
285 |/ user: test | |
286 | date: Thu Jan 01 00:00:00 1970 +0000 | |
287 | summary: A | |
288 | | |
289 o changeset: 0:ea207398892e | |
290 user: test | |
291 date: Thu Jan 01 00:00:00 1970 +0000 | |
292 summary: ROOT | |
293 | |
294 | |
295 Connect them all | |
296 ---------------- | |
297 | |
298 $ hg prune -s 12 -r 11 | |
299 1 changesets pruned | |
300 $ hg prune -s 14 -r 13 | |
301 1 changesets pruned | |
302 $ hg log -G | |
303 @ changeset: 15:d4a000f63ee9 | |
304 | tag: tip | |
305 | user: test | |
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | trouble: unstable | |
308 | summary: fold2 | |
309 | | |
310 o changeset: 14:ec31316faa9d | |
311 | parent: 4:868d2e0eb19c | |
312 | user: test | |
313 | date: Thu Jan 01 00:00:00 1970 +0000 | |
314 | trouble: unstable | |
315 | summary: fold2 | |
316 | | |
317 | o changeset: 12:7b3290f6e0a0 | |
318 | | parent: 2:c473644ee0e9 | |
319 | | user: test | |
320 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
321 | | trouble: unstable | |
322 | | summary: fold1 | |
323 | | | |
324 | | o changeset: 10:19e14c8397fc | |
325 | | | parent: 0:ea207398892e | |
326 | | | user: test | |
327 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
328 | | | summary: fold0 | |
329 | | | | |
330 x | | changeset: 4:868d2e0eb19c | |
331 | | | user: test | |
332 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
333 | | | summary: D | |
334 | | | | |
335 x | | changeset: 3:a8df460dbbfe | |
336 |/ / user: test | |
337 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
338 | | summary: C | |
339 | | | |
340 x | changeset: 2:c473644ee0e9 | |
341 | | user: test | |
342 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
343 | | summary: B | |
344 | | | |
345 x | changeset: 1:2a34000d3544 | |
346 |/ user: test | |
347 | date: Thu Jan 01 00:00:00 1970 +0000 | |
348 | summary: A | |
349 | | |
350 o changeset: 0:ea207398892e | |
351 user: test | |
352 date: Thu Jan 01 00:00:00 1970 +0000 | |
353 summary: ROOT | |
354 | |
355 Actual Test | |
356 =========== | |
357 | |
358 Obslog should show a subset of the obs history, this test check that the | |
359 walking algorithm works no matter the level of successors + precursors | |
360 | |
361 $ hg obslog 12 | |
362 o 7b3290f6e0a0 (12) fold1 | |
363 |\ | |
364 x | d15d0ffc75f6 (8) fold1 | |
365 |\ \ rewritten by test (*) as 7b3290f6e0a0, d0f33db50670 (glob) | |
366 | | | | |
367 | | x e036916b63ea (11) fold0 | |
368 | | | rewritten by test (*) as 7b3290f6e0a0 (glob) | |
369 | | | | |
370 x | | 868d2e0eb19c (4) D | |
371 / / rewritten by test (*) as d15d0ffc75f6 (glob) | |
372 | | | |
373 x | a8df460dbbfe (3) C | |
374 / rewritten by test (*) as d15d0ffc75f6 (glob) | |
375 | | |
376 x b868bc49b0a4 (7) fold0 | |
377 |\ rewritten by test (*) as 19e14c8397fc, e036916b63ea (glob) | |
378 | | | |
379 x | 2a34000d3544 (1) A | |
380 / rewritten by test (*) as b868bc49b0a4 (glob) | |
381 | | |
382 x c473644ee0e9 (2) B | |
383 rewritten by test (*) as b868bc49b0a4 (glob) | |
384 | |
385 While with all option, we should see 15 changesets | |
386 | |
387 $ hg obslog --all 15 | |
388 o 19e14c8397fc (10) fold0 | |
389 | | |
390 | o 7b3290f6e0a0 (12) fold1 | |
391 | |\ | |
392 | | | @ d4a000f63ee9 (15) fold2 | |
393 | | | | | |
394 | | | | o ec31316faa9d (14) fold2 | |
395 | | | |/| | |
396 | | | x | 100cc25b765f (9) fold2 | |
397 | | | |\ \ rewritten by test (*) as d4a000f63ee9, ec31316faa9d (glob) | |
398 | | | | | | | |
399 | +-------x d0f33db50670 (13) fold1 | |
400 | | | | | rewritten by test (*) as ec31316faa9d (glob) | |
401 | | | | | | |
402 +---x | | e036916b63ea (11) fold0 | |
403 | | / / rewritten by test (*) as 7b3290f6e0a0 (glob) | |
404 | | | | | |
405 | | x | 0da815c333f6 (5) E | |
406 | | / rewritten by test (*) as 100cc25b765f (glob) | |
407 | | | | |
408 x | | b868bc49b0a4 (7) fold0 | |
409 |\ \ \ rewritten by test (*) as 19e14c8397fc, e036916b63ea (glob) | |
410 | | | | | |
411 | | x | d15d0ffc75f6 (8) fold1 | |
412 | | |\ \ rewritten by test (*) as 7b3290f6e0a0, d0f33db50670 (glob) | |
413 | | | | | | |
414 | | | | x d9f908fde1a1 (6) F | |
415 | | | | rewritten by test (*) as 100cc25b765f (glob) | |
416 | | | | | |
417 x | | | 2a34000d3544 (1) A | |
418 / / / rewritten by test (*) as b868bc49b0a4 (glob) | |
419 | | | | |
420 | x | 868d2e0eb19c (4) D | |
421 | / rewritten by test (*) as d15d0ffc75f6 (glob) | |
422 | | | |
423 | x a8df460dbbfe (3) C | |
424 | rewritten by test (*) as d15d0ffc75f6 (glob) | |
425 | | |
426 x c473644ee0e9 (2) B | |
427 rewritten by test (*) as b868bc49b0a4 (glob) | |
428 |