Mercurial > hg
comparison tests/test-push-race.t @ 32635:32c80d07952b
test: add a push race case where racing push touches multiple heads
We check case where the raced push updates a head while the racing push update
all of them.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 27 May 2017 22:26:51 +0200 |
parents | 8d10e21e3b57 |
children | da5cf8cc5aad |
comparison
equal
deleted
inserted
replaced
32634:8d10e21e3b57 | 32635:32c80d07952b |
---|---|
623 | | | 623 | | |
624 | o a9149a1428e2 C-B (default) | 624 | o a9149a1428e2 C-B (default) |
625 |/ | 625 |/ |
626 @ 842e2fac6304 C-ROOT (default) | 626 @ 842e2fac6304 C-ROOT (default) |
627 | 627 |
628 | |
629 pushing racing push touch multiple heads | |
630 ---------------------------------------- | |
631 | |
632 There are multiple heads, but the racing push touch all of them | |
633 | |
634 # a (raced) | |
635 # | b | |
636 # |/| | |
637 # * * | |
638 # |/ | |
639 # * | |
640 | |
641 (resync-all) | |
642 | |
643 $ hg -R ./server pull ./client-racy | |
644 pulling from ./client-racy | |
645 searching for changes | |
646 adding changesets | |
647 adding manifests | |
648 adding file changes | |
649 added 1 changesets with 1 changes to 1 files (+1 heads) | |
650 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
651 $ hg -R ./client-other pull | |
652 pulling from ssh://user@dummy/server | |
653 searching for changes | |
654 adding changesets | |
655 adding manifests | |
656 adding file changes | |
657 added 1 changesets with 1 changes to 1 files (+1 heads) | |
658 (run 'hg heads' to see heads) | |
659 $ hg -R ./client-racy pull | |
660 pulling from ssh://user@dummy/server | |
661 searching for changes | |
662 adding changesets | |
663 adding manifests | |
664 adding file changes | |
665 added 1 changesets with 1 changes to 1 files (+1 heads) | |
666 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
667 | |
668 $ hg -R server graph | |
669 o 89420bf00fae C-J (default) | |
670 | | |
671 | o b35ed749f288 C-I (my-second-test-branch) | |
672 |/ | |
673 o 75d69cba5402 C-G (default) | |
674 | | |
675 | o 833be552cfe6 C-H (my-first-test-branch) | |
676 |/ | |
677 o d9e379a8c432 C-F (default) | |
678 | | |
679 o 51c544a58128 C-C (default) | |
680 | | |
681 | o d603e2c0cdd7 C-E (default) | |
682 |/ | |
683 o 98217d5a1659 C-A (default) | |
684 | | |
685 | o 59e76faf78bd C-D (default) | |
686 | | | |
687 | o a9149a1428e2 C-B (default) | |
688 |/ | |
689 @ 842e2fac6304 C-ROOT (default) | |
690 | |
691 | |
692 Creating changesets | |
693 | |
694 (merges heads) | |
695 | |
696 $ hg -R client-other/ up 'desc("C-E")' | |
697 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
698 $ hg -R client-other/ merge 'desc("C-D")' | |
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
700 (branch merge, don't forget to commit) | |
701 $ hg -R client-other/ commit -m "C-K" | |
702 | |
703 (update one head) | |
704 | |
705 $ hg -R client-racy/ up 'desc("C-D")' | |
706 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
707 $ echo bbb >> client-racy/b | |
708 $ hg -R client-racy/ commit -m "C-L" | |
709 | |
710 Pushing | |
711 | |
712 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
713 | |
714 $ waiton $TESTTMP/readyfile | |
715 | |
716 $ hg -R client-other push -fr 'tip' --new-branch | |
717 pushing to ssh://user@dummy/server | |
718 searching for changes | |
719 remote: adding changesets | |
720 remote: adding manifests | |
721 remote: adding file changes | |
722 remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
723 | |
724 $ release $TESTTMP/watchfile | |
725 | |
726 Check the result of the push | |
727 | |
728 $ cat ./push-log | |
729 pushing to ssh://user@dummy/server | |
730 searching for changes | |
731 wrote ready: $TESTTMP/readyfile | |
732 waiting on: $TESTTMP/watchfile | |
733 abort: push failed: | |
734 'repository changed while pushing - please try again' | |
735 | |
736 $ hg -R server graph | |
737 o be705100c623 C-K (default) | |
738 |\ | |
739 | o d603e2c0cdd7 C-E (default) | |
740 | | | |
741 o | 59e76faf78bd C-D (default) | |
742 | | | |
743 | | o 89420bf00fae C-J (default) | |
744 | | | | |
745 | | | o b35ed749f288 C-I (my-second-test-branch) | |
746 | | |/ | |
747 | | o 75d69cba5402 C-G (default) | |
748 | | | | |
749 | | | o 833be552cfe6 C-H (my-first-test-branch) | |
750 | | |/ | |
751 | | o d9e379a8c432 C-F (default) | |
752 | | | | |
753 | | o 51c544a58128 C-C (default) | |
754 | |/ | |
755 o | a9149a1428e2 C-B (default) | |
756 | | | |
757 | o 98217d5a1659 C-A (default) | |
758 |/ | |
759 @ 842e2fac6304 C-ROOT (default) | |
760 |