comparison tests/test-evolve-content-divergent-corner-cases.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 1f92a6aa40d6
children 13376ca93fa3
comparison
equal deleted inserted replaced
5275:417503ef667d 5276:c834fdb87f90
83 $ hg log -G 83 $ hg log -G
84 @ 4:45bf1312f454@default(draft) divergent [] 84 @ 4:45bf1312f454@default(draft) divergent []
85 | 85 |
86 o 0:9092f1db7931@default(draft) added a [] 86 o 0:9092f1db7931@default(draft) added a []
87 87
88 $ hg debugobsolete
89 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d 8374d2ddc3a4d48428c3d2f80e4fc86f13736f96 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
90 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d 593c57f2117e33dd0884382f02789d948f548557 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
91 593c57f2117e33dd0884382f02789d948f548557 45bf1312f45468b76158b33f8426e6530c8b35b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
92 8374d2ddc3a4d48428c3d2f80e4fc86f13736f96 45bf1312f45468b76158b33f8426e6530c8b35b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
93 $ hg obslog --all
94 @ 45bf1312f454 (4) divergent
95 |\
96 x | 593c57f2117e (2) divergent
97 | | amended(content) as 45bf1312f454 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
98 | |
99 | x 8374d2ddc3a4 (3) divergent
100 |/ amended(content) as 45bf1312f454 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
101 |
102 x 5f6d8a4bf34a (1) added b
103 rewritten(description, content) as 593c57f2117e using prune by test (Thu Jan 01 00:00:00 1970 +0000)
104 rewritten(description, content) as 8374d2ddc3a4 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
105
106
88 Test divergence resolution when it yields to an empty commit (issue4950) 107 Test divergence resolution when it yields to an empty commit (issue4950)
89 cdivergent2 contains the same content than cdivergent1 and they are divergent 108 cdivergent2 contains the same content than cdivergent1 and they are divergent
90 versions of the revision _c 109 versions of the revision _c
91 110
92 $ hg up .^ 111 $ hg up .^
138 with: [7] add _c 157 with: [7] add _c
139 base: [5] add _c 158 base: [5] add _c
140 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 159 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 nothing changed 160 nothing changed
142 working directory is now at e3ff64ce8d4c 161 working directory is now at e3ff64ce8d4c
162
163 $ hg log -G
164 @ 6:e3ff64ce8d4c@default(draft) add cdivergent1 []
165 |
166 | o 4:45bf1312f454@default(draft) divergent []
167 |/
168 o 0:9092f1db7931@default(draft) added a []
169
170 $ hg debugobsolete
171 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d 8374d2ddc3a4d48428c3d2f80e4fc86f13736f96 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
172 5f6d8a4bf34ab274ccc9f631c2536964b8a3666d 593c57f2117e33dd0884382f02789d948f548557 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
173 593c57f2117e33dd0884382f02789d948f548557 45bf1312f45468b76158b33f8426e6530c8b35b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
174 8374d2ddc3a4d48428c3d2f80e4fc86f13736f96 45bf1312f45468b76158b33f8426e6530c8b35b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
175 48819a83561596ef0aeac4082eaaa8afe4320f3a b2ae71172042972a8e8d2bc11e2b2fe4e0c3aa49 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'prune', 'user': 'test'}
176 48819a83561596ef0aeac4082eaaa8afe4320f3a e3ff64ce8d4ce33b40d9f367a8ec472fec588ca3 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
177 b2ae71172042972a8e8d2bc11e2b2fe4e0c3aa49 e3ff64ce8d4ce33b40d9f367a8ec472fec588ca3 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'evolve', 'user': 'test'}
178 BROKEN: We should have created a new commit as successor instead of reusing
179 revision 6
180 $ hg obslog --all
181 @ e3ff64ce8d4c (6) add cdivergent1
182 |\
183 | x b2ae71172042 (7) add _c
184 |/ reworded(description) as e3ff64ce8d4c using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
185 |
186 x 48819a835615 (5) add _c
187 amended(content) as b2ae71172042 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
188 rewritten(description, content) as e3ff64ce8d4c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
189
143 190
144 $ cd .. 191 $ cd ..
145 192
146 Test None docstring issue of evolve divergent, which caused hg crush 193 Test None docstring issue of evolve divergent, which caused hg crush
147 194
206 with: [3] bdivergent 253 with: [3] bdivergent
207 base: [1] add _b 254 base: [1] add _b
208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
209 working directory is now at 73ff357d3975 256 working directory is now at 73ff357d3975
210 257
258 $ hg log -G
259 @ 4:73ff357d3975@default(draft) bdivergent []
260 |
261 o 0:135f39f4bd78@default(draft) add _a []
262
263 $ hg debugobsolete
264 37445b16603b50165d5eb80735fb986c72a2dac1 6b096fb450709a194b21fb9b192fe9b1572c4af0 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
265 37445b16603b50165d5eb80735fb986c72a2dac1 05a6b6a9e633802d2bdd06e6d292982a767d930e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'prune', 'user': 'test'}
266 05a6b6a9e633802d2bdd06e6d292982a767d930e 73ff357d3975b9f319b59fd5853abc3c8294ae89 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
267 6b096fb450709a194b21fb9b192fe9b1572c4af0 73ff357d3975b9f319b59fd5853abc3c8294ae89 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
268 $ hg obslog --all
269 @ 73ff357d3975 (4) bdivergent
270 |\
271 x | 05a6b6a9e633 (2) bdivergent
272 | | amended(content) as 73ff357d3975 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
273 | |
274 | x 6b096fb45070 (3) bdivergent
275 |/ amended(content) as 73ff357d3975 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
276 |
277 x 37445b16603b (1) add _b
278 rewritten(description, content) as 05a6b6a9e633 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
279 rewritten(description, content) as 6b096fb45070 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
280
281
211 $ cd .. 282 $ cd ..
212 283
213 Test to make sure that evolve don't fall into unrecoverable state (issue6053) 284 Test to make sure that evolve don't fall into unrecoverable state (issue6053)
214 ------------------------------------------------------------------------------ 285 ------------------------------------------------------------------------------
215 286
289 $ hg glog -l1 360 $ hg glog -l1
290 @ 9:eb6357cd41b6 updated e 361 @ 9:eb6357cd41b6 updated e
291 | () [default] draft 362 | () [default] draft
292 ~ 363 ~
293 364
365 $ hg debugobsolete
366 8d71eadcc9dfb21a924e75a5796c2f011bdc55a4 ff6f7cd76a7c97d938e8fe87f0fc816b66929435 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
367 8d71eadcc9dfb21a924e75a5796c2f011bdc55a4 de4ea3103326293994c634101e780724346ee89f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'}
368 9150fe93bec603cd88d05cda9f6ff13420cb53e9 0 {155349b645beebee15325a9a22dd0c9ef8fbbbd3} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
369 ff6f7cd76a7c97d938e8fe87f0fc816b66929435 0ceb21ca2557a61433f097e4d64024e37cae2c10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
370 de4ea3103326293994c634101e780724346ee89f a2465d1d56d1aee8ed90d2292978456d2be6f7b9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
371 0ceb21ca2557a61433f097e4d64024e37cae2c10 eb6357cd41b6a6ec2f12e81cf96eaeeb54b057d2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
372 a2465d1d56d1aee8ed90d2292978456d2be6f7b9 eb6357cd41b6a6ec2f12e81cf96eaeeb54b057d2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'}
373 $ hg obslog --all
374 @ eb6357cd41b6 (9) updated e
375 |\
376 x | 0ceb21ca2557 (7) updated e
377 | | amended(content) as eb6357cd41b6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
378 | |
379 | x a2465d1d56d1 (8) updated e
380 | | rewritten as eb6357cd41b6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
381 | |
382 | x de4ea3103326 (6) updated e
383 | | rebased(parent) as a2465d1d56d1 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
384 | |
385 x | ff6f7cd76a7c (5) updated e
386 |/ rebased(parent) as 0ceb21ca2557 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
387 |
388 x 8d71eadcc9df (4) added e
389 rewritten(description, parent, content) as de4ea3103326 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
390 rewritten(description, content) as ff6f7cd76a7c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
391
392
294 $ cd .. 393 $ cd ..
295 394
296 Check that canceling of file deletion are merge correctly 395 Check that canceling of file deletion are merge correctly
297 --------------------------------------------------------- 396 ---------------------------------------------------------
298 397
353 deleted file mode 100644 452 deleted file mode 100644
354 --- a/a 453 --- a/a
355 +++ /dev/null 454 +++ /dev/null
356 @@ -1,1 +0,0 @@ 455 @@ -1,1 +0,0 @@
357 -a 456 -a
457
458 $ hg debugobsolete
459 dff6e52f5e419381c070159c8038ac948f59283f 0825dcee2670349e749f1df45857fca34f61e350 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
460 dff6e52f5e419381c070159c8038ac948f59283f 92ecd58f9b05d6c0a1c3833a79359eea4b0268ff 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
461 0825dcee2670349e749f1df45857fca34f61e350 7ca6a9fafcf619820b754070ac0b447651005422 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
462 92ecd58f9b05d6c0a1c3833a79359eea4b0268ff 7ca6a9fafcf619820b754070ac0b447651005422 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'}
463 $ hg obslog --all
464 @ 7ca6a9fafcf6 (4) delete a
465 |\
466 x | 0825dcee2670 (2) delete a
467 | | amended(content) as 7ca6a9fafcf6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
468 | |
469 | x 92ecd58f9b05 (3) delete a
470 |/ amended(content) as 7ca6a9fafcf6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
471 |
472 x dff6e52f5e41 (1) delete a
473 amended(content) as 0825dcee2670 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
474 amended(content) as 92ecd58f9b05 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
475