488 date: Thu Jan 01 00:00:00 1970 +0000 |
488 date: Thu Jan 01 00:00:00 1970 +0000 |
489 summary: split8 |
489 summary: split8 |
490 |
490 |
491 $ hg topic |
491 $ hg topic |
492 * mytopic (2 changesets) |
492 * mytopic (2 changesets) |
|
493 |
|
494 Test split the first commit on a branch |
|
495 |
|
496 $ touch SPLIT1 SPLIT2 |
|
497 $ hg add SPLIT1 SPLIT2 |
|
498 $ hg branch another-branch |
|
499 marked working directory as branch another-branch |
|
500 $ hg commit -m "To be splitted" |
|
501 $ hg log -G -l 3 |
|
502 @ changeset: 24:8dad923bdb9b |
|
503 | branch: another-branch |
|
504 | tag: tip |
|
505 | topic: mytopic |
|
506 | user: test |
|
507 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
508 | summary: To be splitted |
|
509 | |
|
510 o changeset: 23:2532b288af61 |
|
511 | branch: new-branch |
|
512 | topic: mytopic |
|
513 | user: test |
|
514 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
515 | summary: split8 |
|
516 | |
|
517 o changeset: 22:addcf498f19e |
|
518 | branch: new-branch |
|
519 ~ topic: mytopic |
|
520 parent: 20:fdb403258632 |
|
521 user: test |
|
522 date: Thu Jan 01 00:00:00 1970 +0000 |
|
523 summary: split7 |
|
524 |
|
525 $ hg export . |
|
526 # HG changeset patch |
|
527 # User test |
|
528 # Date 0 0 |
|
529 # Thu Jan 01 00:00:00 1970 +0000 |
|
530 # Branch another-branch |
|
531 # Node ID 8dad923bdb9bb3b99291caa5baeb03bbc30dfd33 |
|
532 # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 |
|
533 # EXP-Topic mytopic |
|
534 To be splitted |
|
535 |
|
536 diff --git a/SPLIT1 b/SPLIT1 |
|
537 new file mode 100644 |
|
538 diff --git a/SPLIT2 b/SPLIT2 |
|
539 new file mode 100644 |
|
540 |
|
541 $ hg split -r . << EOF |
|
542 > Y |
|
543 > N |
|
544 > N |
|
545 > Y |
|
546 > EOF |
|
547 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
548 adding SPLIT1 |
|
549 adding SPLIT2 |
|
550 diff --git a/SPLIT1 b/SPLIT1 |
|
551 new file mode 100644 |
|
552 examine changes to 'SPLIT1'? [Ynesfdaq?] Y |
|
553 |
|
554 diff --git a/SPLIT2 b/SPLIT2 |
|
555 new file mode 100644 |
|
556 examine changes to 'SPLIT2'? [Ynesfdaq?] N |
|
557 |
|
558 Done splitting? [yN] N |
|
559 diff --git a/SPLIT2 b/SPLIT2 |
|
560 new file mode 100644 |
|
561 examine changes to 'SPLIT2'? [Ynesfdaq?] Y |
|
562 |
|
563 no more change to split |
|
564 |
|
565 The splitted changesets should be on the 'another-branch' |
|
566 $ hg log -G -l 3 |
|
567 @ changeset: 26:56a59faa8af7 |
|
568 | branch: another-branch |
|
569 | tag: tip |
|
570 | topic: mytopic |
|
571 | user: test |
|
572 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
573 | summary: split10 |
|
574 | |
|
575 o changeset: 25:75695e3e2300 |
|
576 | branch: another-branch |
|
577 | topic: mytopic |
|
578 | parent: 23:2532b288af61 |
|
579 | user: test |
|
580 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
581 | summary: split9 |
|
582 | |
|
583 o changeset: 23:2532b288af61 |
|
584 | branch: new-branch |
|
585 ~ topic: mytopic |
|
586 user: test |
|
587 date: Thu Jan 01 00:00:00 1970 +0000 |
|
588 summary: split8 |
|
589 |
|
590 |
|
591 Try splitting the first changeset of a branch then cancel |
|
592 |
|
593 $ hg branch yet-another-branch |
|
594 marked working directory as branch yet-another-branch |
|
595 $ touch SPLIT3 SPLIT4 |
|
596 $ hg add SPLIT3 SPLIT4 |
|
597 $ hg commit -m "To be splitted again" |
|
598 |
|
599 $ hg up "tip~1" |
|
600 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
601 |
|
602 $ hg log -G -l 2 |
|
603 o changeset: 27:b1020d17c364 |
|
604 | branch: yet-another-branch |
|
605 | tag: tip |
|
606 | topic: mytopic |
|
607 | user: test |
|
608 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
609 | summary: To be splitted again |
|
610 | |
|
611 @ changeset: 26:56a59faa8af7 |
|
612 | branch: another-branch |
|
613 ~ topic: mytopic |
|
614 user: test |
|
615 date: Thu Jan 01 00:00:00 1970 +0000 |
|
616 summary: split10 |
|
617 |
|
618 $ hg branch |
|
619 another-branch |
|
620 |
|
621 $ hg split -r tip << EOF |
|
622 > Y |
|
623 > q |
|
624 > EOF |
|
625 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
626 adding SPLIT3 |
|
627 adding SPLIT4 |
|
628 diff --git a/SPLIT3 b/SPLIT3 |
|
629 new file mode 100644 |
|
630 examine changes to 'SPLIT3'? [Ynesfdaq?] Y |
|
631 |
|
632 diff --git a/SPLIT4 b/SPLIT4 |
|
633 new file mode 100644 |
|
634 examine changes to 'SPLIT4'? [Ynesfdaq?] q |
|
635 |
|
636 abort: user quit |
|
637 [255] |
|
638 |
|
639 $ hg branch |
|
640 another-branch |
|
641 |
|
642 $ hg log -G -l 2 |
|
643 o changeset: 27:b1020d17c364 |
|
644 | branch: yet-another-branch |
|
645 | tag: tip |
|
646 | topic: mytopic |
|
647 | user: test |
|
648 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
649 | summary: To be splitted again |
|
650 | |
|
651 @ changeset: 26:56a59faa8af7 |
|
652 | branch: another-branch |
|
653 ~ topic: mytopic |
|
654 user: test |
|
655 date: Thu Jan 01 00:00:00 1970 +0000 |
|
656 summary: split10 |
|
657 |