|
1 This test file test the various messages when accessing obsolete |
|
2 revisions. |
|
3 |
|
4 Global setup |
|
5 ============ |
|
6 |
|
7 $ . $TESTDIR/testlib/common.sh |
|
8 $ cat >> $HGRCPATH <<EOF |
|
9 > [ui] |
|
10 > interactive = true |
|
11 > [phases] |
|
12 > publish=False |
|
13 > [extensions] |
|
14 > evolve = |
|
15 > EOF |
|
16 |
|
17 Test output on amended commit |
|
18 ============================= |
|
19 |
|
20 Test setup |
|
21 ---------- |
|
22 |
|
23 $ hg init $TESTTMP/local-amend |
|
24 $ cd $TESTTMP/local-amend |
|
25 $ mkcommit ROOT |
|
26 $ mkcommit A0 |
|
27 $ echo 42 >> A0 |
|
28 $ hg amend -m "A1" |
|
29 $ hg log --hidden -G |
|
30 @ changeset: 3:a468dc9b3633 |
|
31 | tag: tip |
|
32 | parent: 0:ea207398892e |
|
33 | user: test |
|
34 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
35 | summary: A1 |
|
36 | |
|
37 | x changeset: 2:f137d23bb3e1 |
|
38 | | user: test |
|
39 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
40 | | summary: temporary amend commit for 471f378eab4c |
|
41 | | |
|
42 | x changeset: 1:471f378eab4c |
|
43 |/ user: test |
|
44 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
45 | summary: A0 |
|
46 | |
|
47 o changeset: 0:ea207398892e |
|
48 user: test |
|
49 date: Thu Jan 01 00:00:00 1970 +0000 |
|
50 summary: ROOT |
|
51 |
|
52 Actual test |
|
53 ----------- |
|
54 |
|
55 $ hg update 471f378eab4c |
|
56 abort: hidden revision '471f378eab4c'! |
|
57 (use --hidden to access hidden revisions; successor: a468dc9b3633) |
|
58 [255] |
|
59 $ hg update --hidden "desc(A0)" |
|
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 working directory parent is obsolete! (471f378eab4c) |
|
62 (use 'hg evolve' to update to its successor: a468dc9b3633) |
|
63 |
|
64 Test output with pruned commit |
|
65 ============================== |
|
66 |
|
67 Test setup |
|
68 ---------- |
|
69 |
|
70 $ hg init $TESTTMP/local-prune |
|
71 $ cd $TESTTMP/local-prune |
|
72 $ mkcommit ROOT |
|
73 $ mkcommit A0 # 0 |
|
74 $ mkcommit B0 # 1 |
|
75 $ hg log --hidden -G |
|
76 @ changeset: 2:0dec01379d3b |
|
77 | tag: tip |
|
78 | user: test |
|
79 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
80 | summary: B0 |
|
81 | |
|
82 o changeset: 1:471f378eab4c |
|
83 | user: test |
|
84 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
85 | summary: A0 |
|
86 | |
|
87 o changeset: 0:ea207398892e |
|
88 user: test |
|
89 date: Thu Jan 01 00:00:00 1970 +0000 |
|
90 summary: ROOT |
|
91 |
|
92 $ hg prune -r 'desc(B0)' |
|
93 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
94 working directory now at 471f378eab4c |
|
95 1 changesets pruned |
|
96 |
|
97 Actual test |
|
98 ----------- |
|
99 |
|
100 $ hg up 1 |
|
101 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
102 $ hg up 0dec01379d3b |
|
103 abort: hidden revision '0dec01379d3b'! |
|
104 (use --hidden to access hidden revisions; pruned) |
|
105 [255] |
|
106 $ hg up --hidden -r 'desc(B0)' |
|
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 working directory parent is obsolete! (0dec01379d3b) |
|
109 (use 'hg evolve' to update to its parent successor) |
|
110 |
|
111 Test output with splitted commit |
|
112 ================================ |
|
113 |
|
114 Test setup |
|
115 ---------- |
|
116 |
|
117 $ hg init $TESTTMP/local-split |
|
118 $ cd $TESTTMP/local-split |
|
119 $ mkcommit ROOT |
|
120 $ echo 42 >> a |
|
121 $ echo 43 >> b |
|
122 $ hg commit -A -m "A0" |
|
123 adding a |
|
124 adding b |
|
125 $ hg log --hidden -G |
|
126 @ changeset: 1:471597cad322 |
|
127 | tag: tip |
|
128 | user: test |
|
129 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
130 | summary: A0 |
|
131 | |
|
132 o changeset: 0:ea207398892e |
|
133 user: test |
|
134 date: Thu Jan 01 00:00:00 1970 +0000 |
|
135 summary: ROOT |
|
136 |
|
137 $ hg split -r 'desc(A0)' -d "0 0" << EOF |
|
138 > y |
|
139 > y |
|
140 > n |
|
141 > n |
|
142 > y |
|
143 > y |
|
144 > EOF |
|
145 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
146 adding a |
|
147 adding b |
|
148 diff --git a/a b/a |
|
149 new file mode 100644 |
|
150 examine changes to 'a'? [Ynesfdaq?] y |
|
151 |
|
152 @@ -0,0 +1,1 @@ |
|
153 +42 |
|
154 record change 1/2 to 'a'? [Ynesfdaq?] y |
|
155 |
|
156 diff --git a/b b/b |
|
157 new file mode 100644 |
|
158 examine changes to 'b'? [Ynesfdaq?] n |
|
159 |
|
160 created new head |
|
161 Done splitting? [yN] n |
|
162 diff --git a/b b/b |
|
163 new file mode 100644 |
|
164 examine changes to 'b'? [Ynesfdaq?] y |
|
165 |
|
166 @@ -0,0 +1,1 @@ |
|
167 +43 |
|
168 record this change to 'b'? [Ynesfdaq?] y |
|
169 |
|
170 no more change to split |
|
171 |
|
172 $ hg log --hidden -G |
|
173 @ changeset: 3:f257fde29c7a |
|
174 | tag: tip |
|
175 | user: test |
|
176 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
177 | summary: A0 |
|
178 | |
|
179 o changeset: 2:337fec4d2edc |
|
180 | parent: 0:ea207398892e |
|
181 | user: test |
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | summary: A0 |
|
184 | |
|
185 | x changeset: 1:471597cad322 |
|
186 |/ user: test |
|
187 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
188 | summary: A0 |
|
189 | |
|
190 o changeset: 0:ea207398892e |
|
191 user: test |
|
192 date: Thu Jan 01 00:00:00 1970 +0000 |
|
193 summary: ROOT |
|
194 |
|
195 Actual test |
|
196 ----------- |
|
197 |
|
198 $ hg update 471597cad322 |
|
199 abort: hidden revision '471597cad322'! |
|
200 (use --hidden to access hidden revisions; successors: 337fec4d2edc, f257fde29c7a) |
|
201 [255] |
|
202 $ hg update --hidden 'min(desc(A0))' |
|
203 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
204 working directory parent is obsolete! (471597cad322) |
|
205 (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a) |
|
206 |
|
207 Test output with lots of splitted commit |
|
208 ======================================== |
|
209 |
|
210 Test setup |
|
211 ---------- |
|
212 |
|
213 $ hg init $TESTTMP/local-lots-split |
|
214 $ cd $TESTTMP/local-lots-split |
|
215 $ mkcommit ROOT |
|
216 $ echo 42 >> a |
|
217 $ echo 43 >> b |
|
218 $ echo 44 >> c |
|
219 $ echo 45 >> d |
|
220 $ hg commit -A -m "A0" |
|
221 adding a |
|
222 adding b |
|
223 adding c |
|
224 adding d |
|
225 $ hg log --hidden -G |
|
226 @ changeset: 1:de7290d8b885 |
|
227 | tag: tip |
|
228 | user: test |
|
229 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
230 | summary: A0 |
|
231 | |
|
232 o changeset: 0:ea207398892e |
|
233 user: test |
|
234 date: Thu Jan 01 00:00:00 1970 +0000 |
|
235 summary: ROOT |
|
236 |
|
237 |
|
238 $ hg split -r 'desc(A0)' -d "0 0" << EOF |
|
239 > y |
|
240 > y |
|
241 > n |
|
242 > n |
|
243 > n |
|
244 > n |
|
245 > y |
|
246 > y |
|
247 > n |
|
248 > n |
|
249 > n |
|
250 > y |
|
251 > y |
|
252 > n |
|
253 > n |
|
254 > y |
|
255 > y |
|
256 > EOF |
|
257 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
258 adding a |
|
259 adding b |
|
260 adding c |
|
261 adding d |
|
262 diff --git a/a b/a |
|
263 new file mode 100644 |
|
264 examine changes to 'a'? [Ynesfdaq?] y |
|
265 |
|
266 @@ -0,0 +1,1 @@ |
|
267 +42 |
|
268 record change 1/4 to 'a'? [Ynesfdaq?] y |
|
269 |
|
270 diff --git a/b b/b |
|
271 new file mode 100644 |
|
272 examine changes to 'b'? [Ynesfdaq?] n |
|
273 |
|
274 diff --git a/c b/c |
|
275 new file mode 100644 |
|
276 examine changes to 'c'? [Ynesfdaq?] n |
|
277 |
|
278 diff --git a/d b/d |
|
279 new file mode 100644 |
|
280 examine changes to 'd'? [Ynesfdaq?] n |
|
281 |
|
282 created new head |
|
283 Done splitting? [yN] n |
|
284 diff --git a/b b/b |
|
285 new file mode 100644 |
|
286 examine changes to 'b'? [Ynesfdaq?] y |
|
287 |
|
288 @@ -0,0 +1,1 @@ |
|
289 +43 |
|
290 record change 1/3 to 'b'? [Ynesfdaq?] y |
|
291 |
|
292 diff --git a/c b/c |
|
293 new file mode 100644 |
|
294 examine changes to 'c'? [Ynesfdaq?] n |
|
295 |
|
296 diff --git a/d b/d |
|
297 new file mode 100644 |
|
298 examine changes to 'd'? [Ynesfdaq?] n |
|
299 |
|
300 Done splitting? [yN] n |
|
301 diff --git a/c b/c |
|
302 new file mode 100644 |
|
303 examine changes to 'c'? [Ynesfdaq?] y |
|
304 |
|
305 @@ -0,0 +1,1 @@ |
|
306 +44 |
|
307 record change 1/2 to 'c'? [Ynesfdaq?] y |
|
308 |
|
309 diff --git a/d b/d |
|
310 new file mode 100644 |
|
311 examine changes to 'd'? [Ynesfdaq?] n |
|
312 |
|
313 Done splitting? [yN] n |
|
314 diff --git a/d b/d |
|
315 new file mode 100644 |
|
316 examine changes to 'd'? [Ynesfdaq?] y |
|
317 |
|
318 @@ -0,0 +1,1 @@ |
|
319 +45 |
|
320 record this change to 'd'? [Ynesfdaq?] y |
|
321 |
|
322 no more change to split |
|
323 |
|
324 $ hg log --hidden -G |
|
325 @ changeset: 5:c7f044602e9b |
|
326 | tag: tip |
|
327 | user: test |
|
328 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
329 | summary: A0 |
|
330 | |
|
331 o changeset: 4:1ae8bc733a14 |
|
332 | user: test |
|
333 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
334 | summary: A0 |
|
335 | |
|
336 o changeset: 3:f257fde29c7a |
|
337 | user: test |
|
338 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
339 | summary: A0 |
|
340 | |
|
341 o changeset: 2:337fec4d2edc |
|
342 | parent: 0:ea207398892e |
|
343 | user: test |
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
345 | summary: A0 |
|
346 | |
|
347 | x changeset: 1:de7290d8b885 |
|
348 |/ user: test |
|
349 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
350 | summary: A0 |
|
351 | |
|
352 o changeset: 0:ea207398892e |
|
353 user: test |
|
354 date: Thu Jan 01 00:00:00 1970 +0000 |
|
355 summary: ROOT |
|
356 |
|
357 Actual test |
|
358 ----------- |
|
359 |
|
360 $ hg update de7290d8b885 |
|
361 abort: hidden revision 'de7290d8b885'! |
|
362 (use --hidden to access hidden revisions; successors: 337fec4d2edc, f257fde29c7a and 2 more) |
|
363 [255] |
|
364 $ hg update --hidden 'min(desc(A0))' |
|
365 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
366 working directory parent is obsolete! (de7290d8b885) |
|
367 (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more) |
|
368 |
|
369 Test output with folded commit |
|
370 ============================== |
|
371 |
|
372 Test setup |
|
373 ---------- |
|
374 |
|
375 $ hg init $TESTTMP/local-fold |
|
376 $ cd $TESTTMP/local-fold |
|
377 $ mkcommit ROOT |
|
378 $ mkcommit A0 |
|
379 $ mkcommit B0 |
|
380 $ hg log --hidden -G |
|
381 @ changeset: 2:0dec01379d3b |
|
382 | tag: tip |
|
383 | user: test |
|
384 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
385 | summary: B0 |
|
386 | |
|
387 o changeset: 1:471f378eab4c |
|
388 | user: test |
|
389 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
390 | summary: A0 |
|
391 | |
|
392 o changeset: 0:ea207398892e |
|
393 user: test |
|
394 date: Thu Jan 01 00:00:00 1970 +0000 |
|
395 summary: ROOT |
|
396 |
|
397 $ hg fold --exact -r 'desc(A0) + desc(B0)' --date "0 0" -m "C0" |
|
398 2 changesets folded |
|
399 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 $ hg log --hidden -G |
|
401 @ changeset: 3:eb5a0daa2192 |
|
402 | tag: tip |
|
403 | parent: 0:ea207398892e |
|
404 | user: test |
|
405 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
406 | summary: C0 |
|
407 | |
|
408 | x changeset: 2:0dec01379d3b |
|
409 | | user: test |
|
410 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | | summary: B0 |
|
412 | | |
|
413 | x changeset: 1:471f378eab4c |
|
414 |/ user: test |
|
415 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
416 | summary: A0 |
|
417 | |
|
418 o changeset: 0:ea207398892e |
|
419 user: test |
|
420 date: Thu Jan 01 00:00:00 1970 +0000 |
|
421 summary: ROOT |
|
422 |
|
423 Actual test |
|
424 ----------- |
|
425 |
|
426 $ hg update 471f378eab4c |
|
427 abort: hidden revision '471f378eab4c'! |
|
428 (use --hidden to access hidden revisions; successor: eb5a0daa2192) |
|
429 [255] |
|
430 $ hg update --hidden 'desc(A0)' |
|
431 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
432 working directory parent is obsolete! (471f378eab4c) |
|
433 (use 'hg evolve' to update to its successor: eb5a0daa2192) |
|
434 $ hg update 0dec01379d3b |
|
435 working directory parent is obsolete! (471f378eab4c) |
|
436 (use 'hg evolve' to update to its successor: eb5a0daa2192) |
|
437 abort: hidden revision '0dec01379d3b'! |
|
438 (use --hidden to access hidden revisions; successor: eb5a0daa2192) |
|
439 [255] |
|
440 $ hg update --hidden 'desc(B0)' |
|
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 working directory parent is obsolete! (0dec01379d3b) |
|
443 (use 'hg evolve' to update to its successor: eb5a0daa2192) |
|
444 |
|
445 Test output with divergence |
|
446 =========================== |
|
447 |
|
448 Test setup |
|
449 ---------- |
|
450 |
|
451 $ hg init $TESTTMP/local-divergence |
|
452 $ cd $TESTTMP/local-divergence |
|
453 $ mkcommit ROOT |
|
454 $ mkcommit A0 |
|
455 $ hg amend -m "A1" |
|
456 $ hg log --hidden -G |
|
457 @ changeset: 2:fdf9bde5129a |
|
458 | tag: tip |
|
459 | parent: 0:ea207398892e |
|
460 | user: test |
|
461 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
462 | summary: A1 |
|
463 | |
|
464 | x changeset: 1:471f378eab4c |
|
465 |/ user: test |
|
466 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
467 | summary: A0 |
|
468 | |
|
469 o changeset: 0:ea207398892e |
|
470 user: test |
|
471 date: Thu Jan 01 00:00:00 1970 +0000 |
|
472 summary: ROOT |
|
473 |
|
474 $ hg update --hidden 'desc(A0)' |
|
475 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
476 working directory parent is obsolete! (471f378eab4c) |
|
477 (use 'hg evolve' to update to its successor: fdf9bde5129a) |
|
478 $ hg amend -m "A2" |
|
479 2 new divergent changesets |
|
480 $ hg log --hidden -G |
|
481 @ changeset: 3:65b757b745b9 |
|
482 | tag: tip |
|
483 | parent: 0:ea207398892e |
|
484 | user: test |
|
485 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
486 | trouble: divergent |
|
487 | summary: A2 |
|
488 | |
|
489 | o changeset: 2:fdf9bde5129a |
|
490 |/ parent: 0:ea207398892e |
|
491 | user: test |
|
492 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
493 | trouble: divergent |
|
494 | summary: A1 |
|
495 | |
|
496 | x changeset: 1:471f378eab4c |
|
497 |/ user: test |
|
498 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
499 | summary: A0 |
|
500 | |
|
501 o changeset: 0:ea207398892e |
|
502 user: test |
|
503 date: Thu Jan 01 00:00:00 1970 +0000 |
|
504 summary: ROOT |
|
505 |
|
506 Actual test |
|
507 ----------- |
|
508 |
|
509 $ hg update 471f378eab4c |
|
510 abort: hidden revision '471f378eab4c'! |
|
511 (use --hidden to access hidden revisions; diverged) |
|
512 [255] |
|
513 $ hg update --hidden 'desc(A0)' |
|
514 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
515 working directory parent is obsolete! (471f378eab4c) |
|
516 (471f378eab4c has diverged, use 'hg evolve -list --divergent' to resolve the issue) |