comparison tests/test-evolve-obshistory.t @ 3914:96945ea908df stable

branching: merge default into stable The stable branch of Mercurial core now contains Mercurial 4.7 so evolve branch policy requires this merge. The @ bookmark is in the right location, so people doing clone will get to the latest release.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 31 Jul 2018 12:52:06 +0200
parents 106c871dfebc
children d00f0c369bc7 ef22eef37ecc
comparison
equal deleted inserted replaced
3901:f2b8429db565 3914:96945ea908df
2 revisions. 2 revisions.
3 3
4 Global setup 4 Global setup
5 ============ 5 ============
6 6
7 $ . $TESTDIR/testlib/common.sh 7 $ . $TESTDIR/testlib/obshistory_setup.sh
8 $ cat >> $HGRCPATH <<EOF
9 > [ui]
10 > interactive = true
11 > [phases]
12 > publish=False
13 > [extensions]
14 > evolve =
15 > [experimental]
16 > evolution.effect-flags = yes
17 > EOF
18 8
19 Test simple common cases 9 Test simple common cases
20 ======================== 10 ========================
21 11
22 Test setup 12 Test setup
30 @ 000000000000 (-1) 20 @ 000000000000 (-1)
31 21
32 $ hg obslog 'wdir()' 22 $ hg obslog 'wdir()'
33 abort: working directory revision cannot be specified 23 abort: working directory revision cannot be specified
34 [255] 24 [255]
35
36 Test output on amended commit
37 =============================
38
39 Test setup
40 ----------
41
42 $ hg init $TESTTMP/local-amend
43 $ cd $TESTTMP/local-amend
44 $ mkcommit ROOT
45 $ mkcommit A0
46 $ echo 42 >> A0
47 $ hg amend -m "A1
48 >
49 > Better commit message"
50 $ hg log --hidden -G
51 @ changeset: 2:4ae3a4151de9
52 | tag: tip
53 | parent: 0:ea207398892e
54 | user: test
55 | date: Thu Jan 01 00:00:00 1970 +0000
56 | summary: A1
57 |
58 | x changeset: 1:471f378eab4c
59 |/ user: test
60 | date: Thu Jan 01 00:00:00 1970 +0000
61 | obsolete: rewritten using amend as 2:4ae3a4151de9
62 | summary: A0
63 |
64 o changeset: 0:ea207398892e
65 user: test
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: ROOT
68
69 Actual test
70 -----------
71 $ hg obslog --patch 4ae3a4151de9
72 @ 4ae3a4151de9 (2) A1
73 |
74 x 471f378eab4c (1) A0
75 rewritten(description, content) as 4ae3a4151de9 using amend by test (*) (glob)
76 diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description
77 --- a/changeset-description
78 +++ b/changeset-description
79 @@ -1,1 +1,3 @@
80 -A0
81 +A1
82 +
83 +Better commit message
84
85 diff -r 471f378eab4c -r 4ae3a4151de9 A0
86 --- a/A0 Thu Jan 01 00:00:00 1970 +0000
87 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000
88 @@ -1,1 +1,2 @@
89 A0
90 +42
91
92
93 $ hg obslog --patch --color debug
94 @ [evolve.node|4ae3a4151de9] [evolve.rev|(2)] [evolve.short_description|A1]
95 |
96 x [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
97 [evolve.verb|rewritten](description, content) as [evolve.node|4ae3a4151de9] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
98 [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description]
99 [diff.file_a|--- a/changeset-description]
100 [diff.file_b|+++ b/changeset-description]
101 [diff.hunk|@@ -1,1 +1,3 @@]
102 [diff.deleted|-A0]
103 [diff.inserted|+A1]
104 [diff.inserted|+]
105 [diff.inserted|+Better commit message]
106
107 [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 A0]
108 [diff.file_a|--- a/A0 Thu Jan 01 00:00:00 1970 +0000]
109 [diff.file_b|+++ b/A0 Thu Jan 01 00:00:00 1970 +0000]
110 [diff.hunk|@@ -1,1 +1,2 @@]
111 A0
112 [diff.inserted|+42]
113
114
115
116 $ hg obslog --no-graph --patch 4ae3a4151de9
117 4ae3a4151de9 (2) A1
118 471f378eab4c (1) A0
119 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
120 diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description
121 --- a/changeset-description
122 +++ b/changeset-description
123 @@ -1,1 +1,3 @@
124 -A0
125 +A1
126 +
127 +Better commit message
128
129 diff -r 471f378eab4c -r 4ae3a4151de9 A0
130 --- a/A0 Thu Jan 01 00:00:00 1970 +0000
131 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000
132 @@ -1,1 +1,2 @@
133 A0
134 +42
135
136
137 $ hg obslog 4ae3a4151de9 --graph -T'{label("log.summary", shortdescription)} {if(markers, join(markers % "at {date|hgdate} by {user|person} ", " also "))}'
138 @ A1
139 |
140 x A0 at 0 0 by test
141
142 $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
143 [
144 {
145 "markers": [],
146 "node": "4ae3a4151de9",
147 "rev": 2,
148 "shortdescription": "A1"
149 },
150 {
151 "markers": [
152 {
153 "date": [
154 *, (glob)
155 0 (glob)
156 ],
157 "effect": [
158 "description",
159 "content"
160 ],
161 "operation": "amend",
162 "succnodes": [
163 "4ae3a4151de9"
164 ],
165 "user": "test",
166 "verb": "rewritten"
167 }
168 ],
169 "node": "471f378eab4c",
170 "rev": 1,
171 "shortdescription": "A0"
172 }
173 ]
174 $ hg obslog --hidden --patch 471f378eab4c
175 x 471f378eab4c (1) A0
176 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
177 diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description
178 --- a/changeset-description
179 +++ b/changeset-description
180 @@ -1,1 +1,3 @@
181 -A0
182 +A1
183 +
184 +Better commit message
185
186 diff -r 471f378eab4c -r 4ae3a4151de9 A0
187 --- a/A0 Thu Jan 01 00:00:00 1970 +0000
188 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000
189 @@ -1,1 +1,2 @@
190 A0
191 +42
192
193
194 $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
195 [
196 {
197 "markers": [
198 {
199 "date": [
200 *, (glob)
201 0 (glob)
202 ],
203 "effect": [
204 *, (glob)
205 "content"
206 ],
207 "operation": "amend",
208 "succnodes": [
209 "4ae3a4151de9"
210 ],
211 "user": "test",
212 "verb": "rewritten"
213 }
214 ],
215 "node": "471f378eab4c",
216 "rev": 1,
217 "shortdescription": "A0"
218 }
219 ]
220 $ hg update 471f378eab4c
221 abort: hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9!
222 (use --hidden to access hidden revisions)
223 [255]
224 $ hg update --hidden "desc(A0)"
225 updating to a hidden changeset 471f378eab4c
226 (hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9)
227 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 working directory parent is obsolete! (471f378eab4c)
229 (use 'hg evolve' to update to its successor: 4ae3a4151de9)
230
231 Test output with pruned commit
232 ==============================
233
234 Test setup
235 ----------
236
237 $ hg init $TESTTMP/local-prune
238 $ cd $TESTTMP/local-prune
239 $ mkcommit ROOT
240 $ mkcommit A0 # 0
241 $ mkcommit B0 # 1
242 $ hg log --hidden -G
243 @ changeset: 2:0dec01379d3b
244 | tag: tip
245 | user: test
246 | date: Thu Jan 01 00:00:00 1970 +0000
247 | summary: B0
248 |
249 o changeset: 1:471f378eab4c
250 | user: test
251 | date: Thu Jan 01 00:00:00 1970 +0000
252 | summary: A0
253 |
254 o changeset: 0:ea207398892e
255 user: test
256 date: Thu Jan 01 00:00:00 1970 +0000
257 summary: ROOT
258
259 $ hg prune -r 'desc(B0)'
260 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
261 working directory now at 471f378eab4c
262 1 changesets pruned
263 $ hg log --hidden -G
264 x changeset: 2:0dec01379d3b
265 | tag: tip
266 | user: test
267 | date: Thu Jan 01 00:00:00 1970 +0000
268 | obsolete: pruned using prune
269 | summary: B0
270 |
271 @ changeset: 1:471f378eab4c
272 | user: test
273 | date: Thu Jan 01 00:00:00 1970 +0000
274 | summary: A0
275 |
276 o changeset: 0:ea207398892e
277 user: test
278 date: Thu Jan 01 00:00:00 1970 +0000
279 summary: ROOT
280
281
282 Actual test
283 -----------
284
285 $ hg obslog 'desc(B0)' --hidden --patch
286 x 0dec01379d3b (2) B0
287 pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000)
288 (No patch available, no successors)
289
290 $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
291 [
292 {
293 "markers": [
294 {
295 "date": [
296 *, (glob)
297 0 (glob)
298 ],
299 "operation": "prune",
300 "user": "test",
301 "verb": "pruned"
302 }
303 ],
304 "node": "0dec01379d3b",
305 "rev": 2,
306 "shortdescription": "B0"
307 }
308 ]
309 $ hg obslog 'desc(A0)' --patch
310 @ 471f378eab4c (1) A0
311
312 $ hg obslog 'desc(A0)' --no-graph -Tjson | python -m json.tool
313 [
314 {
315 "markers": [],
316 "node": "471f378eab4c",
317 "rev": 1,
318 "shortdescription": "A0"
319 }
320 ]
321 $ hg up 1
322 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
323 $ hg up 0dec01379d3b
324 abort: hidden revision '0dec01379d3b' is pruned!
325 (use --hidden to access hidden revisions)
326 [255]
327 $ hg up --hidden -r 'desc(B0)'
328 updating to a hidden changeset 0dec01379d3b
329 (hidden revision '0dec01379d3b' is pruned)
330 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
331 working directory parent is obsolete! (0dec01379d3b)
332 (use 'hg evolve' to update to its parent successor)
333
334 Test output with splitted commit
335 ================================
336
337 Test setup
338 ----------
339
340 $ hg init $TESTTMP/local-split
341 $ cd $TESTTMP/local-split
342 $ mkcommit ROOT
343 $ echo 42 >> a
344 $ echo 43 >> b
345 $ hg commit -A -m "A0"
346 adding a
347 adding b
348 $ hg log --hidden -G
349 @ changeset: 1:471597cad322
350 | tag: tip
351 | user: test
352 | date: Thu Jan 01 00:00:00 1970 +0000
353 | summary: A0
354 |
355 o changeset: 0:ea207398892e
356 user: test
357 date: Thu Jan 01 00:00:00 1970 +0000
358 summary: ROOT
359
360 $ hg split -r 'desc(A0)' -n "testing split" -d "0 0" << EOF
361 > y
362 > y
363 > n
364 > n
365 > y
366 > y
367 > EOF
368 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
369 adding a
370 adding b
371 diff --git a/a b/a
372 new file mode 100644
373 examine changes to 'a'? [Ynesfdaq?] y
374
375 @@ -0,0 +1,1 @@
376 +42
377 record change 1/2 to 'a'? [Ynesfdaq?] y
378
379 diff --git a/b b/b
380 new file mode 100644
381 examine changes to 'b'? [Ynesfdaq?] n
382
383 created new head
384 Done splitting? [yN] n
385 diff --git a/b b/b
386 new file mode 100644
387 examine changes to 'b'? [Ynesfdaq?] y
388
389 @@ -0,0 +1,1 @@
390 +43
391 record this change to 'b'? [Ynesfdaq?] y
392
393 no more change to split
394
395 $ hg log --hidden -G
396 @ changeset: 3:f257fde29c7a
397 | tag: tip
398 | user: test
399 | date: Thu Jan 01 00:00:00 1970 +0000
400 | summary: A0
401 |
402 o changeset: 2:337fec4d2edc
403 | parent: 0:ea207398892e
404 | user: test
405 | date: Thu Jan 01 00:00:00 1970 +0000
406 | summary: A0
407 |
408 | x changeset: 1:471597cad322
409 |/ user: test
410 | date: Thu Jan 01 00:00:00 1970 +0000
411 | obsolete: split using split as 2:337fec4d2edc, 3:f257fde29c7a
412 | summary: A0
413 |
414 o changeset: 0:ea207398892e
415 user: test
416 date: Thu Jan 01 00:00:00 1970 +0000
417 summary: ROOT
418
419 Actual test
420 -----------
421
422 Check that debugobshistory on splitted commit show both targets
423 $ hg obslog 471597cad322 --hidden --patch
424 x 471597cad322 (1) A0
425 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
426 note: testing split
427 (No patch available, too many successors (2))
428
429 $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
430 [
431 {
432 "markers": [
433 {
434 "date": [
435 *, (glob)
436 0 (glob)
437 ],
438 "effect": [
439 "parent",
440 "content"
441 ],
442 "note": "testing split",
443 "operation": "split",
444 "succnodes": [
445 "337fec4d2edc",
446 "f257fde29c7a"
447 ],
448 "user": "test",
449 "verb": "rewritten"
450 }
451 ],
452 "node": "471597cad322",
453 "rev": 1,
454 "shortdescription": "A0"
455 }
456 ]
457 Check that debugobshistory on the first successor after split show
458 the revision plus the splitted one
459 $ hg obslog 337fec4d2edc --patch
460 o 337fec4d2edc (2) A0
461 |
462 x 471597cad322 (1) A0
463 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
464 note: testing split
465 (No patch available, too many successors (2))
466
467 With the all option, it should show the three changesets
468 $ hg obslog --all 337fec4d2edc --patch
469 o 337fec4d2edc (2) A0
470 |
471 | @ f257fde29c7a (3) A0
472 |/
473 x 471597cad322 (1) A0
474 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
475 note: testing split
476 (No patch available, too many successors (2))
477
478 Check that debugobshistory on the second successor after split show
479 the revision plus the splitted one
480 $ hg obslog f257fde29c7a --patch
481 @ f257fde29c7a (3) A0
482 |
483 x 471597cad322 (1) A0
484 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
485 note: testing split
486 (No patch available, too many successors (2))
487
488 With the all option, it should show the three changesets
489 $ hg obslog f257fde29c7a --all --patch
490 o 337fec4d2edc (2) A0
491 |
492 | @ f257fde29c7a (3) A0
493 |/
494 x 471597cad322 (1) A0
495 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
496 note: testing split
497 (No patch available, too many successors (2))
498
499 Obslog with all option all should also works on the splitted commit
500 $ hg obslog -a 471597cad322 --hidden --patch
501 o 337fec4d2edc (2) A0
502 |
503 | @ f257fde29c7a (3) A0
504 |/
505 x 471597cad322 (1) A0
506 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
507 note: testing split
508 (No patch available, too many successors (2))
509
510 Check that debugobshistory on both successors after split show
511 a coherent graph
512 $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
513 o 337fec4d2edc (2) A0
514 |
515 | @ f257fde29c7a (3) A0
516 |/
517 x 471597cad322 (1) A0
518 rewritten(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
519 note: testing split
520 (No patch available, too many successors (2))
521
522 $ hg update 471597cad322
523 abort: hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a!
524 (use --hidden to access hidden revisions)
525 [255]
526 $ hg update --hidden 'min(desc(A0))'
527 updating to a hidden changeset 471597cad322
528 (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a)
529 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
530 working directory parent is obsolete! (471597cad322)
531 (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
532
533 Test output with lots of splitted commit
534 ========================================
535
536 Test setup
537 ----------
538
539 $ hg init $TESTTMP/local-lots-split
540 $ cd $TESTTMP/local-lots-split
541 $ mkcommit ROOT
542 $ echo 42 >> a
543 $ echo 43 >> b
544 $ echo 44 >> c
545 $ echo 45 >> d
546 $ hg commit -A -m "A0"
547 adding a
548 adding b
549 adding c
550 adding d
551 $ hg log --hidden -G
552 @ changeset: 1:de7290d8b885
553 | tag: tip
554 | user: test
555 | date: Thu Jan 01 00:00:00 1970 +0000
556 | summary: A0
557 |
558 o changeset: 0:ea207398892e
559 user: test
560 date: Thu Jan 01 00:00:00 1970 +0000
561 summary: ROOT
562
563
564 $ hg split -r 'desc(A0)' -d "0 0" << EOF
565 > y
566 > y
567 > n
568 > n
569 > n
570 > n
571 > y
572 > y
573 > n
574 > n
575 > n
576 > y
577 > y
578 > n
579 > n
580 > y
581 > y
582 > EOF
583 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
584 adding a
585 adding b
586 adding c
587 adding d
588 diff --git a/a b/a
589 new file mode 100644
590 examine changes to 'a'? [Ynesfdaq?] y
591
592 @@ -0,0 +1,1 @@
593 +42
594 record change 1/4 to 'a'? [Ynesfdaq?] y
595
596 diff --git a/b b/b
597 new file mode 100644
598 examine changes to 'b'? [Ynesfdaq?] n
599
600 diff --git a/c b/c
601 new file mode 100644
602 examine changes to 'c'? [Ynesfdaq?] n
603
604 diff --git a/d b/d
605 new file mode 100644
606 examine changes to 'd'? [Ynesfdaq?] n
607
608 created new head
609 Done splitting? [yN] n
610 diff --git a/b b/b
611 new file mode 100644
612 examine changes to 'b'? [Ynesfdaq?] y
613
614 @@ -0,0 +1,1 @@
615 +43
616 record change 1/3 to 'b'? [Ynesfdaq?] y
617
618 diff --git a/c b/c
619 new file mode 100644
620 examine changes to 'c'? [Ynesfdaq?] n
621
622 diff --git a/d b/d
623 new file mode 100644
624 examine changes to 'd'? [Ynesfdaq?] n
625
626 Done splitting? [yN] n
627 diff --git a/c b/c
628 new file mode 100644
629 examine changes to 'c'? [Ynesfdaq?] y
630
631 @@ -0,0 +1,1 @@
632 +44
633 record change 1/2 to 'c'? [Ynesfdaq?] y
634
635 diff --git a/d b/d
636 new file mode 100644
637 examine changes to 'd'? [Ynesfdaq?] n
638
639 Done splitting? [yN] n
640 diff --git a/d b/d
641 new file mode 100644
642 examine changes to 'd'? [Ynesfdaq?] y
643
644 @@ -0,0 +1,1 @@
645 +45
646 record this change to 'd'? [Ynesfdaq?] y
647
648 no more change to split
649
650 $ hg log --hidden -G
651 @ changeset: 5:c7f044602e9b
652 | tag: tip
653 | user: test
654 | date: Thu Jan 01 00:00:00 1970 +0000
655 | summary: A0
656 |
657 o changeset: 4:1ae8bc733a14
658 | user: test
659 | date: Thu Jan 01 00:00:00 1970 +0000
660 | summary: A0
661 |
662 o changeset: 3:f257fde29c7a
663 | user: test
664 | date: Thu Jan 01 00:00:00 1970 +0000
665 | summary: A0
666 |
667 o changeset: 2:337fec4d2edc
668 | parent: 0:ea207398892e
669 | user: test
670 | date: Thu Jan 01 00:00:00 1970 +0000
671 | summary: A0
672 |
673 | x changeset: 1:de7290d8b885
674 |/ user: test
675 | date: Thu Jan 01 00:00:00 1970 +0000
676 | obsolete: split using split as 2:337fec4d2edc, 3:f257fde29c7a, 4:1ae8bc733a14, 5:c7f044602e9b
677 | summary: A0
678 |
679 o changeset: 0:ea207398892e
680 user: test
681 date: Thu Jan 01 00:00:00 1970 +0000
682 summary: ROOT
683
684 Actual test
685 -----------
686
687 $ hg obslog de7290d8b885 --hidden --patch
688 x de7290d8b885 (1) A0
689 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
690 (No patch available, too many successors (4))
691
692 $ hg obslog de7290d8b885 --hidden --all --patch
693 o 1ae8bc733a14 (4) A0
694 |
695 | o 337fec4d2edc (2) A0
696 |/
697 | @ c7f044602e9b (5) A0
698 |/
699 | o f257fde29c7a (3) A0
700 |/
701 x de7290d8b885 (1) A0
702 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
703 (No patch available, too many successors (4))
704
705 $ hg obslog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
706 [
707 {
708 "markers": [
709 {
710 "date": [
711 *, (glob)
712 0 (glob)
713 ],
714 "effect": [
715 "parent",
716 "content"
717 ],
718 "operation": "split",
719 "succnodes": [
720 "1ae8bc733a14",
721 "337fec4d2edc",
722 "c7f044602e9b",
723 "f257fde29c7a"
724 ],
725 "user": "test",
726 "verb": "rewritten"
727 }
728 ],
729 "node": "de7290d8b885",
730 "rev": 1,
731 "shortdescription": "A0"
732 }
733 ]
734 $ hg obslog c7f044602e9b --patch
735 @ c7f044602e9b (5) A0
736 |
737 x de7290d8b885 (1) A0
738 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
739 (No patch available, too many successors (4))
740
741 $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool
742 [
743 {
744 "markers": [],
745 "node": "c7f044602e9b",
746 "rev": 5,
747 "shortdescription": "A0"
748 },
749 {
750 "markers": [
751 {
752 "date": [
753 *, (glob)
754 0 (glob)
755 ],
756 "effect": [
757 "parent",
758 "content"
759 ],
760 "operation": "split",
761 "succnodes": [
762 "1ae8bc733a14",
763 "337fec4d2edc",
764 "c7f044602e9b",
765 "f257fde29c7a"
766 ],
767 "user": "test",
768 "verb": "rewritten"
769 }
770 ],
771 "node": "de7290d8b885",
772 "rev": 1,
773 "shortdescription": "A0"
774 }
775 ]
776 Check that debugobshistory on all heads show a coherent graph
777 $ hg obslog 2::5 --patch
778 o 1ae8bc733a14 (4) A0
779 |
780 | o 337fec4d2edc (2) A0
781 |/
782 | @ c7f044602e9b (5) A0
783 |/
784 | o f257fde29c7a (3) A0
785 |/
786 x de7290d8b885 (1) A0
787 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
788 (No patch available, too many successors (4))
789
790 $ hg obslog 5 --all --patch
791 o 1ae8bc733a14 (4) A0
792 |
793 | o 337fec4d2edc (2) A0
794 |/
795 | @ c7f044602e9b (5) A0
796 |/
797 | o f257fde29c7a (3) A0
798 |/
799 x de7290d8b885 (1) A0
800 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
801 (No patch available, too many successors (4))
802
803 $ hg update de7290d8b885
804 abort: hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more!
805 (use --hidden to access hidden revisions)
806 [255]
807 $ hg update --hidden 'min(desc(A0))'
808 updating to a hidden changeset de7290d8b885
809 (hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more)
810 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
811 working directory parent is obsolete! (de7290d8b885)
812 (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more)
813
814 Test output with folded commit
815 ==============================
816
817 Test setup
818 ----------
819
820 $ hg init $TESTTMP/local-fold
821 $ cd $TESTTMP/local-fold
822 $ mkcommit ROOT
823 $ mkcommit A0
824 $ mkcommit B0
825 $ hg log --hidden -G
826 @ changeset: 2:0dec01379d3b
827 | tag: tip
828 | user: test
829 | date: Thu Jan 01 00:00:00 1970 +0000
830 | summary: B0
831 |
832 o changeset: 1:471f378eab4c
833 | user: test
834 | date: Thu Jan 01 00:00:00 1970 +0000
835 | summary: A0
836 |
837 o changeset: 0:ea207398892e
838 user: test
839 date: Thu Jan 01 00:00:00 1970 +0000
840 summary: ROOT
841
842 $ hg fold --exact -r 'desc(A0) + desc(B0)' --date "0 0" -m "C0"
843 2 changesets folded
844 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
845 $ hg log --hidden -G
846 @ changeset: 3:eb5a0daa2192
847 | tag: tip
848 | parent: 0:ea207398892e
849 | user: test
850 | date: Thu Jan 01 00:00:00 1970 +0000
851 | summary: C0
852 |
853 | x changeset: 2:0dec01379d3b
854 | | user: test
855 | | date: Thu Jan 01 00:00:00 1970 +0000
856 | | obsolete: rewritten using fold as 3:eb5a0daa2192
857 | | summary: B0
858 | |
859 | x changeset: 1:471f378eab4c
860 |/ user: test
861 | date: Thu Jan 01 00:00:00 1970 +0000
862 | obsolete: rewritten using fold as 3:eb5a0daa2192
863 | summary: A0
864 |
865 o changeset: 0:ea207398892e
866 user: test
867 date: Thu Jan 01 00:00:00 1970 +0000
868 summary: ROOT
869
870 Actual test
871 -----------
872
873 Check that debugobshistory on the first folded revision show only
874 the revision with the target
875 $ hg obslog --hidden 471f378eab4c --patch
876 x 471f378eab4c (1) A0
877 rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
878 diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
879 --- a/changeset-description
880 +++ b/changeset-description
881 @@ -1,1 +1,1 @@
882 -A0
883 +C0
884
885 diff -r 471f378eab4c -r eb5a0daa2192 B0
886 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
887 +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
888 @@ -0,0 +1,1 @@
889 +B0
890
891
892 Check that with all option, all changesets are shown
893 $ hg obslog --hidden --all 471f378eab4c --patch
894 @ eb5a0daa2192 (3) C0
895 |\
896 x | 0dec01379d3b (2) B0
897 / rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
898 | (No patch available, changesets rebased)
899 |
900 x 471f378eab4c (1) A0
901 rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
902 diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
903 --- a/changeset-description
904 +++ b/changeset-description
905 @@ -1,1 +1,1 @@
906 -A0
907 +C0
908
909 diff -r 471f378eab4c -r eb5a0daa2192 B0
910 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
911 +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
912 @@ -0,0 +1,1 @@
913 +B0
914
915
916 Check that debugobshistory on the second folded revision show only
917 the revision with the target
918 $ hg obslog --hidden 0dec01379d3b --patch
919 x 0dec01379d3b (2) B0
920 rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
921 (No patch available, changesets rebased)
922
923 Check that with all option, all changesets are shown
924 $ hg obslog --hidden --all 0dec01379d3b --patch
925 @ eb5a0daa2192 (3) C0
926 |\
927 x | 0dec01379d3b (2) B0
928 / rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
929 | (No patch available, changesets rebased)
930 |
931 x 471f378eab4c (1) A0
932 rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
933 diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
934 --- a/changeset-description
935 +++ b/changeset-description
936 @@ -1,1 +1,1 @@
937 -A0
938 +C0
939
940 diff -r 471f378eab4c -r eb5a0daa2192 B0
941 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
942 +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
943 @@ -0,0 +1,1 @@
944 +B0
945
946
947 Check that debugobshistory on the successor revision show a coherent
948 graph
949 $ hg obslog eb5a0daa2192 --patch
950 @ eb5a0daa2192 (3) C0
951 |\
952 x | 0dec01379d3b (2) B0
953 / rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
954 | (No patch available, changesets rebased)
955 |
956 x 471f378eab4c (1) A0
957 rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
958 diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
959 --- a/changeset-description
960 +++ b/changeset-description
961 @@ -1,1 +1,1 @@
962 -A0
963 +C0
964
965 diff -r 471f378eab4c -r eb5a0daa2192 B0
966 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
967 +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
968 @@ -0,0 +1,1 @@
969 +B0
970
971
972 $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
973 [
974 {
975 "markers": [],
976 "node": "eb5a0daa2192",
977 "rev": 3,
978 "shortdescription": "C0"
979 },
980 {
981 "markers": [
982 {
983 "date": [
984 *, (glob)
985 0 (glob)
986 ],
987 "effect": [
988 "description",
989 "content"
990 ],
991 "operation": "fold",
992 "succnodes": [
993 "eb5a0daa2192"
994 ],
995 "user": "test",
996 "verb": "rewritten"
997 }
998 ],
999 "node": "471f378eab4c",
1000 "rev": 1,
1001 "shortdescription": "A0"
1002 },
1003 {
1004 "markers": [
1005 {
1006 "date": [
1007 *, (glob)
1008 0 (glob)
1009 ],
1010 "effect": [
1011 "description",
1012 "parent",
1013 "content"
1014 ],
1015 "operation": "fold",
1016 "succnodes": [
1017 "eb5a0daa2192"
1018 ],
1019 "user": "test",
1020 "verb": "rewritten"
1021 }
1022 ],
1023 "node": "0dec01379d3b",
1024 "rev": 2,
1025 "shortdescription": "B0"
1026 }
1027 ]
1028 $ hg update 471f378eab4c
1029 abort: hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192!
1030 (use --hidden to access hidden revisions)
1031 [255]
1032 $ hg update --hidden 'desc(A0)'
1033 updating to a hidden changeset 471f378eab4c
1034 (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
1035 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1036 working directory parent is obsolete! (471f378eab4c)
1037 (use 'hg evolve' to update to its successor: eb5a0daa2192)
1038 $ hg update 0dec01379d3b
1039 abort: hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192!
1040 (use --hidden to access hidden revisions)
1041 [255]
1042 $ hg update --hidden 'desc(B0)'
1043 updating to a hidden changeset 0dec01379d3b
1044 (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
1045 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1046 working directory parent is obsolete! (0dec01379d3b)
1047 (use 'hg evolve' to update to its successor: eb5a0daa2192)
1048
1049 Test output with divergence
1050 ===========================
1051
1052 Test setup
1053 ----------
1054
1055 $ hg init $TESTTMP/local-divergence
1056 $ cd $TESTTMP/local-divergence
1057 $ mkcommit ROOT
1058 $ mkcommit A0
1059 $ hg amend -m "A1"
1060 $ hg log --hidden -G
1061 @ changeset: 2:fdf9bde5129a
1062 | tag: tip
1063 | parent: 0:ea207398892e
1064 | user: test
1065 | date: Thu Jan 01 00:00:00 1970 +0000
1066 | summary: A1
1067 |
1068 | x changeset: 1:471f378eab4c
1069 |/ user: test
1070 | date: Thu Jan 01 00:00:00 1970 +0000
1071 | obsolete: reworded using amend as 2:fdf9bde5129a
1072 | summary: A0
1073 |
1074 o changeset: 0:ea207398892e
1075 user: test
1076 date: Thu Jan 01 00:00:00 1970 +0000
1077 summary: ROOT
1078
1079 $ hg update --hidden 'desc(A0)'
1080 updating to a hidden changeset 471f378eab4c
1081 (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a)
1082 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1083 working directory parent is obsolete! (471f378eab4c)
1084 (use 'hg evolve' to update to its successor: fdf9bde5129a)
1085 $ hg amend -m "A2"
1086 2 new content-divergent changesets
1087 $ hg log --hidden -G
1088 @ changeset: 3:65b757b745b9
1089 | tag: tip
1090 | parent: 0:ea207398892e
1091 | user: test
1092 | date: Thu Jan 01 00:00:00 1970 +0000
1093 | instability: content-divergent
1094 | summary: A2
1095 |
1096 | * changeset: 2:fdf9bde5129a
1097 |/ parent: 0:ea207398892e
1098 | user: test
1099 | date: Thu Jan 01 00:00:00 1970 +0000
1100 | instability: content-divergent
1101 | summary: A1
1102 |
1103 | x changeset: 1:471f378eab4c
1104 |/ user: test
1105 | date: Thu Jan 01 00:00:00 1970 +0000
1106 | obsolete: reworded using amend as 2:fdf9bde5129a
1107 | obsolete: reworded using amend as 3:65b757b745b9
1108 | summary: A0
1109 |
1110 o changeset: 0:ea207398892e
1111 user: test
1112 date: Thu Jan 01 00:00:00 1970 +0000
1113 summary: ROOT
1114
1115 Actual test
1116 -----------
1117
1118 Check that debugobshistory on the divergent revision show both destinations
1119 $ hg obslog --hidden 471f378eab4c --patch
1120 x 471f378eab4c (1) A0
1121 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1122 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1123 --- a/changeset-description
1124 +++ b/changeset-description
1125 @@ -1,1 +1,1 @@
1126 -A0
1127 +A2
1128
1129 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1130 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1131 --- a/changeset-description
1132 +++ b/changeset-description
1133 @@ -1,1 +1,1 @@
1134 -A0
1135 +A1
1136
1137
1138
1139 Check that with all option, every changeset is shown
1140 $ hg obslog --hidden --all 471f378eab4c --patch
1141 @ 65b757b745b9 (3) A2
1142 |
1143 | * fdf9bde5129a (2) A1
1144 |/
1145 x 471f378eab4c (1) A0
1146 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1147 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1148 --- a/changeset-description
1149 +++ b/changeset-description
1150 @@ -1,1 +1,1 @@
1151 -A0
1152 +A2
1153
1154 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1155 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1156 --- a/changeset-description
1157 +++ b/changeset-description
1158 @@ -1,1 +1,1 @@
1159 -A0
1160 +A1
1161
1162
1163 $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
1164 [
1165 {
1166 "markers": [
1167 {
1168 "date": [
1169 *, (glob)
1170 0 (glob)
1171 ],
1172 "effect": [
1173 "description"
1174 ],
1175 "operation": "amend",
1176 "succnodes": [
1177 "65b757b745b9"
1178 ],
1179 "user": "test",
1180 "verb": "rewritten"
1181 },
1182 {
1183 "date": [
1184 *, (glob)
1185 0 (glob)
1186 ],
1187 "effect": [
1188 "description"
1189 ],
1190 "operation": "amend",
1191 "succnodes": [
1192 "fdf9bde5129a"
1193 ],
1194 "user": "test",
1195 "verb": "rewritten"
1196 }
1197 ],
1198 "node": "471f378eab4c",
1199 "rev": 1,
1200 "shortdescription": "A0"
1201 }
1202 ]
1203 Check that debugobshistory on the first diverged revision show the revision
1204 and the diverent one
1205 $ hg obslog fdf9bde5129a --patch
1206 * fdf9bde5129a (2) A1
1207 |
1208 x 471f378eab4c (1) A0
1209 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1210 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1211 --- a/changeset-description
1212 +++ b/changeset-description
1213 @@ -1,1 +1,1 @@
1214 -A0
1215 +A2
1216
1217 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1218 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1219 --- a/changeset-description
1220 +++ b/changeset-description
1221 @@ -1,1 +1,1 @@
1222 -A0
1223 +A1
1224
1225
1226
1227 Check that all option show all of them
1228 $ hg obslog fdf9bde5129a -a --patch
1229 @ 65b757b745b9 (3) A2
1230 |
1231 | * fdf9bde5129a (2) A1
1232 |/
1233 x 471f378eab4c (1) A0
1234 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1235 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1236 --- a/changeset-description
1237 +++ b/changeset-description
1238 @@ -1,1 +1,1 @@
1239 -A0
1240 +A2
1241
1242 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1243 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1244 --- a/changeset-description
1245 +++ b/changeset-description
1246 @@ -1,1 +1,1 @@
1247 -A0
1248 +A1
1249
1250
1251 Check that debugobshistory on the second diverged revision show the revision
1252 and the diverent one
1253 $ hg obslog 65b757b745b9 --patch
1254 @ 65b757b745b9 (3) A2
1255 |
1256 x 471f378eab4c (1) A0
1257 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1258 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1259 --- a/changeset-description
1260 +++ b/changeset-description
1261 @@ -1,1 +1,1 @@
1262 -A0
1263 +A2
1264
1265 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1266 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1267 --- a/changeset-description
1268 +++ b/changeset-description
1269 @@ -1,1 +1,1 @@
1270 -A0
1271 +A1
1272
1273
1274 Check that all option show all of them
1275 $ hg obslog 65b757b745b9 -a --patch
1276 @ 65b757b745b9 (3) A2
1277 |
1278 | * fdf9bde5129a (2) A1
1279 |/
1280 x 471f378eab4c (1) A0
1281 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1282 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1283 --- a/changeset-description
1284 +++ b/changeset-description
1285 @@ -1,1 +1,1 @@
1286 -A0
1287 +A2
1288
1289 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1290 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1291 --- a/changeset-description
1292 +++ b/changeset-description
1293 @@ -1,1 +1,1 @@
1294 -A0
1295 +A1
1296
1297
1298 Check that debugobshistory on the both diverged revision show a coherent
1299 graph
1300 $ hg obslog '65b757b745b9+fdf9bde5129a' --patch
1301 @ 65b757b745b9 (3) A2
1302 |
1303 | * fdf9bde5129a (2) A1
1304 |/
1305 x 471f378eab4c (1) A0
1306 rewritten(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1307 diff -r 471f378eab4c -r 65b757b745b9 changeset-description
1308 --- a/changeset-description
1309 +++ b/changeset-description
1310 @@ -1,1 +1,1 @@
1311 -A0
1312 +A2
1313
1314 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1315 diff -r 471f378eab4c -r fdf9bde5129a changeset-description
1316 --- a/changeset-description
1317 +++ b/changeset-description
1318 @@ -1,1 +1,1 @@
1319 -A0
1320 +A1
1321
1322
1323 $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
1324 [
1325 {
1326 "markers": [],
1327 "node": "65b757b745b9",
1328 "rev": 3,
1329 "shortdescription": "A2"
1330 },
1331 {
1332 "markers": [
1333 {
1334 "date": [
1335 *, (glob)
1336 0 (glob)
1337 ],
1338 "effect": [
1339 "description"
1340 ],
1341 "operation": "amend",
1342 "succnodes": [
1343 "65b757b745b9"
1344 ],
1345 "user": "test",
1346 "verb": "rewritten"
1347 },
1348 {
1349 "date": [
1350 *, (glob)
1351 0 (glob)
1352 ],
1353 "effect": [
1354 "description"
1355 ],
1356 "operation": "amend",
1357 "succnodes": [
1358 "fdf9bde5129a"
1359 ],
1360 "user": "test",
1361 "verb": "rewritten"
1362 }
1363 ],
1364 "node": "471f378eab4c",
1365 "rev": 1,
1366 "shortdescription": "A0"
1367 },
1368 {
1369 "markers": [],
1370 "node": "fdf9bde5129a",
1371 "rev": 2,
1372 "shortdescription": "A1"
1373 }
1374 ]
1375 $ hg update 471f378eab4c
1376 abort: hidden revision '471f378eab4c' has diverged!
1377 (use --hidden to access hidden revisions)
1378 [255]
1379 $ hg update --hidden 'desc(A0)'
1380 updating to a hidden changeset 471f378eab4c
1381 (hidden revision '471f378eab4c' has diverged)
1382 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1383 working directory parent is obsolete! (471f378eab4c)
1384 (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
1385
1386 Test output with amended + folded commit
1387 ========================================
1388
1389 Test setup
1390 ----------
1391
1392 $ hg init $TESTTMP/local-amend-fold
1393 $ cd $TESTTMP/local-amend-fold
1394 $ mkcommit ROOT
1395 $ mkcommit A0
1396 $ mkcommit B0
1397 $ hg amend -m "B1"
1398 $ hg log --hidden -G
1399 @ changeset: 3:b7ea6d14e664
1400 | tag: tip
1401 | parent: 1:471f378eab4c
1402 | user: test
1403 | date: Thu Jan 01 00:00:00 1970 +0000
1404 | summary: B1
1405 |
1406 | x changeset: 2:0dec01379d3b
1407 |/ user: test
1408 | date: Thu Jan 01 00:00:00 1970 +0000
1409 | obsolete: reworded using amend as 3:b7ea6d14e664
1410 | summary: B0
1411 |
1412 o changeset: 1:471f378eab4c
1413 | user: test
1414 | date: Thu Jan 01 00:00:00 1970 +0000
1415 | summary: A0
1416 |
1417 o changeset: 0:ea207398892e
1418 user: test
1419 date: Thu Jan 01 00:00:00 1970 +0000
1420 summary: ROOT
1421
1422 $ hg fold --exact -r 'desc(A0) + desc(B1)' --date "0 0" -m "C0"
1423 2 changesets folded
1424 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1425 $ hg log --hidden -G
1426 @ changeset: 4:eb5a0daa2192
1427 | tag: tip
1428 | parent: 0:ea207398892e
1429 | user: test
1430 | date: Thu Jan 01 00:00:00 1970 +0000
1431 | summary: C0
1432 |
1433 | x changeset: 3:b7ea6d14e664
1434 | | parent: 1:471f378eab4c
1435 | | user: test
1436 | | date: Thu Jan 01 00:00:00 1970 +0000
1437 | | obsolete: rewritten using fold as 4:eb5a0daa2192
1438 | | summary: B1
1439 | |
1440 | | x changeset: 2:0dec01379d3b
1441 | |/ user: test
1442 | | date: Thu Jan 01 00:00:00 1970 +0000
1443 | | obsolete: reworded using amend as 3:b7ea6d14e664
1444 | | summary: B0
1445 | |
1446 | x changeset: 1:471f378eab4c
1447 |/ user: test
1448 | date: Thu Jan 01 00:00:00 1970 +0000
1449 | obsolete: rewritten using fold as 4:eb5a0daa2192
1450 | summary: A0
1451 |
1452 o changeset: 0:ea207398892e
1453 user: test
1454 date: Thu Jan 01 00:00:00 1970 +0000
1455 summary: ROOT
1456
1457 Actual test
1458 -----------
1459
1460 Check that debugobshistory on head show a coherent graph
1461 $ hg obslog eb5a0daa2192 --patch
1462 @ eb5a0daa2192 (4) C0
1463 |\
1464 x | 471f378eab4c (1) A0
1465 / rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
1466 | diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
1467 | --- a/changeset-description
1468 | +++ b/changeset-description
1469 | @@ -1,1 +1,1 @@
1470 | -A0
1471 | +C0
1472 |
1473 | diff -r 471f378eab4c -r eb5a0daa2192 B0
1474 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1475 | +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
1476 | @@ -0,0 +1,1 @@
1477 | +B0
1478 |
1479 |
1480 x b7ea6d14e664 (3) B1
1481 | rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
1482 | (No patch available, changesets rebased)
1483 |
1484 x 0dec01379d3b (2) B0
1485 rewritten(description) as b7ea6d14e664 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1486 diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
1487 --- a/changeset-description
1488 +++ b/changeset-description
1489 @@ -1,1 +1,1 @@
1490 -B0
1491 +B1
1492
1493
1494 Check that obslog on ROOT with all option show everything
1495 $ hg obslog 1 --hidden --all --patch
1496 @ eb5a0daa2192 (4) C0
1497 |\
1498 x | 471f378eab4c (1) A0
1499 / rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
1500 | diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
1501 | --- a/changeset-description
1502 | +++ b/changeset-description
1503 | @@ -1,1 +1,1 @@
1504 | -A0
1505 | +C0
1506 |
1507 | diff -r 471f378eab4c -r eb5a0daa2192 B0
1508 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1509 | +++ b/B0 Thu Jan 01 00:00:00 1970 +0000
1510 | @@ -0,0 +1,1 @@
1511 | +B0
1512 |
1513 |
1514 x b7ea6d14e664 (3) B1
1515 | rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
1516 | (No patch available, changesets rebased)
1517 |
1518 x 0dec01379d3b (2) B0
1519 rewritten(description) as b7ea6d14e664 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1520 diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
1521 --- a/changeset-description
1522 +++ b/changeset-description
1523 @@ -1,1 +1,1 @@
1524 -B0
1525 +B1
1526
1527
1528 $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
1529 [
1530 {
1531 "markers": [],
1532 "node": "eb5a0daa2192",
1533 "rev": 4,
1534 "shortdescription": "C0"
1535 },
1536 {
1537 "markers": [
1538 {
1539 "date": [
1540 *, (glob)
1541 0 (glob)
1542 ],
1543 "effect": [
1544 *, (glob)
1545 *, (glob)
1546 "content"
1547 ],
1548 "operation": "fold",
1549 "succnodes": [
1550 "eb5a0daa2192"
1551 ],
1552 "user": "test",
1553 "verb": "rewritten"
1554 }
1555 ],
1556 "node": "b7ea6d14e664",
1557 "rev": 3,
1558 "shortdescription": "B1"
1559 },
1560 {
1561 "markers": [
1562 {
1563 "date": [
1564 *, (glob)
1565 0 (glob)
1566 ],
1567 "effect": [
1568 "description"
1569 ],
1570 "operation": "amend",
1571 "succnodes": [
1572 "b7ea6d14e664"
1573 ],
1574 "user": "test",
1575 "verb": "rewritten"
1576 }
1577 ],
1578 "node": "0dec01379d3b",
1579 "rev": 2,
1580 "shortdescription": "B0"
1581 },
1582 {
1583 "markers": [
1584 {
1585 "date": [
1586 *, (glob)
1587 0 (glob)
1588 ],
1589 "effect": [
1590 "description",
1591 "content"
1592 ],
1593 "operation": "fold",
1594 "succnodes": [
1595 "eb5a0daa2192"
1596 ],
1597 "user": "test",
1598 "verb": "rewritten"
1599 }
1600 ],
1601 "node": "471f378eab4c",
1602 "rev": 1,
1603 "shortdescription": "A0"
1604 }
1605 ]
1606 $ hg update 471f378eab4c
1607 abort: hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192!
1608 (use --hidden to access hidden revisions)
1609 [255]
1610 $ hg update --hidden 'desc(A0)'
1611 updating to a hidden changeset 471f378eab4c
1612 (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
1613 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1614 working directory parent is obsolete! (471f378eab4c)
1615 (use 'hg evolve' to update to its successor: eb5a0daa2192)
1616 $ hg update --hidden 0dec01379d3b
1617 updating to a hidden changeset 0dec01379d3b
1618 (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
1619 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1620 working directory parent is obsolete! (0dec01379d3b)
1621 (use 'hg evolve' to update to its successor: eb5a0daa2192)
1622 $ hg update 0dec01379d3b
1623 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1624 $ hg update --hidden 'desc(B0)'
1625 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1626 25
1627 Test output with pushed and pulled obs markers 26 Test output with pushed and pulled obs markers
1628 ============================================== 27 ==============================================
1629 28
1630 Test setup 29 Test setup
1742 | 141 |
1743 @ 471f378eab4c (1) A0 142 @ 471f378eab4c (1) A0
1744 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) 143 rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
1745 (No patch available, successor is unknown locally) 144 (No patch available, successor is unknown locally)
1746 145
146
147 $ hg obslog 7a230b46bf61 --patch -f
148 o 7a230b46bf61 (2) A2
149 |
150 @ 471f378eab4c (1) A0
151 reworded(description) as 7a230b46bf61 using amend by test (at Thu Jan 01 00:00:00 1970 +0000)
152 diff -r 471f378eab4c -r 7a230b46bf61 changeset-description
153 --- a/changeset-description
154 +++ b/changeset-description
155 @@ -1,1 +1,1 @@
156 -A0
157 +A2
158
159
1747 $ hg obslog 7a230b46bf61 --color=debug --patch 160 $ hg obslog 7a230b46bf61 --color=debug --patch
1748 o [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2] 161 o [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
1749 | 162 |
1750 x [evolve.node evolve.missing_change_ctx|fdf9bde5129a] 163 x [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
1751 | [evolve.verb|rewritten](description) as [evolve.node|7a230b46bf61] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)] 164 | [evolve.verb|rewritten](description) as [evolve.node|7a230b46bf61] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]