483 |
485 |
484 $ touch SPLIT1 SPLIT2 |
486 $ touch SPLIT1 SPLIT2 |
485 $ hg add SPLIT1 SPLIT2 |
487 $ hg add SPLIT1 SPLIT2 |
486 $ hg branch another-branch |
488 $ hg branch another-branch |
487 marked working directory as branch another-branch |
489 marked working directory as branch another-branch |
488 $ hg commit -m "To be splitted" |
490 $ hg commit -m "To be split" |
489 $ hg log -G -l 3 |
491 $ hg log -G -l 3 |
490 @ changeset: 21:8dad923bdb9b |
492 @ changeset: 21:b6bf93dd314b |
491 | branch: another-branch |
493 | branch: another-branch |
492 | tag: tip |
494 | tag: tip |
493 | topic: mytopic |
495 | topic: mytopic |
494 | user: test |
496 | user: test |
495 | date: Thu Jan 01 00:00:00 1970 +0000 |
497 | date: Thu Jan 01 00:00:00 1970 +0000 |
496 | summary: To be splitted |
498 | summary: To be split |
497 | |
499 | |
498 o changeset: 20:2532b288af61 |
500 o changeset: 20:2532b288af61 |
499 | branch: new-branch |
501 | branch: new-branch |
500 | topic: mytopic |
502 | topic: mytopic |
501 | user: test |
503 | user: test |
514 # HG changeset patch |
516 # HG changeset patch |
515 # User test |
517 # User test |
516 # Date 0 0 |
518 # Date 0 0 |
517 # Thu Jan 01 00:00:00 1970 +0000 |
519 # Thu Jan 01 00:00:00 1970 +0000 |
518 # Branch another-branch |
520 # Branch another-branch |
519 # Node ID 8dad923bdb9bb3b99291caa5baeb03bbc30dfd33 |
521 # Node ID b6bf93dd314ba47b838befc7488b2223981684ea |
520 # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 |
522 # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 |
521 # EXP-Topic mytopic |
523 # EXP-Topic mytopic |
522 To be splitted |
524 To be split |
523 |
525 |
524 diff --git a/SPLIT1 b/SPLIT1 |
526 diff --git a/SPLIT1 b/SPLIT1 |
525 new file mode 100644 |
527 new file mode 100644 |
526 diff --git a/SPLIT2 b/SPLIT2 |
528 diff --git a/SPLIT2 b/SPLIT2 |
527 new file mode 100644 |
529 new file mode 100644 |
548 new file mode 100644 |
550 new file mode 100644 |
549 examine changes to 'SPLIT2'? [Ynesfdaq?] Y |
551 examine changes to 'SPLIT2'? [Ynesfdaq?] Y |
550 |
552 |
551 no more change to split |
553 no more change to split |
552 |
554 |
553 The splitted changesets should be on the 'another-branch' |
555 The split changesets should be on the 'another-branch' |
554 $ hg log -G -l 3 |
556 $ hg log -G -l 3 |
555 @ changeset: 23:56a59faa8af7 |
557 @ changeset: 23:56a59faa8af7 |
556 | branch: another-branch |
558 | branch: another-branch |
557 | tag: tip |
559 | tag: tip |
558 | topic: mytopic |
560 | topic: mytopic |
580 |
582 |
581 $ hg branch yet-another-branch |
583 $ hg branch yet-another-branch |
582 marked working directory as branch yet-another-branch |
584 marked working directory as branch yet-another-branch |
583 $ touch SPLIT3 SPLIT4 |
585 $ touch SPLIT3 SPLIT4 |
584 $ hg add SPLIT3 SPLIT4 |
586 $ hg add SPLIT3 SPLIT4 |
585 $ hg commit -m "To be splitted again" |
587 $ hg commit -m "To be split again" |
586 |
588 |
587 $ hg up "tip~1" |
589 $ hg up "tip~1" |
588 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
590 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
589 |
591 |
590 $ hg log -G -l 2 |
592 $ hg log -G -l 2 |
591 o changeset: 24:b1020d17c364 |
593 o changeset: 24:9f56497dbac1 |
592 | branch: yet-another-branch |
594 | branch: yet-another-branch |
593 | tag: tip |
595 | tag: tip |
594 | topic: mytopic |
596 | topic: mytopic |
595 | user: test |
597 | user: test |
596 | date: Thu Jan 01 00:00:00 1970 +0000 |
598 | date: Thu Jan 01 00:00:00 1970 +0000 |
597 | summary: To be splitted again |
599 | summary: To be split again |
598 | |
600 | |
599 @ changeset: 23:56a59faa8af7 |
601 @ changeset: 23:56a59faa8af7 |
600 | branch: another-branch |
602 | branch: another-branch |
601 ~ topic: mytopic |
603 ~ topic: mytopic |
602 user: test |
604 user: test |
626 |
628 |
627 $ hg branch |
629 $ hg branch |
628 another-branch |
630 another-branch |
629 |
631 |
630 $ hg log -G -l 2 |
632 $ hg log -G -l 2 |
631 o changeset: 24:b1020d17c364 |
633 o changeset: 24:9f56497dbac1 |
632 | branch: yet-another-branch |
634 | branch: yet-another-branch |
633 | tag: tip |
635 | tag: tip |
634 | topic: mytopic |
636 | topic: mytopic |
635 | user: test |
637 | user: test |
636 | date: Thu Jan 01 00:00:00 1970 +0000 |
638 | date: Thu Jan 01 00:00:00 1970 +0000 |
637 | summary: To be splitted again |
639 | summary: To be split again |
638 | |
640 | |
639 @ changeset: 23:56a59faa8af7 |
641 @ changeset: 23:56a59faa8af7 |
640 | branch: another-branch |
642 | branch: another-branch |
641 ~ topic: mytopic |
643 ~ topic: mytopic |
642 user: test |
644 user: test |
1117 | |
1119 | |
1118 o 3:88437e073cd4 split1 (draft) |
1120 o 3:88437e073cd4 split1 (draft) |
1119 | |
1121 | |
1120 o 0:a5a1faba8d26 p (draft) |
1122 o 0:a5a1faba8d26 p (draft) |
1121 |
1123 |
|
1124 $ cd .. |
|
1125 |
|
1126 Testing that `hg split` preserve the phase of splitting cset(issue6048) |
|
1127 ----------------------------------------------------------------------- |
|
1128 |
|
1129 Prepare the repository: |
|
1130 $ hg init issue6048 |
|
1131 $ cd issue6048 |
|
1132 $ echo a > a |
|
1133 $ hg ci -Am "added a" |
|
1134 adding a |
|
1135 |
|
1136 $ echo b > b |
|
1137 $ echo c > c |
|
1138 $ hg add b c |
|
1139 $ hg ci -m "added b c" --secret |
|
1140 |
|
1141 $ hg glog -l1 -p --git |
|
1142 @ 1:12e9cc39ba19 added b c (secret) |
|
1143 | diff --git a/b b/b |
|
1144 ~ new file mode 100644 |
|
1145 --- /dev/null |
|
1146 +++ b/b |
|
1147 @@ -0,0 +1,1 @@ |
|
1148 +b |
|
1149 diff --git a/c b/c |
|
1150 new file mode 100644 |
|
1151 --- /dev/null |
|
1152 +++ b/c |
|
1153 @@ -0,0 +1,1 @@ |
|
1154 +c |
|
1155 |
|
1156 To create commits with the number of split |
|
1157 $ echo 0 > num |
|
1158 $ cat > editor.sh << '__EOF__' |
|
1159 > NUM=$(cat num) |
|
1160 > NUM=`expr "$NUM" + 1` |
|
1161 > echo "$NUM" > num |
|
1162 > echo "split$NUM" > "$1" |
|
1163 > __EOF__ |
|
1164 $ export HGEDITOR="\"sh\" \"editor.sh\"" |
|
1165 |
|
1166 Splitting |
|
1167 $ hg split -r . << EOF |
|
1168 > y |
|
1169 > y |
|
1170 > n |
|
1171 > c |
|
1172 > EOF |
|
1173 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1174 adding b |
|
1175 adding c |
|
1176 diff --git a/b b/b |
|
1177 new file mode 100644 |
|
1178 examine changes to 'b'? [Ynesfdaq?] y |
|
1179 |
|
1180 @@ -0,0 +1,1 @@ |
|
1181 +b |
|
1182 record change 1/2 to 'b'? [Ynesfdaq?] y |
|
1183 |
|
1184 diff --git a/c b/c |
|
1185 new file mode 100644 |
|
1186 examine changes to 'c'? [Ynesfdaq?] n |
|
1187 |
|
1188 created new head |
|
1189 (consider using topic for lightweight branches. See 'hg help topic') |
|
1190 continue splitting? [Ycdq?] c |
|
1191 |
|
1192 $ hg glog --git -p |
|
1193 @ 3:1f8c09b13fa2 split2 (secret) |
|
1194 | diff --git a/c b/c |
|
1195 | new file mode 100644 |
|
1196 | --- /dev/null |
|
1197 | +++ b/c |
|
1198 | @@ -0,0 +1,1 @@ |
|
1199 | +c |
|
1200 | |
|
1201 o 2:bcba06966846 split1 (secret) |
|
1202 | diff --git a/b b/b |
|
1203 | new file mode 100644 |
|
1204 | --- /dev/null |
|
1205 | +++ b/b |
|
1206 | @@ -0,0 +1,1 @@ |
|
1207 | +b |
|
1208 | |
|
1209 o 0:9092f1db7931 added a (draft) |
|
1210 diff --git a/a b/a |
|
1211 new file mode 100644 |
|
1212 --- /dev/null |
|
1213 +++ b/a |
|
1214 @@ -0,0 +1,1 @@ |
|
1215 +a |
|
1216 |