Mercurial > hg
comparison tests/test-push-race.t @ 32634:8d10e21e3b57
test: add a push race case where racing push create a new named branch
This is the mirror case from the previos one. We check case where the raced
push update a head while the racing push create a new named branch as a
children of that updated head.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 27 May 2017 22:26:35 +0200 |
parents | b01bfa5abbfe |
children | 32c80d07952b |
comparison
equal
deleted
inserted
replaced
32633:b01bfa5abbfe | 32634:8d10e21e3b57 |
---|---|
499 | | | 499 | | |
500 | o a9149a1428e2 C-B (default) | 500 | o a9149a1428e2 C-B (default) |
501 |/ | 501 |/ |
502 @ 842e2fac6304 C-ROOT (default) | 502 @ 842e2fac6304 C-ROOT (default) |
503 | 503 |
504 | |
505 pushing touching different named branch (same topo): old branch raced | |
506 --------------------------------------------------------------------- | |
507 | |
508 Pushing two children on the same head, one is a different named branch | |
509 | |
510 # a (raced, default-branch) | |
511 # | | |
512 # | b (new branch) | |
513 # |/ | |
514 # * (default-branch) | |
515 | |
516 (resync-all) | |
517 | |
518 $ hg -R ./server pull ./client-racy | |
519 pulling from ./client-racy | |
520 searching for changes | |
521 adding changesets | |
522 adding manifests | |
523 adding file changes | |
524 added 1 changesets with 1 changes to 1 files (+1 heads) | |
525 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
526 $ hg -R ./client-other pull | |
527 pulling from ssh://user@dummy/server | |
528 searching for changes | |
529 adding changesets | |
530 adding manifests | |
531 adding file changes | |
532 added 1 changesets with 1 changes to 1 files (+1 heads) | |
533 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
534 $ hg -R ./client-racy pull | |
535 pulling from ssh://user@dummy/server | |
536 searching for changes | |
537 adding changesets | |
538 adding manifests | |
539 adding file changes | |
540 added 1 changesets with 1 changes to 1 files (+1 heads) | |
541 (run 'hg heads' to see heads) | |
542 | |
543 $ hg -R server graph | |
544 o 833be552cfe6 C-H (my-first-test-branch) | |
545 | | |
546 | o 75d69cba5402 C-G (default) | |
547 |/ | |
548 o d9e379a8c432 C-F (default) | |
549 | | |
550 o 51c544a58128 C-C (default) | |
551 | | |
552 | o d603e2c0cdd7 C-E (default) | |
553 |/ | |
554 o 98217d5a1659 C-A (default) | |
555 | | |
556 | o 59e76faf78bd C-D (default) | |
557 | | | |
558 | o a9149a1428e2 C-B (default) | |
559 |/ | |
560 @ 842e2fac6304 C-ROOT (default) | |
561 | |
562 | |
563 Creating changesets | |
564 | |
565 (new named branch from one head) | |
566 | |
567 $ hg -R client-other/ up 'desc("C-G")' | |
568 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
569 $ echo aaa >> client-other/a | |
570 $ hg -R client-other/ branch my-second-test-branch | |
571 marked working directory as branch my-second-test-branch | |
572 $ hg -R client-other/ commit -m "C-I" | |
573 | |
574 (children "updating" that same head) | |
575 | |
576 $ hg -R client-racy/ up 'desc("C-G")' | |
577 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
578 $ echo bbb >> client-racy/a | |
579 $ hg -R client-racy/ commit -m "C-J" | |
580 | |
581 Pushing | |
582 | |
583 $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
584 | |
585 $ waiton $TESTTMP/readyfile | |
586 | |
587 $ hg -R client-other push -fr 'tip' --new-branch | |
588 pushing to ssh://user@dummy/server | |
589 searching for changes | |
590 remote: adding changesets | |
591 remote: adding manifests | |
592 remote: adding file changes | |
593 remote: added 1 changesets with 1 changes to 1 files | |
594 | |
595 $ release $TESTTMP/watchfile | |
596 | |
597 Check the result of the push | |
598 | |
599 $ cat ./push-log | |
600 pushing to ssh://user@dummy/server | |
601 searching for changes | |
602 wrote ready: $TESTTMP/readyfile | |
603 waiting on: $TESTTMP/watchfile | |
604 abort: push failed: | |
605 'repository changed while pushing - please try again' | |
606 | |
607 $ hg -R server graph | |
608 o b35ed749f288 C-I (my-second-test-branch) | |
609 | | |
610 o 75d69cba5402 C-G (default) | |
611 | | |
612 | o 833be552cfe6 C-H (my-first-test-branch) | |
613 |/ | |
614 o d9e379a8c432 C-F (default) | |
615 | | |
616 o 51c544a58128 C-C (default) | |
617 | | |
618 | o d603e2c0cdd7 C-E (default) | |
619 |/ | |
620 o 98217d5a1659 C-A (default) | |
621 | | |
622 | o 59e76faf78bd C-D (default) | |
623 | | | |
624 | o a9149a1428e2 C-B (default) | |
625 |/ | |
626 @ 842e2fac6304 C-ROOT (default) | |
627 |