##// END OF EJS Templates
test: add a push race case where raced push created a new named branch...
marmoute -
r32633:b01bfa5a default
parent child Browse files
Show More
@@ -384,3 +384,120 b' Check the result of the push'
384 384 |/
385 385 @ 842e2fac6304 C-ROOT (default)
386 386
387
388 Pushing touching different named branch (same topo): new branch raced
389 ---------------------------------------------------------------------
390
391 Pushing two children on the same head, one is a different named branch
392
393 # a (raced, branch-a)
394 # |
395 # | b (default branch)
396 # |/
397 # *
398
399 (resync-all)
400
401 $ hg -R ./server pull ./client-racy
402 pulling from ./client-racy
403 searching for changes
404 adding changesets
405 adding manifests
406 adding file changes
407 added 1 changesets with 1 changes to 1 files
408 (run 'hg update' to get a working copy)
409 $ hg -R ./client-other pull
410 pulling from ssh://user@dummy/server
411 searching for changes
412 adding changesets
413 adding manifests
414 adding file changes
415 added 1 changesets with 1 changes to 1 files
416 (run 'hg update' to get a working copy)
417 $ hg -R ./client-racy pull
418 pulling from ssh://user@dummy/server
419 searching for changes
420 adding changesets
421 adding manifests
422 adding file changes
423 added 1 changesets with 1 changes to 1 files (+1 heads)
424 (run 'hg heads .' to see heads, 'hg merge' to merge)
425
426 $ hg -R server graph
427 o d9e379a8c432 C-F (default)
428 |
429 o 51c544a58128 C-C (default)
430 |
431 | o d603e2c0cdd7 C-E (default)
432 |/
433 o 98217d5a1659 C-A (default)
434 |
435 | o 59e76faf78bd C-D (default)
436 | |
437 | o a9149a1428e2 C-B (default)
438 |/
439 @ 842e2fac6304 C-ROOT (default)
440
441
442 Creating changesets
443
444 (update existing head)
445
446 $ hg -R client-other/ up 'desc("C-F")'
447 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
448 $ echo aaa >> client-other/a
449 $ hg -R client-other/ commit -m "C-G"
450
451 (new named branch from that existing head)
452
453 $ hg -R client-racy/ up 'desc("C-F")'
454 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 $ echo bbb >> client-racy/a
456 $ hg -R client-racy/ branch my-first-test-branch
457 marked working directory as branch my-first-test-branch
458 (branches are permanent and global, did you want a bookmark?)
459 $ hg -R client-racy/ commit -m "C-H"
460
461 Pushing
462
463 $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
464
465 $ waiton $TESTTMP/readyfile
466
467 $ hg -R client-other push -fr 'tip'
468 pushing to ssh://user@dummy/server
469 searching for changes
470 remote: adding changesets
471 remote: adding manifests
472 remote: adding file changes
473 remote: added 1 changesets with 1 changes to 1 files
474
475 $ release $TESTTMP/watchfile
476
477 Check the result of the push
478
479 $ cat ./push-log
480 pushing to ssh://user@dummy/server
481 searching for changes
482 wrote ready: $TESTTMP/readyfile
483 waiting on: $TESTTMP/watchfile
484 abort: push failed:
485 'repository changed while pushing - please try again'
486
487 $ hg -R server graph
488 o 75d69cba5402 C-G (default)
489 |
490 o d9e379a8c432 C-F (default)
491 |
492 o 51c544a58128 C-C (default)
493 |
494 | o d603e2c0cdd7 C-E (default)
495 |/
496 o 98217d5a1659 C-A (default)
497 |
498 | o 59e76faf78bd C-D (default)
499 | |
500 | o a9149a1428e2 C-B (default)
501 |/
502 @ 842e2fac6304 C-ROOT (default)
503
General Comments 0
You need to be logged in to leave comments. Login now