comparison tests/test-evolve-content-divergent-relocation.t @ 5276:c834fdb87f90

tests: add more verification of output to divergence tests It's not obvious what the obsmarkers should look like in these tests and adding them highlights a bug that happens when commit we create to resolve the divergence doesn't get created because it would be empty. I also added a few graphlog calls to check that the divergence-resolution commit is in the right place (has right parentage).
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 01 May 2020 07:43:15 -0700
parents 417503ef667d
children 304de9a04172
comparison
equal deleted inserted replaced
5275:417503ef667d 5276:c834fdb87f90
99 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 99 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
100 +++ b/b Thu Jan 01 00:00:00 1970 +0000 100 +++ b/b Thu Jan 01 00:00:00 1970 +0000
101 @@ -0,0 +1,1 @@ 101 @@ -0,0 +1,1 @@
102 +bar 102 +bar
103 103
104 $ hg debugobsolete
105 b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
106 b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
107 da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
108 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
109 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
110 $ hg obslog --all
111 @ 171614c9a791 (8) added b
112 |\
113 x | 11f849d7159f (7) added b
114 | | amended(content) as 171614c9a791 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
115 | |
116 | x 7ed0642d644b (5) added b
117 | | rewritten as 171614c9a791 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
118 | |
119 x | da4b96f4a8d6 (6) added b
120 |/ rebased(parent) as 11f849d7159f using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
121 |
122 x b1661037fa25 (2) added b
123 amended(content) as 7ed0642d644b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
124 rebased(parent) as da4b96f4a8d6 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
125
126
104 Resolving orphans to get back to a normal graph 127 Resolving orphans to get back to a normal graph
105 128
106 $ hg evolve --all 129 $ hg evolve --all
107 move:[3] added c 130 move:[3] added c
108 atop:[8] added b 131 atop:[8] added b
197 | () [default] draft 220 | () [default] draft
198 o 1:c7586e2a9264 added a 221 o 1:c7586e2a9264 added a
199 | () [default] draft 222 | () [default] draft
200 o 0:8fa14d15e168 added hgignore 223 o 0:8fa14d15e168 added hgignore
201 () [default] draft 224 () [default] draft
225
226 $ hg debugobsolete
227 b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
228 b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
229 da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
230 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
231 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
232 ca1b80f7960aae2306287bab52b4090c59af8c29 917281f93fcbf255c034742f02bd31d8de88e94d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
233 c41c793e0ef1ddb463e85ea9491e377d01127ba2 4ae4427ee9f8f0935211fd66360948b77ab5aee9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
234 71a392c714b59ec54318a9fdc92c551a72a45790 1e1a50385a7d943eaab338376933b4fdef791d0c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'}
235 71a392c714b59ec54318a9fdc92c551a72a45790 1e4f6b3bb39b4ed75bdd8ae089b17b55bd074998 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
236 1e1a50385a7d943eaab338376933b4fdef791d0c 80cc9b1ec65032a21b4dbf53d6c408a2816823b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
237 1e4f6b3bb39b4ed75bdd8ae089b17b55bd074998 b006cf317e0ed16dbe786c439577475580f645f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'}
238 80cc9b1ec65032a21b4dbf53d6c408a2816823b0 b006cf317e0ed16dbe786c439577475580f645f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
239 $ hg obslog --all
240 @ b006cf317e0e (15) added foo to x
241 |\
242 x | 1e4f6b3bb39b (13) added x
243 | | rewritten(description, branch, content) as b006cf317e0e using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
244 | |
245 | x 80cc9b1ec650 (14) added foo to x
246 | | rewritten as b006cf317e0e using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
247 | |
248 | x 1e1a50385a7d (12) added foo to x
249 |/ rebased(parent) as 80cc9b1ec650 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
250 |
251 x 71a392c714b5 (11) added x
252 rewritten(description, branch, content) as 1e1a50385a7d using amend by test (Thu Jan 01 00:00:00 1970 +0000)
253 rebased(parent) as 1e4f6b3bb39b using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
254
202 255
203 Testing when both the content-divergence are on different parents and resolution 256 Testing when both the content-divergence are on different parents and resolution
204 will lead to conflicts 257 will lead to conflicts
205 --------------------------------------------------------------------------------- 258 ---------------------------------------------------------------------------------
206 259
499 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 552 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
500 +++ b/z Thu Jan 01 00:00:00 1970 +0000 553 +++ b/z Thu Jan 01 00:00:00 1970 +0000
501 @@ -0,0 +1,1 @@ 554 @@ -0,0 +1,1 @@
502 +bar 555 +bar
503 556
557 $ hg debugobsolete
558 b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
559 b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
560 da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
561 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
562 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 171614c9a7914c53f531373b95632323fdbbac8d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
563 ca1b80f7960aae2306287bab52b4090c59af8c29 917281f93fcbf255c034742f02bd31d8de88e94d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
564 c41c793e0ef1ddb463e85ea9491e377d01127ba2 4ae4427ee9f8f0935211fd66360948b77ab5aee9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
565 71a392c714b59ec54318a9fdc92c551a72a45790 1e1a50385a7d943eaab338376933b4fdef791d0c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'}
566 71a392c714b59ec54318a9fdc92c551a72a45790 1e4f6b3bb39b4ed75bdd8ae089b17b55bd074998 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
567 1e1a50385a7d943eaab338376933b4fdef791d0c 80cc9b1ec65032a21b4dbf53d6c408a2816823b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
568 1e4f6b3bb39b4ed75bdd8ae089b17b55bd074998 b006cf317e0ed16dbe786c439577475580f645f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'}
569 80cc9b1ec65032a21b4dbf53d6c408a2816823b0 b006cf317e0ed16dbe786c439577475580f645f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
570 fc6ad2bac162918f2639860797d7a68b5d673d62 2a9f6ccbdeba62f1ba8323dffb05eb5c21b90715 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
571 fc6ad2bac162918f2639860797d7a68b5d673d62 96b677f01b81d04c9f05db36888a375f7039b9b8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'}
572 96b677f01b81d04c9f05db36888a375f7039b9b8 b4575ed6fcfceef525fd3b4aa678e93d359db724 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
573 2a9f6ccbdeba62f1ba8323dffb05eb5c21b90715 48f745db3f5300363ca248b9aeab20ff2a55fbb3 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
574 b4575ed6fcfceef525fd3b4aa678e93d359db724 7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
575 48f745db3f5300363ca248b9aeab20ff2a55fbb3 7bbcf24ddecfe97d7c2ac6fa8c07c155c8fda47b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'}
576 daf1de08f3b087fbdfabcce3b4d39bf7e190ff44 3f7a1f693080b1ba36c6c55527565aaba03eb13e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
577 daf1de08f3b087fbdfabcce3b4d39bf7e190ff44 8e9a5449d6a680f68932fa3b40f7758cf12e84ce 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'}
578 8e9a5449d6a680f68932fa3b40f7758cf12e84ce 53242575ffa9604951b1da01db01bea6872afe05 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
579 3f7a1f693080b1ba36c6c55527565aaba03eb13e cdb0643c69fcdf622d62d317f049223a1255bc10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'evolve', 'user': 'test'}
580 53242575ffa9604951b1da01db01bea6872afe05 6fc7d9682de6e3bee6c8b1266b756ed7d522b7e4 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
581 cdb0643c69fcdf622d62d317f049223a1255bc10 6fc7d9682de6e3bee6c8b1266b756ed7d522b7e4 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'}
582 $ hg obslog --all
583 @ 6fc7d9682de6 (27) added z
584 |\
585 x | 53242575ffa9 (25) added z
586 | | amended(content) as 6fc7d9682de6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
587 | |
588 | x cdb0643c69fc (26) added z
589 | | rewritten(branch, content) as 6fc7d9682de6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
590 | |
591 | x 3f7a1f693080 (23) added z
592 | | rewritten(parent, content) as cdb0643c69fc using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
593 | |
594 x | 8e9a5449d6a6 (24) added z
595 |/ amended(content) as 53242575ffa9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
596 |
597 x daf1de08f3b0 (22) added z
598 amended(content) as 3f7a1f693080 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
599 rewritten(branch, parent) as 8e9a5449d6a6 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
600
601
504 $ cd .. 602 $ cd ..