comparison tests/test-evolve-public-content-divergent.t @ 4418:0ec30a7d9e12

evolve: add a test in pubdiv where only merging leads to conflict Added a test in public divergence where both the cset are on the different parent and no conflict in relocation but in merging.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sat, 02 Mar 2019 02:34:29 +0530
parents b86413cfca4a
children a6bdb02a1902
comparison
equal deleted inserted replaced
4417:b86413cfca4a 4418:0ec30a7d9e12
564 merging "other" content-divergent changeset '2af3359250d3' 564 merging "other" content-divergent changeset '2af3359250d3'
565 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 565 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
566 computing new diff 566 computing new diff
567 committed as 06e4564a3897 567 committed as 06e4564a3897
568 working directory is now at 06e4564a3897 568 working directory is now at 06e4564a3897
569
570 $ hg evolve -l
571 $ cd ..
572
573 Testing the case when merging leads to conflicts but relocation won't:
574 ---------------------------------------------------------------------
575
576 $ hg init pubdiv3.5
577 $ cd pubdiv3.5
578 $ for ch in a b c d; do
579 > echo $ch > $ch;
580 > hg ci -Aqm "added "$ch;
581 > done;
582
583 $ hg up .^^
584 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
585 $ echo dconflict > d
586 $ hg add d
587 $ hg ci -m "added d"
588 created new head
589
590 $ hg up 2
591 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
592 $ echo dd > d
593 $ hg add d
594 $ hg ci -m "added d"
595 created new head
596
597 $ hg glog
598 @ 5:93cd84bbdaca added d
599 | draft
600 |
601 | o 4:9411ad1fe615 added d
602 | | draft
603 | |
604 +---o 3:9150fe93bec6 added d
605 | | draft
606 | |
607 o | 2:155349b645be added c
608 |/ draft
609 |
610 o 1:5f6d8a4bf34a added b
611 | draft
612 |
613 o 0:9092f1db7931 added a
614 draft
615
616 $ hg prune 3 -s 5
617 1 changesets pruned
618 $ hg prune 3 -s 4 --hidden
619 1 changesets pruned
620 2 new content-divergent changesets
621
622 Change phase to public for one head:
623 $ hg phase --public -r 5
624
625 $ hg glog
626 @ 5:93cd84bbdaca added d
627 | public
628 |
629 | * 4:9411ad1fe615 added d
630 | | draft content-divergent
631 | |
632 o | 2:155349b645be added c
633 |/ public
634 |
635 o 1:5f6d8a4bf34a added b
636 | public
637 |
638 o 0:9092f1db7931 added a
639 public
640
641 $ hg evolve --content-divergent --any
642 merge:[5] added d
643 with: [4] added d
644 base: [3] added d
645 rebasing "other" content-divergent changeset 9411ad1fe615 on 155349b645be
646 updating to "local" side of the conflict: 93cd84bbdaca
647 merging "other" content-divergent changeset 'b5c690cdf1d5'
648 merging d
649 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
650 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
651 fix conflicts and see `hg help evolve.interrupted`
652 [1]
653
654 $ echo d > d
655 $ hg res -m
656 (no more unresolved files)
657 continue: hg evolve --continue
658
659 $ hg evolve --continue
660 computing new diff
661 committed as 2a0f44767904
662 working directory is now at 2a0f44767904
569 663
570 $ hg evolve -l 664 $ hg evolve -l
571 $ cd .. 665 $ cd ..
572 666
573 Testing the case when relocation and merging both leads to conflicts: 667 Testing the case when relocation and merging both leads to conflicts: