annotate tests/test-rebase-collapse.t @ 23196:daa73289dd2a

test-status-rev: use same names as from generate-working-copy-states To prepare for using generate-working-copy-states.py for generating the files and their content, let's start by renaming the files according to the naming scheme used by that script.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 20 Oct 2014 23:56:55 -0700
parents dfa44e25bb53
children 328afbad6e57
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
1 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
2 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
3 > rebase=
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
4 > mq=
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
5 >
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
6 > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
7 > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
8 >
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
9 > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
10 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
11 > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
12 > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10762
diff changeset
13
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
14 Create repo a:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
15
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
16 $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
17 $ cd a
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15990
diff changeset
18 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
19 adding changesets
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
20 adding manifests
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
21 adding file changes
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
22 added 8 changesets with 7 changes to 7 files (+2 heads)
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
23 (run 'hg heads' to see heads, 'hg merge' to merge)
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
24 $ hg up tip
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
25 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
26
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
27 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
28 @ 7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
29 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
30 | o 6: 'G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
31 |/|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
32 o | 5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
33 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
34 | o 4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
35 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
36 | o 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
37 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
38 | o 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
39 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
40 | o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
41 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
42 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
43
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
44 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
45
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
46
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
47 Rebasing B onto H and collapsing changesets with different phases:
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
48
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
49
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
50 $ hg clone -q -u 3 a a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
51 $ cd a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
52
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
53 $ hg phase --force --secret 3
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
54
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
55 $ cat > $TESTTMP/editor.sh <<EOF
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
56 > echo "==== before editing"
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
57 > cat \$1
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
58 > echo "===="
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
59 > echo "edited manually" >> \$1
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
60 > EOF
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
61 $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
62 ==== before editing
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
63 Collapsed revision
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
64 * B
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
65 * C
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
66 * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
67
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
68
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
69 HG: Enter commit message. Lines beginning with 'HG:' are removed.
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
70 HG: Leave message empty to abort commit.
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
71 HG: --
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
72 HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
73 HG: branch 'default'
22895
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
74 HG: added B
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
75 HG: added C
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
76 HG: added D
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
77 ====
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
78 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
79
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
80 $ hg tglogp
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
81 @ 5:secret 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
82 | * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
83 | * C
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
84 | * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
85 |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
86 |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
87 | edited manually'
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
88 o 4:draft 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
89 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
90 | o 3:draft 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
91 |/|
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
92 o | 2:draft 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
93 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
94 | o 1:draft 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
95 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
96 o 0:draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
97
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
98 $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
99 A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
100 B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
101 C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
102 D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
103 F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
104 H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
105
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
106 $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
107
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
108
15267
3bfdfefea2fc rebase: use revset as soon as possible in internal logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14897
diff changeset
109 Rebasing E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
110
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
111 $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
112 $ cd a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
113
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
114 $ hg phase --force --secret 6
15267
3bfdfefea2fc rebase: use revset as soon as possible in internal logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14897
diff changeset
115 $ hg rebase --source 4 --collapse
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
116 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
117
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
118 $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
119 o 6: 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
120 | * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
121 | * G'
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
122 @ 5: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
123 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
124 o 4: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
125 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
126 | o 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
127 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
128 | o 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
129 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
130 | o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
131 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
132 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
133
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
134 $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
135 A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
136 E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
137 F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
138 H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
139
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
140 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
141
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
142 Rebasing G onto H with custom message:
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
143
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
144 $ hg clone -q -u . a a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
145 $ cd a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
146
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
147 $ hg rebase --base 6 -m 'custom message'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
148 abort: message can only be specified with collapse
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
149 [255]
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
150
22206
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
151 $ cat > $TESTTMP/checkeditform.sh <<EOF
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
152 > env | grep HGEDITFORM
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
153 > true
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
154 > EOF
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
155 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
156 HGEDITFORM=rebase.collapse
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
157 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
158
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
159 $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
160 o 6: 'custom message'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
161 |
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
162 @ 5: 'H'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
163 |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
164 o 4: 'F'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
165 |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
166 | o 3: 'D'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
167 | |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
168 | o 2: 'C'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
169 | |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
170 | o 1: 'B'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
171 |/
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
172 o 0: 'A'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
173
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
174 $ hg manifest --rev tip
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
175 A
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
176 E
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
177 F
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
178 H
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
179
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
180 $ cd ..
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
181
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
182 Create repo b:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
183
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
184 $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
185 $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
186
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
187 $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
188 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
189 adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
190 $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
191 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
192 adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
193
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
194 $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
195
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
196 $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
197 $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
198 adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
199 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
200
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
201 $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
202 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
203 (branch merge, don't forget to commit)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
204
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
205 $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
206 $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
207 adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
208
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
209 $ hg up -q 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
210
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
211 $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
212 $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
213 adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
214 created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
215
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
216 $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
217 $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
218 adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
219
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
220 $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
221 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
222 (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
223 $ hg ci -m G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
224
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
225 $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
226
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
227 $ echo H > H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
228 $ hg ci -Am H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
229 adding H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
230 created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
231
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
232 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
233 @ 7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
234 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
235 | o 6: 'G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
236 | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
237 | | o 5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
238 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
239 | | o 4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
240 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
241 | o | 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
242 | |\|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
243 | o | 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
244 |/ /
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
245 | o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
246 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
247 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
248
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
249 $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
250
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
251
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
252 Rebase and collapse - more than one external (fail):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
253
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
254 $ hg clone -q -u . b b1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
255 $ cd b1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
256
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
257 $ hg rebase -s 2 --collapse
19956
78ab0f85e249 rebase: improve error message for more than one external parent
Mads Kiilerich <madski@unity3d.com>
parents: 19925
diff changeset
258 abort: unable to collapse on top of 7, there is more than one external parent: 1, 5
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
259 [255]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
260
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
261 Rebase and collapse - E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
262
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16714
diff changeset
263 $ hg rebase -s 4 --collapse # root (4) is not a merge
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
264 saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
265
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
266 $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
267 o 5: 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
268 |\ * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
269 | | * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
270 | | * G'
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
271 | @ 4: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
272 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
273 o | 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
274 |\ \
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
275 | o | 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
276 | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
277 o / 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
278 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
279 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
280
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
281 $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
282 A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
283 C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
284 D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
285 E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
286 F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
287 H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
288
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
289 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
290
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
291
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
292
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
293
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
294 Test that branchheads cache is updated correctly when doing a strip in which
18395
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
295 the parent of the ancestor node to be stripped does not become a head and also,
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
296 the parent of a node that is a child of the node stripped becomes a head (node
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
297 3). The code is now much simpler and we could just test a simpler scenario
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
298 We keep it the test this way in case new complexity is injected.
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
299
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
300 $ hg clone -q -u . b b2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
301 $ cd b2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
302
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
303 $ hg heads --template="{rev}:{node} {branch}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
304 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
305 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
306
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
307 $ cat $TESTTMP/b2/.hg/cache/branch2-served
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
308 c65502d4178782309ce0574c5ae6ee9485a9bafa 7
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
309 c772a8b2dc17629cec88a19d09c926c4814b12c7 o default
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
310 c65502d4178782309ce0574c5ae6ee9485a9bafa o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
311
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
312 $ hg strip 4
17030
ec5ef276077f tests: add missing 'backup bundle' path glob in test-rebase-collapse.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17013
diff changeset
313 saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
314
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
315 $ cat $TESTTMP/b2/.hg/cache/branch2-served
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
316 c65502d4178782309ce0574c5ae6ee9485a9bafa 4
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
317 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
318 c65502d4178782309ce0574c5ae6ee9485a9bafa o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
319
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
320 $ hg heads --template="{rev}:{node} {branch}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
321 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
322 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
323
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
324 $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
325
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
326
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
327
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
328
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
329
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
330
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
331 Create repo c:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
332
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
333 $ hg init c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
334 $ cd c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
335
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
336 $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
337 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
338 adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
339 $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
340 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
341 adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
342
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
343 $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
344
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
345 $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
346 $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
347 adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
348 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
349
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
350 $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
351 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
352 (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
353
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
354 $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
355 $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
356 adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
357
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
358 $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
359
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
360 $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
361 $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
362 adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
363 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
364 $ echo F > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
365 $ hg ci -m 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
366
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
367 $ echo G > G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
368 $ hg ci -Am G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
369 adding G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
370
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
371 $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
372 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
373 (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
374
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
375 $ hg ci -m H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
376
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
377 $ hg up -q 0
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
378
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
379 $ echo I > I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
380 $ hg ci -Am I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
381 adding I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
382 created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
383
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
384 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
385 @ 8: 'I'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
386 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
387 | o 7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
388 | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
389 | | o 6: 'G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
390 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
391 | | o 5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
392 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
393 | | o 4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
394 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
395 | o | 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
396 | |\|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
397 | o | 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
398 |/ /
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
399 | o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
400 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
401 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
402
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
403 $ cd ..
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
404
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
405
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
406 Rebase and collapse - E onto I:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
407
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
408 $ hg clone -q -u . c c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
409 $ cd c1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
410
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16714
diff changeset
411 $ hg rebase -s 4 --collapse # root (4) is not a merge
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
412 merging E
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
413 saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
414
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
415 $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
416 o 5: 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
417 |\ * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
418 | | * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
419 | | * G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
420 | | * H'
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
421 | @ 4: 'I'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
422 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
423 o | 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
424 |\ \
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
425 | o | 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
426 | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
427 o / 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
428 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
429 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
430
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
431 $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
432 A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
433 C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
434 D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
435 E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
436 G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
437 I
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
438
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
439 $ hg up tip -q
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
440 $ cat E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
441 F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
442
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
443 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
444
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
445
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
446 Create repo d:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
447
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
448 $ hg init d
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
449 $ cd d
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
450
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
451 $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
452 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
453 adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
454 $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
455 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
456 adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
457 $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
458 $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
459 adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
460
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
461 $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
462
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
463 $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
464 $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
465 adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
466 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
467 $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
468 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
469 (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
470
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
471 $ hg ci -m E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
472
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
473 $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
474
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
475 $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
476 $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
477 adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
478 created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
479
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
480 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
481 @ 5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
482 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
483 | o 4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
484 | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
485 | | o 3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
486 | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
487 | o | 2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
488 | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
489 | o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
490 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
491 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
492
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
493 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
494
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
495
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
496 Rebase and collapse - B onto F:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
497
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
498 $ hg clone -q -u . d d1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
499 $ cd d1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
500
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
501 $ hg rebase -s 1 --collapse
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
502 saved backup bundle to $TESTTMP/d1/.hg/strip-backup/*-backup.hg (glob)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
503
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
504 $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
505 o 2: 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
506 | * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
507 | * C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
508 | * D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
509 | * E'
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19924
diff changeset
510 @ 1: 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
511 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
512 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
513
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
514 $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
515 A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
516 B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
517 C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
518 D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
519 F
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
520
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
521 Interactions between collapse and keepbranches
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
522 $ cd ..
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
523 $ hg init e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
524 $ cd e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
525 $ echo 'a' > a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
526 $ hg ci -Am 'A'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
527 adding a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
528
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
529 $ hg branch 'one'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
530 marked working directory as branch one
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
531 (branches are permanent and global, did you want a bookmark?)
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
532 $ echo 'b' > b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
533 $ hg ci -Am 'B'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
534 adding b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
535
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
536 $ hg branch 'two'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
537 marked working directory as branch two
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
538 (branches are permanent and global, did you want a bookmark?)
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
539 $ echo 'c' > c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
540 $ hg ci -Am 'C'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
541 adding c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
542
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
543 $ hg up -q 0
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
544 $ echo 'd' > d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
545 $ hg ci -Am 'D'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
546 adding d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
547
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
548 $ hg tglog
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
549 @ 3: 'D'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
550 |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
551 | o 2: 'C' two
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
552 | |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
553 | o 1: 'B' one
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
554 |/
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
555 o 0: 'A'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
556
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
557 $ hg rebase --keepbranches --collapse -s 1 -d 3
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
558 abort: cannot collapse multiple named branches
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
559 [255]
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
560
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
561 $ repeatchange() {
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
562 > hg checkout $1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
563 > hg cp d z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
564 > echo blah >> z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
565 > hg commit -Am "$2" --user "$3"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
566 > }
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
567 $ repeatchange 3 "E" "user1"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
568 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
569 $ repeatchange 3 "E" "user2"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
570 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
571 created new head
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
572 $ hg tglog
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
573 @ 5: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
574 |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
575 | o 4: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
576 |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
577 o 3: 'D'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
578 |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
579 | o 2: 'C' two
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
580 | |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
581 | o 1: 'B' one
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
582 |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
583 o 0: 'A'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
584
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
585 $ hg rebase -s 5 -d 4
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
586 saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob)
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
587 $ hg tglog
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
588 @ 4: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
589 |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
590 o 3: 'D'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
591 |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
592 | o 2: 'C' two
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
593 | |
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
594 | o 1: 'B' one
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
595 |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
596 o 0: 'A'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
597
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
598 $ hg export tip
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
599 # HG changeset patch
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
600 # User user1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
601 # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18566
diff changeset
602 # Thu Jan 01 00:00:00 1970 +0000
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
603 # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
604 # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
605 E
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
606
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
607 diff -r 41acb9dca9eb -r f338eb3c2c7c z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
608 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
609 +++ b/z Thu Jan 01 00:00:00 1970 +0000
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
610 @@ -0,0 +1,2 @@
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
611 +d
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
612 +blah
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
613
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
614 $ cd ..
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
615
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
616 Rebase, collapse and copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
617
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
618 $ hg init copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
619 $ cd copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
620 $ hg unbundle "$TESTDIR/bundles/renames.hg"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
621 adding changesets
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
622 adding manifests
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
623 adding file changes
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
624 added 4 changesets with 11 changes to 7 files (+1 heads)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
625 (run 'hg heads' to see heads, 'hg merge' to merge)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
626 $ hg up -q tip
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
627 $ hg tglog
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
628 @ 3: 'move2'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
629 |
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
630 o 2: 'move1'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
631 |
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
632 | o 1: 'change'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
633 |/
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
634 o 0: 'add'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
635
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
636 $ hg rebase --collapse -d 1
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
637 merging a and d to d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
638 merging b and e to e
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
639 merging c and f to f
20945
18adc15635a1 merge: keep destination filename as key in filemerge actions
Mads Kiilerich <madski@unity3d.com>
parents: 20766
diff changeset
640 merging f and c to c
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
641 merging e and g to g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
642 saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
643 $ hg st
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
644 $ hg st --copies --change tip
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
645 A d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
646 a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
647 A g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
648 b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
649 R b
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
650 $ hg up tip -q
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
651 $ cat c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
652 c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
653 c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
654 $ cat d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
655 a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
656 a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
657 $ cat g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
658 b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
659 b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
660 $ hg log -r . --template "{file_copies}\n"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
661 d (a)g (b)
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
662
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
663 Test collapsing a middle revision in-place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
664
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
665 $ hg tglog
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
666 @ 2: 'Collapsed revision
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
667 | * move1
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
668 | * move2'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
669 o 1: 'change'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
670 |
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
671 o 0: 'add'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
672
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
673 $ hg rebase --collapse -r 1 -d 0
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
674 abort: can't remove original changesets with unrebased descendants
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
675 (use --keep to keep original changesets)
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
676 [255]
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
677
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
678 Test collapsing in place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
679
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
680 $ hg rebase --collapse -b . -d 0
16714
0a176990243c test-rebase-collapse: fix Windows path separator
Patrick Mezard <patrick@mezard.eu>
parents: 16696
diff changeset
681 saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
682 $ hg st --change tip --copies
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
683 M a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
684 M c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
685 A d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
686 a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
687 A g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
688 b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
689 R b
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
690 $ hg up tip -q
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
691 $ cat a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
692 a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
693 a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
694 $ cat c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
695 c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
696 c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
697 $ cat d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
698 a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
699 a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
700 $ cat g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
701 b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
702 b
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
703 $ cd ..
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
704
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
705
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
706 Test stripping a revision with another child
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
707
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
708 $ hg init f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
709 $ cd f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
710
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
711 $ echo A > A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
712 $ hg ci -Am A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
713 adding A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
714 $ echo B > B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
715 $ hg ci -Am B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
716 adding B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
717
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
718 $ hg up -q 0
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
719
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
720 $ echo C > C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
721 $ hg ci -Am C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
722 adding C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
723 created new head
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
724
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
725 $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
726 @ 2: 'C'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
727 |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
728 | o 1: 'B'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
729 |/
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
730 o 0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
731
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
732
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
733
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
734 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
735 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
736 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
737
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
738 $ hg strip 2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
739 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
740 saved backup bundle to $TESTTMP/f/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
741
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
742 $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
743 o 1: 'B'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
744 |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
745 @ 0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
746
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
747
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
748
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
749 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
750 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
751
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
752 $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
753
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
754 Test collapsing changes that add then remove a file
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
755
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
756 $ hg init collapseaddremove
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
757 $ cd collapseaddremove
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
758
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
759 $ touch base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
760 $ hg commit -Am base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
761 adding base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
762 $ touch a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
763 $ hg commit -Am a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
764 adding a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
765 $ hg rm a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
766 $ touch b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
767 $ hg commit -Am b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
768 adding b
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
769 $ hg book foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
770 $ hg rebase -d 0 -r "1::2" --collapse -m collapsed
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
771 saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/*-backup.hg (glob)
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
772 $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
773 @ 1: 'collapsed' foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
774 |
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
775 o 0: 'base'
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
776
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
777 $ hg manifest --rev tip
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
778 b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
779 base
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
780
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
781 $ cd ..