summaryrefslogtreecommitdiff
path: root/tests/test-rebase-detach.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-rebase-detach.t')
-rw-r--r--tests/test-rebase-detach.t163
1 files changed, 23 insertions, 140 deletions
diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t
index cacc754..35ce8f0 100644
--- a/tests/test-rebase-detach.t
+++ b/tests/test-rebase-detach.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -13,7 +10,7 @@
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -47,26 +44,25 @@ Rebasing D onto H detaching from C:
|/
o 0: 'A'
- $ hg phase --force --secret 3
- $ hg rebase -s 3 -d 7
+ $ hg rebase --detach -s 3 -d 7
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 7:secret 'D'
+ $ hg tglog
+ @ 7: 'D'
|
- o 6:draft 'H'
+ o 6: 'H'
|
- | o 5:draft 'G'
+ | o 5: 'G'
|/|
- o | 4:draft 'F'
+ o | 4: 'F'
| |
- | o 3:draft 'E'
+ | o 3: 'E'
|/
- | o 2:draft 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg manifest
A
@@ -99,7 +95,7 @@ Rebasing C onto H detaching from B:
|/
o 0: 'A'
- $ hg rebase -s 2 -d 7
+ $ hg rebase --detach -s 2 -d 7
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -151,7 +147,7 @@ Rebasing B onto H using detach (same as not using it):
|/
o 0: 'A'
- $ hg rebase -s 1 -d 7
+ $ hg rebase --detach -s 1 -d 7
saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -186,7 +182,6 @@ Rebasing C onto H detaching from B and collapsing:
$ hg clone -q -u . a a4
$ cd a4
- $ hg phase --force --secret 3
$ hg tglog
@ 7: 'H'
@@ -205,24 +200,24 @@ Rebasing C onto H detaching from B and collapsing:
|/
o 0: 'A'
- $ hg rebase --collapse -s 2 -d 7
+ $ hg rebase --detach --collapse -s 2 -d 7
saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 6:secret 'Collapsed revision
+ $ hg tglog
+ @ 6: 'Collapsed revision
| * C
| * D'
- o 5:draft 'H'
+ o 5: 'H'
|
- | o 4:draft 'G'
+ | o 4: 'G'
|/|
- o | 3:draft 'F'
+ o | 3: 'F'
| |
- | o 2:draft 'E'
+ | o 2: 'E'
|/
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg manifest
A
@@ -264,7 +259,7 @@ Rebasing across null as ancestor
|/
o 0: 'A'
- $ hg rebase -s 1 -d tip
+ $ hg rebase --detach -s 1 -d tip
saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -286,115 +281,3 @@ Rebasing across null as ancestor
|/
o 0: 'A'
-
- $ hg rebase -d 5 -s 7
- saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-backup.hg (glob)
- $ hg tglog
- @ 8: 'D'
- |
- o 7: 'C'
- |
- | o 6: 'B'
- |/
- o 5: 'extra branch'
-
- o 4: 'H'
- |
- | o 3: 'G'
- |/|
- o | 2: 'F'
- | |
- | o 1: 'E'
- |/
- o 0: 'A'
-
- $ cd ..
-
-Verify that target is not selected as external rev (issue3085)
-
- $ hg clone -q -U a a6
- $ cd a6
- $ hg up -q 6
-
- $ echo "I" >> E
- $ hg ci -m "I"
- $ hg merge 7
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m "Merge"
- $ echo "J" >> F
- $ hg ci -m "J"
-
- $ hg rebase -s 8 -d 7 --collapse --config ui.merge=internal:other
- remote changed E which local deleted
- use (c)hanged version or leave (d)eleted? c
- saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 8: 'Collapsed revision
- | * I
- | * Merge
- | * J'
- o 7: 'H'
- |
- | o 6: 'G'
- |/|
- o | 5: 'F'
- | |
- | o 4: 'E'
- |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
- $ hg parents
- changeset: 8:9472f4b1d736
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: Collapsed revision
-
-
- $ cd ..
-
-Ensure --continue restores a correct state (issue3046) and phase:
- $ hg clone -q a a7
- $ cd a7
- $ hg up -q 3
- $ echo 'H2' > H
- $ hg ci -A -m 'H2'
- adding H
- $ hg phase --force --secret 8
- $ hg rebase -s 8 -d 7 --config ui.merge=internal:fail
- merging H
- warning: conflicts during merge.
- merging H incomplete! (edit conflicts, then use 'hg resolve --mark')
- abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
- [255]
- $ hg resolve --all -t internal:local
- $ hg rebase -c
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 7:draft 'H'
- |
- | o 6:draft 'G'
- |/|
- o | 5:draft 'F'
- | |
- | o 4:draft 'E'
- |/
- | o 3:draft 'D'
- | |
- | o 2:draft 'C'
- | |
- | o 1:draft 'B'
- |/
- o 0:draft 'A'
-
-
- $ cd ..