From 8ad49ae9728c26147dd5e8c1395b8bced640327f Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Thu, 5 Oct 2017 20:41:50 -0700 Subject: [PATCH] test-rebase-base: clarify it is about the "--base" flag It happened several times that people use `test-rebase-base.t` as a general purposed test file for rebase. But it is intended to be only related to the `--base` flag. This patch split, renamed the test, and added a note to clarify. Differential Revision: https://phab.mercurial-scm.org/D975 --- ...-rebase-base.t => test-rebase-base-flag.t} | 40 ++------------- tests/test-rebase-transaction.t | 49 +++++++++++++++++++ 2 files changed, 52 insertions(+), 37 deletions(-) rename tests/{test-rebase-base.t => test-rebase-base-flag.t} (91%) create mode 100644 tests/test-rebase-transaction.t diff --git a/tests/test-rebase-base.t b/tests/test-rebase-base-flag.t similarity index 91% rename from tests/test-rebase-base.t rename to tests/test-rebase-base-flag.t index b85a23f7ac..2b59b5f0f3 100644 --- a/tests/test-rebase-base.t +++ b/tests/test-rebase-base-flag.t @@ -1,3 +1,6 @@ +Test the "--base" flag of the rebase command. (Tests unrelated to the "--base" +flag should probably live in somewhere else) + $ cat >> $HGRCPATH < [extensions] > rebase= @@ -379,40 +382,3 @@ Multiple roots. Two children share two parents while dest has only one parent: / o 0: A -Rebasing using a single transaction - - $ hg init singletr && cd singletr - $ cat >> .hg/hgrc < [rebase] - > singletransaction=True - > EOF - $ hg debugdrawdag <<'EOF' - > Z - > | - > | D - > | | - > | C - > | | - > Y B - > |/ - > A - > EOF -- We should only see two status stored messages. One from the start, one from -- the end. - $ hg rebase --debug -b D -d Z | grep 'status stored' - rebase status stored - rebase status stored - $ hg tglog - o 5: D - | - o 4: C - | - o 3: B - | - o 2: Z - | - o 1: Y - | - o 0: A - - $ cd .. diff --git a/tests/test-rebase-transaction.t b/tests/test-rebase-transaction.t new file mode 100644 index 0000000000..5dfdce7359 --- /dev/null +++ b/tests/test-rebase-transaction.t @@ -0,0 +1,49 @@ + $ cat >> $HGRCPATH < [extensions] + > rebase= + > drawdag=$TESTDIR/drawdag.py + > + > [phases] + > publish=False + > + > [alias] + > tglog = log -G --template "{rev}: {desc}" + > EOF + +Rebasing using a single transaction + + $ hg init singletr && cd singletr + $ cat >> .hg/hgrc < [rebase] + > singletransaction=True + > EOF + $ hg debugdrawdag <<'EOF' + > Z + > | + > | D + > | | + > | C + > | | + > Y B + > |/ + > A + > EOF +- We should only see two status stored messages. One from the start, one from +- the end. + $ hg rebase --debug -b D -d Z | grep 'status stored' + rebase status stored + rebase status stored + $ hg tglog + o 5: D + | + o 4: C + | + o 3: B + | + o 2: Z + | + o 1: Y + | + o 0: A + + $ cd ..