##// END OF EJS Templates
test: add a push race case where racing push create a new named branch...
marmoute -
r32634:8d10e21e default
parent child Browse files
Show More
@@ -501,3 +501,127 b' Check the result of the push'
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
General Comments 0
You need to be logged in to leave comments. Login now