Mercurial > evolve
comparison tests/test-split.t @ 6433:421993efcd69 mercurial-4.9
test-compat: merge mercurial-5.0 into mercurial-4.9
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 25 Feb 2023 21:34:29 +0400 |
parents | 2cd36fe3f4e6 8f56c72a73ff |
children | e5e78734dcdd 6fb3d0a7929b |
comparison
equal
deleted
inserted
replaced
6402:2cd36fe3f4e6 | 6433:421993efcd69 |
---|---|
393 | 393 |
394 Add topic to the hgrc | 394 Add topic to the hgrc |
395 | 395 |
396 $ echo "[extensions]" >> $HGRCPATH | 396 $ echo "[extensions]" >> $HGRCPATH |
397 $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH | 397 $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH |
398 $ hg debug-topic-namespace mynamespace | |
399 marked working directory as topic namespace: mynamespace | |
398 $ hg topic mytopic | 400 $ hg topic mytopic |
399 marked working directory as topic: mytopic | 401 marked working directory as topic: mytopic |
400 $ echo babar > babar | 402 $ echo babar > babar |
401 $ echo celeste > celeste | 403 $ echo celeste > celeste |
402 $ hg add babar celeste | 404 $ hg add babar celeste |
403 $ hg commit -m "Works on mytopic" babar celeste --user victor | 405 $ hg commit -m "Works on mytopic" babar celeste --user victor |
404 active topic 'mytopic' grew its first changeset | 406 active topic 'mytopic' grew its first changeset |
405 (see 'hg help topics' for more information) | 407 (see 'hg help topics' for more information) |
406 $ hg log -r . | 408 $ hg log -r . |
407 changeset: 18:cdda6d69812b | 409 changeset: 18:4f0e158045aa |
408 branch: double//slash | 410 branch: double//slash |
409 tag: tip | 411 tag: tip |
410 topic: mytopic | 412 topic: mytopic |
411 user: victor | 413 user: victor |
412 date: Thu Jan 01 00:00:00 1970 +0000 | 414 date: Thu Jan 01 00:00:00 1970 +0000 |
413 summary: Works on mytopic | 415 summary: Works on mytopic |
414 | 416 |
415 $ hg summary | 417 $ hg summary |
416 parent: 18:cdda6d69812b tip | 418 parent: 18:4f0e158045aa tip |
417 Works on mytopic | 419 Works on mytopic |
418 branch: double//slash//mytopic | 420 branch: double//slash//mynamespace/mytopic |
419 commit: (clean) | 421 commit: (clean) |
420 update: (current) | 422 update: (current) |
421 phases: 9 draft | 423 phases: 9 draft |
422 topic: mytopic | 424 topic: mytopic |
425 | |
426 $ hg log -r . -T '{rev}: {fqbn}\n' | |
427 18: double//slash//mynamespace/mytopic | |
423 | 428 |
424 Split it | 429 Split it |
425 | 430 |
426 $ hg split -U << EOF | 431 $ hg split -U << EOF |
427 > Y | 432 > Y |
449 continue splitting? [Ycdq?] c | 454 continue splitting? [Ycdq?] c |
450 | 455 |
451 Check that the topic is still here | 456 Check that the topic is still here |
452 | 457 |
453 $ hg log -r "tip~1::" | 458 $ hg log -r "tip~1::" |
454 changeset: 19:a12d854b94a2 | 459 changeset: 19:d8d795e8424a |
455 branch: double//slash | 460 branch: double//slash |
456 topic: mytopic | 461 topic: mytopic |
457 parent: 17:db45bd0f0e52 | 462 parent: 17:db45bd0f0e52 |
458 user: test | 463 user: test |
459 date: Thu Jan 01 00:00:00 1970 +0000 | 464 date: Thu Jan 01 00:00:00 1970 +0000 |
460 summary: split7 | 465 summary: split7 |
461 | 466 |
462 changeset: 20:98274aae3990 | 467 changeset: 20:d6d47657e765 |
463 branch: double//slash | 468 branch: double//slash |
464 tag: tip | 469 tag: tip |
465 topic: mytopic | 470 topic: mytopic |
466 user: test | 471 user: test |
467 date: Thu Jan 01 00:00:00 1970 +0000 | 472 date: Thu Jan 01 00:00:00 1970 +0000 |
468 summary: split8 | 473 summary: split8 |
469 | 474 |
470 $ hg topic | 475 $ hg topic |
471 * mytopic (2 changesets) | 476 * mytopic (2 changesets) |
472 | 477 |
478 $ hg log -r "tip~1::" -T '{rev}: {fqbn}\n' | |
479 19: double//slash//mynamespace/mytopic | |
480 20: double//slash//mynamespace/mytopic | |
481 | |
473 Check commit extras | 482 Check commit extras |
474 | 483 |
475 $ hg log -r "tip~1::" -T '{rev}: {join(extras, " ")}\n' | 484 $ hg log -r "tip~1::" -T '{rev}: {join(extras, " ")}\n' |
476 19: branch=double//slash topic=mytopic | 485 19: branch=double//slash topic=mytopic topic-namespace=mynamespace |
477 20: branch=double//slash topic=mytopic | 486 20: branch=double//slash topic=mytopic topic-namespace=mynamespace |
478 | 487 |
479 Test split the first commit on a branch | 488 Test split the first commit on a branch |
480 | 489 |
481 $ touch SPLIT1 SPLIT2 | 490 $ touch SPLIT1 SPLIT2 |
482 $ hg add SPLIT1 SPLIT2 | 491 $ hg add SPLIT1 SPLIT2 |
483 $ hg branch another-branch | 492 $ hg branch another-branch |
484 marked working directory as branch another-branch | 493 marked working directory as branch another-branch |
485 $ hg commit -m "To be split" | 494 $ hg commit -m "To be split" |
486 $ hg log -G -l 3 | 495 $ hg log -G -l 3 |
487 @ changeset: 21:1b89fbf4d770 | 496 @ changeset: 21:94981e5d988e |
488 | branch: another-branch | 497 | branch: another-branch |
489 | tag: tip | 498 | tag: tip |
490 | topic: mytopic | 499 | topic: mytopic |
491 | user: test | 500 | user: test |
492 | date: Thu Jan 01 00:00:00 1970 +0000 | 501 | date: Thu Jan 01 00:00:00 1970 +0000 |
493 | summary: To be split | 502 | summary: To be split |
494 | | 503 | |
495 o changeset: 20:98274aae3990 | 504 o changeset: 20:d6d47657e765 |
496 | branch: double//slash | 505 | branch: double//slash |
497 | topic: mytopic | 506 | topic: mytopic |
498 | user: test | 507 | user: test |
499 | date: Thu Jan 01 00:00:00 1970 +0000 | 508 | date: Thu Jan 01 00:00:00 1970 +0000 |
500 | summary: split8 | 509 | summary: split8 |
501 | | 510 | |
502 o changeset: 19:a12d854b94a2 | 511 o changeset: 19:d8d795e8424a |
503 | branch: double//slash | 512 | branch: double//slash |
504 ~ topic: mytopic | 513 ~ topic: mytopic |
505 parent: 17:db45bd0f0e52 | 514 parent: 17:db45bd0f0e52 |
506 user: test | 515 user: test |
507 date: Thu Jan 01 00:00:00 1970 +0000 | 516 date: Thu Jan 01 00:00:00 1970 +0000 |
511 # HG changeset patch | 520 # HG changeset patch |
512 # User test | 521 # User test |
513 # Date 0 0 | 522 # Date 0 0 |
514 # Thu Jan 01 00:00:00 1970 +0000 | 523 # Thu Jan 01 00:00:00 1970 +0000 |
515 # Branch another-branch | 524 # Branch another-branch |
516 # Node ID 1b89fbf4d770c8fad85b73aada92425c00ad3a58 | 525 # Node ID 94981e5d988ea23cf2b17f6c07c39edc0f174b01 |
517 # Parent 98274aae39908fc11c1cf42c381935cfbe94695e | 526 # Parent d6d47657e765570283ec03fc68836d9eb297c4b3 |
518 # EXP-Topic mytopic | 527 # EXP-Topic mytopic |
519 To be split | 528 To be split |
520 | 529 |
521 diff --git a/SPLIT1 b/SPLIT1 | 530 diff --git a/SPLIT1 b/SPLIT1 |
522 new file mode 100644 | 531 new file mode 100644 |
547 | 556 |
548 no more changes to split | 557 no more changes to split |
549 | 558 |
550 The split changesets should be on the 'another-branch' | 559 The split changesets should be on the 'another-branch' |
551 $ hg log -G -l 3 | 560 $ hg log -G -l 3 |
552 @ changeset: 23:492ea8acc08d | 561 @ changeset: 23:61661257a937 |
553 | branch: another-branch | 562 | branch: another-branch |
554 | tag: tip | 563 | tag: tip |
555 | topic: mytopic | 564 | topic: mytopic |
556 | user: test | 565 | user: test |
557 | date: Thu Jan 01 00:00:00 1970 +0000 | 566 | date: Thu Jan 01 00:00:00 1970 +0000 |
558 | summary: split10 | 567 | summary: split10 |
559 | | 568 | |
560 o changeset: 22:35c3b7b7f830 | 569 o changeset: 22:a05395d0b421 |
561 | branch: another-branch | 570 | branch: another-branch |
562 | topic: mytopic | 571 | topic: mytopic |
563 | parent: 20:98274aae3990 | 572 | parent: 20:d6d47657e765 |
564 | user: test | 573 | user: test |
565 | date: Thu Jan 01 00:00:00 1970 +0000 | 574 | date: Thu Jan 01 00:00:00 1970 +0000 |
566 | summary: split9 | 575 | summary: split9 |
567 | | 576 | |
568 o changeset: 20:98274aae3990 | 577 o changeset: 20:d6d47657e765 |
569 | branch: double//slash | 578 | branch: double//slash |
570 ~ topic: mytopic | 579 ~ topic: mytopic |
571 user: test | 580 user: test |
572 date: Thu Jan 01 00:00:00 1970 +0000 | 581 date: Thu Jan 01 00:00:00 1970 +0000 |
573 summary: split8 | 582 summary: split8 |
583 | 592 |
584 $ hg up "tip~1" | 593 $ hg up "tip~1" |
585 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 594 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
586 | 595 |
587 $ hg log -G -l 2 | 596 $ hg log -G -l 2 |
588 o changeset: 24:5e7c5b766d1e | 597 o changeset: 24:cffbaf700768 |
589 | branch: yet-another-branch | 598 | branch: yet-another-branch |
590 | tag: tip | 599 | tag: tip |
591 | topic: mytopic | 600 | topic: mytopic |
592 | user: test | 601 | user: test |
593 | date: Thu Jan 01 00:00:00 1970 +0000 | 602 | date: Thu Jan 01 00:00:00 1970 +0000 |
594 | summary: To be split again | 603 | summary: To be split again |
595 | | 604 | |
596 @ changeset: 23:492ea8acc08d | 605 @ changeset: 23:61661257a937 |
597 | branch: another-branch | 606 | branch: another-branch |
598 ~ topic: mytopic | 607 ~ topic: mytopic |
599 user: test | 608 user: test |
600 date: Thu Jan 01 00:00:00 1970 +0000 | 609 date: Thu Jan 01 00:00:00 1970 +0000 |
601 summary: split10 | 610 summary: split10 |
623 | 632 |
624 $ hg branch | 633 $ hg branch |
625 another-branch | 634 another-branch |
626 | 635 |
627 $ hg log -G -l 2 | 636 $ hg log -G -l 2 |
628 o changeset: 24:5e7c5b766d1e | 637 o changeset: 24:cffbaf700768 |
629 | branch: yet-another-branch | 638 | branch: yet-another-branch |
630 | tag: tip | 639 | tag: tip |
631 | topic: mytopic | 640 | topic: mytopic |
632 | user: test | 641 | user: test |
633 | date: Thu Jan 01 00:00:00 1970 +0000 | 642 | date: Thu Jan 01 00:00:00 1970 +0000 |
634 | summary: To be split again | 643 | summary: To be split again |
635 | | 644 | |
636 @ changeset: 23:492ea8acc08d | 645 @ changeset: 23:61661257a937 |
637 | branch: another-branch | 646 | branch: another-branch |
638 ~ topic: mytopic | 647 ~ topic: mytopic |
639 user: test | 648 user: test |
640 date: Thu Jan 01 00:00:00 1970 +0000 | 649 date: Thu Jan 01 00:00:00 1970 +0000 |
641 summary: split10 | 650 summary: split10 |
699 # HG changeset patch | 708 # HG changeset patch |
700 # User test | 709 # User test |
701 # Date 0 0 | 710 # Date 0 0 |
702 # Thu Jan 01 00:00:00 1970 +0000 | 711 # Thu Jan 01 00:00:00 1970 +0000 |
703 # Branch another-branch | 712 # Branch another-branch |
704 # Node ID 492ea8acc08dae0fce72cc459218dba9043e0481 | 713 # Node ID 61661257a93759374255a4c05fcd9b8a78bbe399 |
705 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1 | 714 # Parent a05395d0b42120af8bfb222d19f01008b1342c15 |
706 # EXP-Topic mytopic | 715 # EXP-Topic mytopic |
707 split10 | 716 split10 |
708 | 717 |
709 diff --git a/SPLIT2 b/SPLIT2 | 718 diff --git a/SPLIT2 b/SPLIT2 |
710 new file mode 100644 | 719 new file mode 100644 |
715 # HG changeset patch | 724 # HG changeset patch |
716 # User test | 725 # User test |
717 # Date 0 0 | 726 # Date 0 0 |
718 # Thu Jan 01 00:00:00 1970 +0000 | 727 # Thu Jan 01 00:00:00 1970 +0000 |
719 # Branch another-branch | 728 # Branch another-branch |
720 # Node ID 1110f02dec0746d3b0493e7a09051816f7bc3179 | 729 # Node ID e6ca7ba1372dc452769c51a56d853c8ede26d9fa |
721 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1 | 730 # Parent a05395d0b42120af8bfb222d19f01008b1342c15 |
722 # EXP-Topic mytopic | 731 # EXP-Topic mytopic |
723 split10 | 732 split10 |
724 | 733 |
725 diff --git a/SPLIT2 b/SPLIT2 | 734 diff --git a/SPLIT2 b/SPLIT2 |
726 new file mode 100644 | 735 new file mode 100644 |
749 # HG changeset patch | 758 # HG changeset patch |
750 # User test | 759 # User test |
751 # Date 0 0 | 760 # Date 0 0 |
752 # Thu Jan 01 00:00:00 1970 +0000 | 761 # Thu Jan 01 00:00:00 1970 +0000 |
753 # Branch another-branch | 762 # Branch another-branch |
754 # Node ID 5aa51c542c1b03435a7b5b602a4953bbe3321511 | 763 # Node ID bb8f1c282ddf89515bd07bd63a84962ab51ac277 |
755 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1 | 764 # Parent a05395d0b42120af8bfb222d19f01008b1342c15 |
756 # EXP-Topic mytopic | 765 # EXP-Topic mytopic |
757 split12 | 766 split12 |
758 | 767 |
759 diff --git a/SPLIT2 b/SPLIT2 | 768 diff --git a/SPLIT2 b/SPLIT2 |
760 new file mode 100644 | 769 new file mode 100644 |