mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
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
This commit is contained in:
parent
4a1873b535
commit
8ad49ae972
@ -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 <<EOF
|
||||
> [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 <<EOF
|
||||
> [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 ..
|
49
tests/test-rebase-transaction.t
Normal file
49
tests/test-rebase-transaction.t
Normal file
@ -0,0 +1,49 @@
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [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 <<EOF
|
||||
> [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 ..
|
Loading…
Reference in New Issue
Block a user