diff -r 2cbb9914d227 -r 7a779a288793 tests/test-split.t --- a/tests/test-split.t Tue Jan 22 12:54:43 2019 -0500 +++ b/tests/test-split.t Thu Apr 11 22:41:41 2019 +0200 @@ -19,6 +19,8 @@ > [diff] > git = 1 > unified = 0 + > [commands] + > commit.interactive.unified = 0 > [ui] > interactive = true > [extensions] @@ -485,15 +487,15 @@ $ hg add SPLIT1 SPLIT2 $ hg branch another-branch marked working directory as branch another-branch - $ hg commit -m "To be splitted" + $ hg commit -m "To be split" $ hg log -G -l 3 - @ changeset: 21:8dad923bdb9b + @ changeset: 21:b6bf93dd314b | branch: another-branch | tag: tip | topic: mytopic | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: To be splitted + | summary: To be split | o changeset: 20:2532b288af61 | branch: new-branch @@ -516,10 +518,10 @@ # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch another-branch - # Node ID 8dad923bdb9bb3b99291caa5baeb03bbc30dfd33 + # Node ID b6bf93dd314ba47b838befc7488b2223981684ea # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 # EXP-Topic mytopic - To be splitted + To be split diff --git a/SPLIT1 b/SPLIT1 new file mode 100644 @@ -550,7 +552,7 @@ no more change to split -The splitted changesets should be on the 'another-branch' +The split changesets should be on the 'another-branch' $ hg log -G -l 3 @ changeset: 23:56a59faa8af7 | branch: another-branch @@ -582,19 +584,19 @@ marked working directory as branch yet-another-branch $ touch SPLIT3 SPLIT4 $ hg add SPLIT3 SPLIT4 - $ hg commit -m "To be splitted again" + $ hg commit -m "To be split again" $ hg up "tip~1" 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg log -G -l 2 - o changeset: 24:b1020d17c364 + o changeset: 24:9f56497dbac1 | branch: yet-another-branch | tag: tip | topic: mytopic | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: To be splitted again + | summary: To be split again | @ changeset: 23:56a59faa8af7 | branch: another-branch @@ -628,13 +630,13 @@ another-branch $ hg log -G -l 2 - o changeset: 24:b1020d17c364 + o changeset: 24:9f56497dbac1 | branch: yet-another-branch | tag: tip | topic: mytopic | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: To be splitted again + | summary: To be split again | @ changeset: 23:56a59faa8af7 | branch: another-branch @@ -1119,3 +1121,96 @@ | o 0:a5a1faba8d26 p (draft) + $ cd .. + +Testing that `hg split` preserve the phase of splitting cset(issue6048) +----------------------------------------------------------------------- + +Prepare the repository: + $ hg init issue6048 + $ cd issue6048 + $ echo a > a + $ hg ci -Am "added a" + adding a + + $ echo b > b + $ echo c > c + $ hg add b c + $ hg ci -m "added b c" --secret + + $ hg glog -l1 -p --git + @ 1:12e9cc39ba19 added b c (secret) + | diff --git a/b b/b + ~ new file mode 100644 + --- /dev/null + +++ b/b + @@ -0,0 +1,1 @@ + +b + diff --git a/c b/c + new file mode 100644 + --- /dev/null + +++ b/c + @@ -0,0 +1,1 @@ + +c + +To create commits with the number of split + $ echo 0 > num + $ cat > editor.sh << '__EOF__' + > NUM=$(cat num) + > NUM=`expr "$NUM" + 1` + > echo "$NUM" > num + > echo "split$NUM" > "$1" + > __EOF__ + $ export HGEDITOR="\"sh\" \"editor.sh\"" + +Splitting + $ hg split -r . << EOF + > y + > y + > n + > c + > EOF + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + adding b + adding c + diff --git a/b b/b + new file mode 100644 + examine changes to 'b'? [Ynesfdaq?] y + + @@ -0,0 +1,1 @@ + +b + record change 1/2 to 'b'? [Ynesfdaq?] y + + diff --git a/c b/c + new file mode 100644 + examine changes to 'c'? [Ynesfdaq?] n + + created new head + (consider using topic for lightweight branches. See 'hg help topic') + continue splitting? [Ycdq?] c + + $ hg glog --git -p + @ 3:1f8c09b13fa2 split2 (secret) + | diff --git a/c b/c + | new file mode 100644 + | --- /dev/null + | +++ b/c + | @@ -0,0 +1,1 @@ + | +c + | + o 2:bcba06966846 split1 (secret) + | diff --git a/b b/b + | new file mode 100644 + | --- /dev/null + | +++ b/b + | @@ -0,0 +1,1 @@ + | +b + | + o 0:9092f1db7931 added a (draft) + diff --git a/a b/a + new file mode 100644 + --- /dev/null + +++ b/a + @@ -0,0 +1,1 @@ + +a +