Mercurial > evolve
comparison tests/test-evolve-obshistory-complex.t @ 2532:ca157d06b2dc mercurial-4.0
test-compat: merge with mercurial-4.1
hg log has no trouble field in mercurial 4.0, output fixed.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 31 May 2017 14:23:45 +0200 |
parents | 262d684851dc |
children | 44dd9d76afb2 |
comparison
equal
deleted
inserted
replaced
2467:d517659556cf | 2532:ca157d06b2dc |
---|---|
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 | summary: fold2 | |
84 | | |
85 | o changeset: 8:d15d0ffc75f6 | |
86 | | parent: 2:c473644ee0e9 | |
87 | | user: test | |
88 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
89 | | summary: fold1 | |
90 | | | |
91 | | o changeset: 7:b868bc49b0a4 | |
92 | | | parent: 0:ea207398892e | |
93 | | | user: test | |
94 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
95 | | | summary: fold0 | |
96 | | | | |
97 x | | changeset: 4:868d2e0eb19c | |
98 | | | user: test | |
99 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
100 | | | summary: D | |
101 | | | | |
102 x | | changeset: 3:a8df460dbbfe | |
103 |/ / user: test | |
104 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
105 | | summary: C | |
106 | | | |
107 x | changeset: 2:c473644ee0e9 | |
108 | | user: test | |
109 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
110 | | summary: B | |
111 | | | |
112 x | changeset: 1:2a34000d3544 | |
113 |/ user: test | |
114 | date: Thu Jan 01 00:00:00 1970 +0000 | |
115 | summary: A | |
116 | | |
117 o changeset: 0:ea207398892e | |
118 user: test | |
119 date: Thu Jan 01 00:00:00 1970 +0000 | |
120 summary: ROOT | |
121 | |
122 | |
123 Then split | |
124 ---------- | |
125 | |
126 $ hg split "desc(fold0)" -d "0 0" << EOF | |
127 > Y | |
128 > Y | |
129 > N | |
130 > N | |
131 > Y | |
132 > Y | |
133 > EOF | |
134 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
135 adding A | |
136 adding B | |
137 diff --git a/A b/A | |
138 new file mode 100644 | |
139 examine changes to 'A'? [Ynesfdaq?] Y | |
140 | |
141 @@ -0,0 +1,1 @@ | |
142 +A | |
143 record change 1/2 to 'A'? [Ynesfdaq?] Y | |
144 | |
145 diff --git a/B b/B | |
146 new file mode 100644 | |
147 examine changes to 'B'? [Ynesfdaq?] N | |
148 | |
149 created new head | |
150 Done splitting? [yN] N | |
151 diff --git a/B b/B | |
152 new file mode 100644 | |
153 examine changes to 'B'? [Ynesfdaq?] Y | |
154 | |
155 @@ -0,0 +1,1 @@ | |
156 +B | |
157 record this change to 'B'? [Ynesfdaq?] Y | |
158 | |
159 no more change to split | |
160 $ hg split "desc(fold1)" -d "0 0" << EOF | |
161 > Y | |
162 > Y | |
163 > N | |
164 > N | |
165 > Y | |
166 > Y | |
167 > EOF | |
168 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 adding C | |
170 adding D | |
171 diff --git a/C b/C | |
172 new file mode 100644 | |
173 examine changes to 'C'? [Ynesfdaq?] Y | |
174 | |
175 @@ -0,0 +1,1 @@ | |
176 +C | |
177 record change 1/2 to 'C'? [Ynesfdaq?] Y | |
178 | |
179 diff --git a/D b/D | |
180 new file mode 100644 | |
181 examine changes to 'D'? [Ynesfdaq?] N | |
182 | |
183 created new head | |
184 Done splitting? [yN] N | |
185 diff --git a/D b/D | |
186 new file mode 100644 | |
187 examine changes to 'D'? [Ynesfdaq?] Y | |
188 | |
189 @@ -0,0 +1,1 @@ | |
190 +D | |
191 record this change to 'D'? [Ynesfdaq?] Y | |
192 | |
193 no more change to split | |
194 $ hg split "desc(fold2)" -d "0 0" << EOF | |
195 > Y | |
196 > Y | |
197 > N | |
198 > N | |
199 > Y | |
200 > Y | |
201 > EOF | |
202 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
203 adding E | |
204 adding F | |
205 diff --git a/E b/E | |
206 new file mode 100644 | |
207 examine changes to 'E'? [Ynesfdaq?] Y | |
208 | |
209 @@ -0,0 +1,1 @@ | |
210 +E | |
211 record change 1/2 to 'E'? [Ynesfdaq?] Y | |
212 | |
213 diff --git a/F b/F | |
214 new file mode 100644 | |
215 examine changes to 'F'? [Ynesfdaq?] N | |
216 | |
217 created new head | |
218 Done splitting? [yN] N | |
219 diff --git a/F b/F | |
220 new file mode 100644 | |
221 examine changes to 'F'? [Ynesfdaq?] Y | |
222 | |
223 @@ -0,0 +1,1 @@ | |
224 +F | |
225 record this change to 'F'? [Ynesfdaq?] Y | |
226 | |
227 no more change to split | |
228 $ hg log -G | |
229 @ changeset: 15:d4a000f63ee9 | |
230 | tag: tip | |
231 | user: test | |
232 | date: Thu Jan 01 00:00:00 1970 +0000 | |
233 | summary: fold2 | |
234 | | |
235 o changeset: 14:ec31316faa9d | |
236 | parent: 4:868d2e0eb19c | |
237 | user: test | |
238 | date: Thu Jan 01 00:00:00 1970 +0000 | |
239 | summary: fold2 | |
240 | | |
241 | o changeset: 13:d0f33db50670 | |
242 | | user: test | |
243 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
244 | | summary: fold1 | |
245 | | | |
246 | o changeset: 12:7b3290f6e0a0 | |
247 | | parent: 2:c473644ee0e9 | |
248 | | user: test | |
249 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | | summary: fold1 | |
251 | | | |
252 | | o changeset: 11:e036916b63ea | |
253 | | | user: test | |
254 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
255 | | | summary: fold0 | |
256 | | | | |
257 | | o changeset: 10:19e14c8397fc | |
258 | | | parent: 0:ea207398892e | |
259 | | | user: test | |
260 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
261 | | | summary: fold0 | |
262 | | | | |
263 x | | changeset: 4:868d2e0eb19c | |
264 | | | user: test | |
265 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | | | summary: D | |
267 | | | | |
268 x | | changeset: 3:a8df460dbbfe | |
269 |/ / user: test | |
270 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
271 | | summary: C | |
272 | | | |
273 x | changeset: 2:c473644ee0e9 | |
274 | | user: test | |
275 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
276 | | summary: B | |
277 | | | |
278 x | changeset: 1:2a34000d3544 | |
279 |/ user: test | |
280 | date: Thu Jan 01 00:00:00 1970 +0000 | |
281 | summary: A | |
282 | | |
283 o changeset: 0:ea207398892e | |
284 user: test | |
285 date: Thu Jan 01 00:00:00 1970 +0000 | |
286 summary: ROOT | |
287 | |
288 | |
289 Connect them all | |
290 ---------------- | |
291 | |
292 $ hg prune -s 12 -r 11 | |
293 1 changesets pruned | |
294 $ hg prune -s 14 -r 13 | |
295 1 changesets pruned | |
296 $ hg log -G | |
297 @ changeset: 15:d4a000f63ee9 | |
298 | tag: tip | |
299 | user: test | |
300 | date: Thu Jan 01 00:00:00 1970 +0000 | |
301 | summary: fold2 | |
302 | | |
303 o changeset: 14:ec31316faa9d | |
304 | parent: 4:868d2e0eb19c | |
305 | user: test | |
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | summary: fold2 | |
308 | | |
309 | o changeset: 12:7b3290f6e0a0 | |
310 | | parent: 2:c473644ee0e9 | |
311 | | user: test | |
312 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
313 | | summary: fold1 | |
314 | | | |
315 | | o changeset: 10:19e14c8397fc | |
316 | | | parent: 0:ea207398892e | |
317 | | | user: test | |
318 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
319 | | | summary: fold0 | |
320 | | | | |
321 x | | changeset: 4:868d2e0eb19c | |
322 | | | user: test | |
323 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
324 | | | summary: D | |
325 | | | | |
326 x | | changeset: 3:a8df460dbbfe | |
327 |/ / user: test | |
328 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
329 | | summary: C | |
330 | | | |
331 x | changeset: 2:c473644ee0e9 | |
332 | | user: test | |
333 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
334 | | summary: B | |
335 | | | |
336 x | changeset: 1:2a34000d3544 | |
337 |/ user: test | |
338 | date: Thu Jan 01 00:00:00 1970 +0000 | |
339 | summary: A | |
340 | | |
341 o changeset: 0:ea207398892e | |
342 user: test | |
343 date: Thu Jan 01 00:00:00 1970 +0000 | |
344 summary: ROOT | |
345 | |
346 Actual Test | |
347 =========== | |
348 | |
349 Obslog should show a subset of the obs history, this test check that the | |
350 walking algorithm works no matter the level of successors + precursors | |
351 | |
352 $ hg obslog 12 | |
353 o 7b3290f6e0a0 (12) fold1 | |
354 |\ | |
355 x | d15d0ffc75f6 (8) fold1 | |
356 |\ \ rewritten by test (*) as 7b3290f6e0a0, d0f33db50670 (glob) | |
357 | | | | |
358 | | x e036916b63ea (11) fold0 | |
359 | | | rewritten by test (*) as 7b3290f6e0a0 (glob) | |
360 | | | | |
361 x | | 868d2e0eb19c (4) D | |
362 / / rewritten by test (*) as d15d0ffc75f6 (glob) | |
363 | | | |
364 x | a8df460dbbfe (3) C | |
365 / rewritten by test (*) as d15d0ffc75f6 (glob) | |
366 | | |
367 x b868bc49b0a4 (7) fold0 | |
368 |\ rewritten by test (*) as 19e14c8397fc, e036916b63ea (glob) | |
369 | | | |
370 x | 2a34000d3544 (1) A | |
371 / rewritten by test (*) as b868bc49b0a4 (glob) | |
372 | | |
373 x c473644ee0e9 (2) B | |
374 rewritten by test (*) as b868bc49b0a4 (glob) | |
375 | |
376 While with all option, we should see 15 changesets | |
377 | |
378 $ hg obslog --all 15 | |
379 o 19e14c8397fc (10) fold0 | |
380 | | |
381 | o 7b3290f6e0a0 (12) fold1 | |
382 | |\ | |
383 | | | @ d4a000f63ee9 (15) fold2 | |
384 | | | | | |
385 | | | | o ec31316faa9d (14) fold2 | |
386 | | | |/| | |
387 | | | x | 100cc25b765f (9) fold2 | |
388 | | | |\ \ rewritten by test (*) as d4a000f63ee9, ec31316faa9d (glob) | |
389 | | | | | | | |
390 | +-------x d0f33db50670 (13) fold1 | |
391 | | | | | rewritten by test (*) as ec31316faa9d (glob) | |
392 | | | | | | |
393 +---x | | e036916b63ea (11) fold0 | |
394 | | / / rewritten by test (*) as 7b3290f6e0a0 (glob) | |
395 | | | | | |
396 | | x | 0da815c333f6 (5) E | |
397 | | / rewritten by test (*) as 100cc25b765f (glob) | |
398 | | | | |
399 x | | b868bc49b0a4 (7) fold0 | |
400 |\ \ \ rewritten by test (*) as 19e14c8397fc, e036916b63ea (glob) | |
401 | | | | | |
402 | | x | d15d0ffc75f6 (8) fold1 | |
403 | | |\ \ rewritten by test (*) as 7b3290f6e0a0, d0f33db50670 (glob) | |
404 | | | | | | |
405 | | | | x d9f908fde1a1 (6) F | |
406 | | | | rewritten by test (*) as 100cc25b765f (glob) | |
407 | | | | | |
408 x | | | 2a34000d3544 (1) A | |
409 / / / rewritten by test (*) as b868bc49b0a4 (glob) | |
410 | | | | |
411 | x | 868d2e0eb19c (4) D | |
412 | / rewritten by test (*) as d15d0ffc75f6 (glob) | |
413 | | | |
414 | x a8df460dbbfe (3) C | |
415 | rewritten by test (*) as d15d0ffc75f6 (glob) | |
416 | | |
417 x c473644ee0e9 (2) B | |
418 rewritten by test (*) as b868bc49b0a4 (glob) | |
419 |