Mercurial > evolve
comparison tests/test-evolve-content-divergent-interrupted.t @ 5830:67fc03f42d92 mercurial-5.0
test-compat: merge mercurial-5.1 into mercurial-5.0
# no-check-commit
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 11 Mar 2021 14:22:45 +0800 |
parents | c2c85576ddfb fd039a7f0c3c |
children | be8f7eb3f3a0 e82ad19eb3cc |
comparison
equal
deleted
inserted
replaced
5763:c2c85576ddfb | 5830:67fc03f42d92 |
---|---|
257 $ hg init multiparent | 257 $ hg init multiparent |
258 $ cd multiparent | 258 $ cd multiparent |
259 $ echo ".*\.orig" > .hgignore | 259 $ echo ".*\.orig" > .hgignore |
260 $ hg add .hgignore | 260 $ hg add .hgignore |
261 $ hg ci -m "added hgignore" | 261 $ hg ci -m "added hgignore" |
262 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; | 262 $ for ch in a b c; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; |
263 | 263 |
264 $ hg glog | 264 $ hg glog |
265 @ 4:c41c793e0ef1 added d | 265 @ 3:ca1b80f7960a added c |
266 | () draft | 266 | () draft |
267 o 3:ca1b80f7960a added c | 267 o 2:b1661037fa25 added b |
268 | () draft | 268 | () draft |
269 o 2:b1661037fa25 added b | 269 o 1:c7586e2a9264 added a |
270 | () draft | 270 | () draft |
271 o 1:c7586e2a9264 added a | 271 o 0:8fa14d15e168 added hgignore |
272 | () draft | 272 () draft |
273 o 0:8fa14d15e168 added hgignore | 273 |
274 () draft | 274 changes to get merge conflict during relocation |
275 $ echo "some_changes" >> a | |
276 $ hg amend | |
277 $ echo foo > d | |
278 $ hg add d | |
279 $ hg ci -m "added d" | |
275 | 280 |
276 $ hg rebase -r . -d .^^^ --config extensions.rebase= | 281 $ hg rebase -r . -d .^^^ --config extensions.rebase= |
277 rebasing 4:c41c793e0ef1 "added d" (tip) | 282 rebasing 5:f8b09dd867e5 "added d" (tip) |
278 $ echo bar > c | 283 $ echo bar > c |
279 $ hg add c | 284 $ hg add c |
280 $ hg amend | 285 $ hg amend |
281 | 286 |
282 $ hg up --hidden 'min(desc("added d"))' | 287 $ hg up --hidden 'min(desc("added d"))' |
283 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 288 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
284 updated to hidden changeset c41c793e0ef1 | 289 updated to hidden changeset f8b09dd867e5 |
285 (hidden revision 'c41c793e0ef1' was rewritten as: 69bdd23a9b0d) | 290 (hidden revision 'f8b09dd867e5' was rewritten as: 6f7eaf1944c0) |
286 working directory parent is obsolete! (c41c793e0ef1) | 291 working directory parent is obsolete! (f8b09dd867e5) |
287 (use 'hg evolve' to update to its successor: 69bdd23a9b0d) | 292 (use 'hg evolve' to update to its successor: 6f7eaf1944c0) |
288 $ echo bar > d | 293 $ echo bar > d |
294 $ echo "latest_changes" >> a | |
289 $ hg amend | 295 $ hg amend |
290 2 new content-divergent changesets | 296 2 new content-divergent changesets |
291 | 297 |
292 $ hg glog | 298 $ hg glog |
293 @ 7:e49523854bc8 added d | 299 @ 8:a8673909e314 added d |
294 | () draft | 300 | () draft |
295 | * 6:69bdd23a9b0d added d | 301 | * 7:6f7eaf1944c0 added d |
296 | | () draft | 302 | | () draft |
297 o | 3:ca1b80f7960a added c | 303 o | 4:33c16a2e0eb8 added c |
298 | | () draft | 304 | | () draft |
299 o | 2:b1661037fa25 added b | 305 o | 2:b1661037fa25 added b |
300 |/ () draft | 306 |/ () draft |
301 o 1:c7586e2a9264 added a | 307 o 1:c7586e2a9264 added a |
302 | () draft | 308 | () draft |
303 o 0:8fa14d15e168 added hgignore | 309 o 0:8fa14d15e168 added hgignore |
304 () draft | 310 () draft |
305 | 311 |
306 $ hg evolve --content-divergent | 312 $ hg evolve --content-divergent |
307 merge:[6] added d | 313 merge:[7] added d |
308 with: [7] added d | 314 with: [8] added d |
309 base: [4] added d | 315 base: [5] added d |
310 rebasing "other" content-divergent changeset e49523854bc8 on c7586e2a9264 | 316 rebasing "other" content-divergent changeset a8673909e314 on c7586e2a9264 |
311 file 'c' was deleted in other but was modified in local. | 317 merging a |
312 What do you want to do? | 318 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
313 use (c)hanged version, (d)elete, or leave (u)nresolved? u | |
314 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
315 unresolved merge conflicts | 319 unresolved merge conflicts |
316 (see 'hg help evolve.interrupted') | 320 (see 'hg help evolve.interrupted') |
317 [1] | 321 [1] |
318 | 322 |
319 $ hg evolve --abort | 323 $ hg evolve --abort |
320 evolve aborted | 324 evolve aborted |
321 working directory is now at e49523854bc8 | 325 working directory is now at a8673909e314 |
322 | 326 |
323 $ hg glog | 327 $ hg glog |
324 @ 7:e49523854bc8 added d | 328 @ 8:a8673909e314 added d |
325 | () draft | 329 | () draft |
326 | * 6:69bdd23a9b0d added d | 330 | * 7:6f7eaf1944c0 added d |
327 | | () draft | 331 | | () draft |
328 o | 3:ca1b80f7960a added c | 332 o | 4:33c16a2e0eb8 added c |
329 | | () draft | 333 | | () draft |
330 o | 2:b1661037fa25 added b | 334 o | 2:b1661037fa25 added b |
331 |/ () draft | 335 |/ () draft |
332 o 1:c7586e2a9264 added a | 336 o 1:c7586e2a9264 added a |
333 | () draft | 337 | () draft |
337 Creating content-divergence on multiple parents when gca of divergent changesets | 341 Creating content-divergence on multiple parents when gca of divergent changesets |
338 is parent of one of the divergents and merging divergent leads to conflicts | 342 is parent of one of the divergents and merging divergent leads to conflicts |
339 --------------------------------------------------------------------------------- | 343 --------------------------------------------------------------------------------- |
340 | 344 |
341 $ hg up 'min(desc("added d"))' | 345 $ hg up 'min(desc("added d"))' |
342 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | 346 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
343 $ hg rm c | 347 $ hg rm c |
344 $ echo wat > d | 348 $ echo wat > d |
345 $ hg amend | 349 $ hg amend |
346 | 350 |
347 $ hg glog | 351 $ hg glog |
348 @ 8:33e4442acf98 added d | 352 @ 9:b6a3f3ee0c44 added d |
349 | () draft | 353 | () draft |
350 | * 7:e49523854bc8 added d | 354 | * 8:a8673909e314 added d |
351 | | () draft | 355 | | () draft |
352 | o 3:ca1b80f7960a added c | 356 | o 4:33c16a2e0eb8 added c |
353 | | () draft | 357 | | () draft |
354 | o 2:b1661037fa25 added b | 358 | o 2:b1661037fa25 added b |
355 |/ () draft | 359 |/ () draft |
356 o 1:c7586e2a9264 added a | 360 o 1:c7586e2a9264 added a |
357 | () draft | 361 | () draft |
358 o 0:8fa14d15e168 added hgignore | 362 o 0:8fa14d15e168 added hgignore |
359 () draft | 363 () draft |
360 | 364 |
361 $ hg evolve --content-divergent | 365 $ hg evolve --content-divergent |
362 merge:[7] added d | 366 merge:[8] added d |
363 with: [8] added d | 367 with: [9] added d |
364 base: [4] added d | 368 base: [5] added d |
365 rebasing "divergent" content-divergent changeset e49523854bc8 on c7586e2a9264 | 369 rebasing "divergent" content-divergent changeset a8673909e314 on c7586e2a9264 |
370 merging a | |
371 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
372 unresolved merge conflicts | |
373 (see 'hg help evolve.interrupted') | |
374 [1] | |
375 | |
376 this test case is mainly to test that we hit merge conlict while merging the | |
377 two divergent csets, so resolving this one which happened during relocation | |
378 $ echo a > a | |
379 $ hg res -m | |
380 (no more unresolved files) | |
381 continue: hg evolve --continue | |
382 | |
383 $ hg evolve -c | |
384 evolving 8:a8673909e314 "added d" | |
385 merging a | |
366 merging d | 386 merging d |
387 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
367 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | 388 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
368 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 389 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
369 unresolved merge conflicts | 390 unresolved merge conflicts |
370 (see 'hg help evolve.interrupted') | 391 (see 'hg help evolve.interrupted') |
371 [1] | 392 [1] |
372 | 393 |
373 $ hg evolve --abort | 394 $ hg evolve --abort |
374 evolve aborted | 395 evolve aborted |
375 working directory is now at 33e4442acf98 | 396 working directory is now at b6a3f3ee0c44 |
376 | 397 |
377 $ hg glog | 398 $ hg glog |
378 @ 8:33e4442acf98 added d | 399 @ 9:b6a3f3ee0c44 added d |
379 | () draft | 400 | () draft |
380 | * 7:e49523854bc8 added d | 401 | * 8:a8673909e314 added d |
381 | | () draft | 402 | | () draft |
382 | o 3:ca1b80f7960a added c | 403 | o 4:33c16a2e0eb8 added c |
383 | | () draft | 404 | | () draft |
384 | o 2:b1661037fa25 added b | 405 | o 2:b1661037fa25 added b |
385 |/ () draft | 406 |/ () draft |
386 o 1:c7586e2a9264 added a | 407 o 1:c7586e2a9264 added a |
387 | () draft | 408 | () draft |
515 (see 'hg help evolve.interrupted') | 536 (see 'hg help evolve.interrupted') |
516 [1] | 537 [1] |
517 | 538 |
518 $ hg evolve --stop | 539 $ hg evolve --stop |
519 stopped the interrupted evolve | 540 stopped the interrupted evolve |
520 working directory is now at e49523854bc8 | 541 working directory is now at 517d4375cb72 |
521 | 542 |
522 $ hg glog | 543 $ hg glog |
523 * 7:517d4375cb72 added d | 544 @ 7:517d4375cb72 added d |
524 | () draft | 545 | () draft |
525 | @ 5:e49523854bc8 added d | 546 | * 5:e49523854bc8 added d |
526 | | () draft | 547 | | () draft |
527 | o 3:ca1b80f7960a added c | 548 | o 3:ca1b80f7960a added c |
528 | | () draft | 549 | | () draft |
529 | o 2:b1661037fa25 added b | 550 | o 2:b1661037fa25 added b |
530 |/ () draft | 551 |/ () draft |
535 | 556 |
536 Content-divergence with parent-change which will result in conflicts while | 557 Content-divergence with parent-change which will result in conflicts while |
537 relocation | 558 relocation |
538 --------------------------------------------------------------------------- | 559 --------------------------------------------------------------------------- |
539 | 560 |
540 $ echo babar > c | 561 Making changes to make sure that it hits conflict while relocating |
541 $ hg add c | 562 $ hg up -r 3 |
542 c already tracked! | 563 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
543 $ hg amend | 564 $ echo "some_changes" >> a |
544 $ hg glog | 565 $ hg amend |
545 @ 8:2d664a4ab749 added d | 566 1 new orphan changesets |
567 $ hg next | |
568 move:[5] added d | |
569 atop:[8] added c | |
570 working directory is now at dc9ba677cba1 | |
571 $ echo "latest_changes" >> a | |
572 $ hg amend | |
573 $ hg glog | |
574 @ 10:0892835a581f added d | |
575 | () draft | |
576 o 8:33c16a2e0eb8 added c | |
546 | () draft | 577 | () draft |
547 | * 7:517d4375cb72 added d | 578 | * 7:517d4375cb72 added d |
548 | | () draft | |
549 o | 3:ca1b80f7960a added c | |
550 | | () draft | 579 | | () draft |
551 o | 2:b1661037fa25 added b | 580 o | 2:b1661037fa25 added b |
552 |/ () draft | 581 |/ () draft |
553 o 1:c7586e2a9264 added a | 582 o 1:c7586e2a9264 added a |
554 | () draft | 583 | () draft |
555 o 0:8fa14d15e168 added hgignore | 584 o 0:8fa14d15e168 added hgignore |
556 () draft | 585 () draft |
557 | 586 |
558 $ hg evolve --content-divergent | 587 $ hg evolve --content-divergent |
559 merge:[7] added d | 588 merge:[7] added d |
560 with: [8] added d | 589 with: [10] added d |
561 base: [4] added d | 590 base: [4] added d |
562 rebasing "other" content-divergent changeset 2d664a4ab749 on c7586e2a9264 | 591 rebasing "other" content-divergent changeset 0892835a581f on c7586e2a9264 |
563 file 'c' was deleted in local but was modified in other. | 592 merging a |
564 What do you want to do? | 593 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
565 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | |
566 merging d | |
567 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
568 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
569 unresolved merge conflicts | 594 unresolved merge conflicts |
570 (see 'hg help evolve.interrupted') | 595 (see 'hg help evolve.interrupted') |
571 [1] | 596 [1] |
572 | 597 |
573 $ hg diff | 598 $ hg diff |
574 diff -r 517d4375cb72 c | 599 diff -r c7586e2a9264 a |
600 --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
601 +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
602 @@ -1,1 +1,6 @@ | |
603 foo | |
604 +<<<<<<< destination: c7586e2a9264 - test: added a | |
605 +======= | |
606 +some_changes | |
607 +latest_changes | |
608 +>>>>>>> evolving: 0892835a581f - test: added d | |
609 diff -r c7586e2a9264 d | |
575 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 610 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
576 +++ b/c Thu Jan 01 00:00:00 1970 +0000 | 611 +++ b/d Thu Jan 01 00:00:00 1970 +0000 |
577 @@ -0,0 +1,1 @@ | 612 @@ -0,0 +1,1 @@ |
578 +babar | |
579 diff -r 517d4375cb72 d | |
580 --- a/d Thu Jan 01 00:00:00 1970 +0000 | |
581 +++ b/d Thu Jan 01 00:00:00 1970 +0000 | |
582 @@ -1,1 +1,5 @@ | |
583 +<<<<<<< local: 517d4375cb72 - test: added d | |
584 foobar | |
585 +======= | |
586 +bar | 613 +bar |
587 +>>>>>>> other: e315463d94bd - test: added d | |
588 | 614 |
589 $ hg evolve --stop | 615 $ hg evolve --stop |
590 stopped the interrupted evolve | 616 stopped the interrupted evolve |
591 working directory is now at 2d664a4ab749 | 617 working directory is now at 0892835a581f |
592 | 618 |
593 XXX: we should have preserved the wdir to be at rev 8 | 619 $ hg glog |
594 $ hg glog | 620 @ 10:0892835a581f added d |
595 @ 8:2d664a4ab749 added d | 621 | () draft |
622 o 8:33c16a2e0eb8 added c | |
596 | () draft | 623 | () draft |
597 | * 7:517d4375cb72 added d | 624 | * 7:517d4375cb72 added d |
598 | | () draft | 625 | | () draft |
599 o | 3:ca1b80f7960a added c | |
600 | | () draft | |
601 o | 2:b1661037fa25 added b | 626 o | 2:b1661037fa25 added b |
602 |/ () draft | 627 |/ () draft |
603 o 1:c7586e2a9264 added a | 628 o 1:c7586e2a9264 added a |
604 | () draft | 629 | () draft |
605 o 0:8fa14d15e168 added hgignore | 630 o 0:8fa14d15e168 added hgignore |