annotate tests/test-rebase-abort.t @ 26593:c60dfcc0abf2

cvsps: fix computation of parent revisions when log caching is on cvsps computes the parent revisions of log entries by walking the cvs log sorted by (rcs, revision) and by iteratively maintaining a 'versions' dictionary which maps a (rcs, branch) pair onto the last revision seen for that pair. When log caching is on and a log cache exists, cvsps fails to set the parent revisions of new log entries because it does not iterate over the log cache in the parents computation. A complication is that a file rcs can change (move to/from the attic), with respect to its value in the log cache, if the file is removed/added back. This patch adds an iteration over the log cache to update the rcs of cached log entries, if changed, and to properly populate the 'versions' dictionary.
author Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
date Wed, 07 Oct 2015 11:33:52 +0300
parents 6084926366b9
children ef1eb6df7071
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: 11316
diff changeset
1 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
2 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
3 > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
4 >
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
5 > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
6 > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
7 >
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
8 > [alias]
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
9 > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
10 > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
11
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
12
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
13 $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
14 $ cd a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
15
20327
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
16 $ touch .hg/rebasestate
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
17 $ hg sum
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
18 parent: -1:000000000000 tip (empty repository)
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
19 branch: default
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
20 commit: (clean)
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
21 update: (current)
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
22 abort: .hg/rebasestate is incomplete
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
23 [255]
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
24 $ rm .hg/rebasestate
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
25
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
26 $ echo c1 > common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
27 $ hg add common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
28 $ hg ci -m C1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
30 $ echo c2 >> common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
31 $ hg ci -m C2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
32
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
33 $ echo c3 >> common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
34 $ hg ci -m C3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
35
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
36 $ hg up -q -C 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
37
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
38 $ echo l1 >> extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
39 $ hg add extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
40 $ hg ci -m L1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
41 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
42
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
43 $ sed -e 's/c2/l2/' common > common.new
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
44 $ mv common.new common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
45 $ hg ci -m L2
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
46
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
47 $ hg phase --force --secret 2
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: 11316
diff changeset
49 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
50 @ 4:draft 'L2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
51 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
52 o 3:draft 'L1'
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
53 |
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
54 | o 2:secret 'C3'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
55 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
56 o 1:draft 'C2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
57 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
58 o 0:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
59
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
60
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
61 Conflicting rebase:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
62
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
63 $ hg rebase -s 3 -d 2
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
64 rebasing 3:3163e20567cc "L1"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
65 rebasing 4:46f0b057b5c0 "L2" (tip)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
66 merging common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
67 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 12896
diff changeset
68 merging common incomplete! (edit conflicts, then use 'hg resolve --mark')
18933
42b620fc89e2 rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc)
Augie Fackler <raf@durin42.com>
parents: 17477
diff changeset
69 unresolved conflicts (see hg resolve, then hg rebase --continue)
18935
e5d9441ec281 dispatch: exit with status 1 for an InterventionRequired exception (bc)
Augie Fackler <raf@durin42.com>
parents: 18933
diff changeset
70 [1]
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
71
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
72 Abort:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
73
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
74 $ hg rebase --abort
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 23518
diff changeset
75 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3e046f2ecedb-6beef7d5-backup.hg (glob)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
76 rebase aborted
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
77
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
78 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
79 @ 4:draft 'L2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
80 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
81 o 3:draft 'L1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
82 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
83 | o 2:secret 'C3'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
84 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
85 o 1:draft 'C2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
86 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
87 o 0:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
88
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
89 Test safety for inconsistent rebase state, which may be created (and
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
90 forgotten) by Mercurial earlier than 2.7. This emulates Mercurial
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
91 earlier than 2.7 by renaming ".hg/rebasestate" temporarily.
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
92
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
93 $ hg rebase -s 3 -d 2
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
94 rebasing 3:3163e20567cc "L1"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
95 rebasing 4:46f0b057b5c0 "L2" (tip)
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
96 merging common
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
97 warning: conflicts during merge.
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
98 merging common incomplete! (edit conflicts, then use 'hg resolve --mark')
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
99 unresolved conflicts (see hg resolve, then hg rebase --continue)
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
100 [1]
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
101
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
102 $ mv .hg/rebasestate .hg/rebasestate.back
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
103 $ hg update --quiet --clean 2
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
104 $ hg --config extensions.mq= strip --quiet "destination()"
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
105 $ mv .hg/rebasestate.back .hg/rebasestate
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
106
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
107 $ hg rebase --continue
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
108 abort: cannot continue inconsistent rebase
20313
dcd65ce87260 hgext: fix one typo in rebase
Simon Heimberg <simohe@besonet.ch>
parents: 20117
diff changeset
109 (use "hg rebase --abort" to clear broken state)
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
110 [255]
19849
e7fa36d2ad3a rebase: catch RepoLookupError at restoring rebase state for summary
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19848
diff changeset
111 $ hg summary | grep '^rebase: '
e7fa36d2ad3a rebase: catch RepoLookupError at restoring rebase state for summary
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19848
diff changeset
112 rebase: (use "hg rebase --abort" to clear broken state)
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
113 $ hg rebase --abort
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
114 rebase aborted (no revision is removed, only broken state is cleared)
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
115
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
116 $ cd ..
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: 11316
diff changeset
118
17477
b1dfca74e3d0 spelling: Construct
timeless@mozdev.org
parents: 16913
diff changeset
119 Construct new repo:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
120
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
121 $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
122 $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
123
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
124 $ echo a > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
125 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
126 adding a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
127
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
128 $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
129 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
130 adding b
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
131
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
132 $ echo c > c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
133 $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
134 adding c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
135
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
136 $ hg up -q 0
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
137
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
138 $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
139 $ hg ci -Am 'B bis'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
140 adding b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
141 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
142
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
143 $ echo c1 > c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
144 $ hg ci -Am C1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
145 adding c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
146
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
147 $ hg phase --force --secret 1
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
148 $ hg phase --public 1
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
149
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
150 Rebase and abort without generating new changesets:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
151
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
152 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
153 @ 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
154 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
155 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
156 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
157 | o 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
158 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
159 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
160 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
161 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
162
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
163 $ hg rebase -b 4 -d 2
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
164 rebasing 3:a6484957d6b9 "B bis"
23518
2fb0504b8175 rebase: show warning when rebase creates no changes to commit
Mads Kiilerich <madski@unity3d.com>
parents: 23517
diff changeset
165 note: rebase of 3:a6484957d6b9 created no changes to commit
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
166 rebasing 4:145842775fec "C1" (tip)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
167 merging c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
168 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 12896
diff changeset
169 merging c incomplete! (edit conflicts, then use 'hg resolve --mark')
18933
42b620fc89e2 rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc)
Augie Fackler <raf@durin42.com>
parents: 17477
diff changeset
170 unresolved conflicts (see hg resolve, then hg rebase --continue)
18935
e5d9441ec281 dispatch: exit with status 1 for an InterventionRequired exception (bc)
Augie Fackler <raf@durin42.com>
parents: 18933
diff changeset
171 [1]
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
172
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
173 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
174 @ 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
175 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
176 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
177 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
178 | @ 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
179 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
180 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
181 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
182 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
183
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
184 $ hg rebase -a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
185 rebase aborted
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
186
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
187 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
188 @ 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
189 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
190 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
191 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
192 | o 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
193 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
194 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
195 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
196 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
197
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15917
diff changeset
198
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15917
diff changeset
199 $ cd ..
19984
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
200
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
201 rebase abort should not leave working copy in a merge state if tip-1 is public
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
202 (issue4082)
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
203
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
204 $ hg init abortpublic
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
205 $ cd abortpublic
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
206 $ echo a > a && hg ci -Aqm a
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
207 $ hg book master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
208 $ hg book foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
209 $ echo b > b && hg ci -Aqm b
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
210 $ hg up -q master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
211 $ echo c > c && hg ci -Aqm c
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
212 $ hg phase -p -r .
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
213 $ hg up -q foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
214 $ echo C > c && hg ci -Aqm C
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
215 $ hg log -G --template "{rev} {desc} {bookmarks}"
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
216 @ 3 C foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
217 |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
218 | o 2 c master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
219 | |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
220 o | 1 b
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
221 |/
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
222 o 0 a
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
223
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
224
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
225 $ hg rebase -d master -r foo
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
226 rebasing 3:6c0f977a22d8 "C" (tip foo)
19984
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
227 merging c
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
228 warning: conflicts during merge.
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
229 merging c incomplete! (edit conflicts, then use 'hg resolve --mark')
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
230 unresolved conflicts (see hg resolve, then hg rebase --continue)
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
231 [1]
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
232 $ hg rebase --abort
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
233 rebase aborted
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
234 $ hg log -G --template "{rev} {desc} {bookmarks}"
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
235 @ 3 C foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
236 |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
237 | o 2 c master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
238 | |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
239 o | 1 b
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
240 |/
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
241 o 0 a
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
242
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
243 $ cd ..
25069
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
244
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
245 Make sure we don't clobber changes in the working directory when the
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
246 user has somehow managed to update to a different revision (issue4009)
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
247
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
248 $ hg init noupdate
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
249 $ cd noupdate
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
250 $ hg book @
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
251 $ echo original > a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
252 $ hg add a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
253 $ hg commit -m a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
254 $ echo x > b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
255 $ hg add b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
256 $ hg commit -m b1
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
257 $ hg up 0
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
258 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
259 (leaving bookmark @)
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
260 $ hg book foo
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
261 $ echo y > b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
262 $ hg add b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
263 $ hg commit -m b2
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
264 created new head
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
265
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
266 $ hg rebase -d @ -b foo --tool=internal:fail
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
267 rebasing 2:070cf4580bb5 "b2" (tip foo)
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
268 unresolved conflicts (see hg resolve, then hg rebase --continue)
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
269 [1]
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
270
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
271 $ mv .hg/rebasestate ./ # so we're allowed to hg up like in mercurial <2.6.3
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
272 $ hg up -C 0 # user does other stuff in the repo
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
273 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
274
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
275 $ mv rebasestate .hg/ # user upgrades to 2.7
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
276
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
277 $ echo new > a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
278 $ hg up 1 # user gets an error saying to run hg rebase --abort
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
279 abort: rebase in progress
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
280 (use 'hg rebase --continue' or 'hg rebase --abort')
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
281 [255]
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
282
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
283 $ cat a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
284 new
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
285 $ hg rebase --abort
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
286 rebase aborted
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
287 $ cat a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
288 new
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
289
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
290 $ cd ..
25070
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
291
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
292 On the other hand, make sure we *do* clobber changes whenever we
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
293 haven't somehow managed to update the repo to a different revision
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
294 during a rebase (issue4661)
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
295
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
296 $ hg ini yesupdate
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
297 $ cd yesupdate
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
298 $ echo "initial data" > foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
299 $ hg add
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
300 adding foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
301 $ hg ci -m "initial checkin"
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
302 $ echo "change 1" > foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
303 $ hg ci -m "change 1"
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
304 $ hg up 0
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
305 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
306 $ echo "conflicting change 1" > foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
307 $ hg ci -m "conflicting 1"
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
308 created new head
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
309 $ echo "conflicting change 2" > foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
310 $ hg ci -m "conflicting 2"
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
311
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
312 $ hg rebase -d 1 --tool 'internal:fail'
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
313 rebasing 2:e4ea5cdc9789 "conflicting 1"
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
314 unresolved conflicts (see hg resolve, then hg rebase --continue)
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
315 [1]
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
316 $ hg rebase --abort
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
317 rebase aborted
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
318 $ hg summary
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
319 parent: 3:b16646383533 tip
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
320 conflicting 2
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
321 branch: default
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
322 commit: (clean)
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
323 update: 1 new changesets, 2 branch heads (merge)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25111
diff changeset
324 phases: 4 draft