annotate tests/test-rebase-abort.t @ 51905:c564be351754

rev-branch-cache: stop truncating cache file Truncating the file prevent the safe use of mmap. So instead of overwrite the existing data. If more than 20% of the file is to be overwritten, we rewrite the whole file instead. Such whole rewrite is done by replacing the old one with a new one, so mmap of the old file would be affected. This prepare a more aggressive use of mmap in later patches.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 24 Sep 2024 00:16:23 +0200
parents 63dc24be635d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
1 #testcases abortcommand abortflag
42613
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
2 #testcases continuecommand continueflag
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
3
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
4 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
5 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
6 > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
7 >
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
8 > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
9 > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
10 >
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
11 > [alias]
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
12 > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
13 > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
14
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
15 #if abortflag
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
16 $ cat >> $HGRCPATH <<EOF
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
17 > [alias]
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
18 > abort = rebase --abort
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
19 > EOF
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
20 #endif
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
21
42613
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
22 #if continueflag
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
23 $ cat >> $HGRCPATH <<EOF
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
24 > [alias]
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
25 > continue = rebase --continue
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
26 > EOF
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
27 #endif
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
28
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
29 $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
30 $ cd a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
31
20327
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
32 $ touch .hg/rebasestate
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
33 $ hg sum
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
34 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
35 branch: default
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
36 commit: (clean)
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
37 update: (current)
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
38 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
39 [255]
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
40 $ rm .hg/rebasestate
46c2331fc750 rebase: abort cleanly when we encounter a damaged rebasestate (issue4155)
Matt Mackall <mpm@selenic.com>
parents: 20313
diff changeset
41
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
42 $ echo c1 > common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
43 $ hg add common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
44 $ hg ci -m C1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
45
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
46 $ echo c2 >> common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
47 $ hg ci -m C2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
48
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
49 $ echo c3 >> common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
50 $ hg ci -m C3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
51
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
52 $ hg up -q -C 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
53
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
54 $ echo l1 >> extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
55 $ hg add extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
56 $ hg ci -m L1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
57 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
58
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
59 $ sed -e 's/c2/l2/' common > common.new
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
60 $ mv common.new common
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
61 $ hg ci -m L2
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
62
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
63 $ hg phase --force --secret 2
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
64
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
65 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
66 @ 4:draft 'L2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
67 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
68 o 3:draft 'L1'
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
69 |
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
70 | o 2:secret 'C3'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
71 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
72 o 1:draft 'C2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
73 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
74 o 0:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
75
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
76
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
77 Conflicting rebase:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
78
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
79 $ 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
80 rebasing 3:3163e20567cc "L1"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45215
diff changeset
81 rebasing 4:46f0b057b5c0 tip "L2"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
82 merging common
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25382
diff changeset
83 warning: conflicts while merging common! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
84 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
85 [240]
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
86
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
87 Insert unsupported advisory merge record:
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
88
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
89 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
90 $ hg debugmergestate
44396
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
91 local (dest): 3e046f2ecedb793b97ed32108086edd1a162f8bc
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
92 other (source): 46f0b057b5c061d276b91491c22151f78698abd2
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
93 file: common (state "u")
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
94 local path: common (hash 94c8c21d08740f5da9eaa38d1f175c592692f0d1, flags "")
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
95 ancestor path: common (node de0a666fdd9c1a0b0698b90d85064d8bd34f74b6)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
96 other path: common (node 2f6411de53677f6f1048fef5bf888d67a342e0a5)
44396
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
97 extra: ancestorlinknode = 3163e20567cc93074fbb7a53c8b93312e59dbf2c
46811
5a0b930cfb3e commit: get info from mergestate whether a file was merged or not
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45840
diff changeset
98 extra: merged = yes
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
99 $ hg resolve -l
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
100 U common
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
101
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
102 Insert unsupported mandatory merge record:
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
103
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
104 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
105 $ hg debugmergestate
44396
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
106 abort: unsupported merge state records: X
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
107 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
acbfa31cfaf2 debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
108 [255]
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
109 $ hg resolve -l
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
110 abort: unsupported merge state records: X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
111 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
112 [255]
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
113 $ hg resolve -ma
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
114 abort: unsupported merge state records: X
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
115 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
116 [255]
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
117
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
118 Abort (should clear out unsupported merge state):
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
119
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
120 #if abortcommand
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
121 when in dry-run mode
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
122 $ hg abort --dry-run
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
123 rebase in progress, will be aborted
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
124 #endif
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
125
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
126 $ hg abort
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34290
diff changeset
127 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3e046f2ecedb-6beef7d5-backup.hg
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
128 rebase aborted
27027
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
129 $ hg debugmergestate
a01ecbcfaf84 mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents: 26677
diff changeset
130 no merge state found
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 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
133 @ 4:draft 'L2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
134 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
135 o 3:draft 'L1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
136 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
137 | o 2:secret 'C3'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
138 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
139 o 1:draft 'C2'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
140 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
141 o 0:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
142
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
143 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
144 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
145 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
146
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
147 $ 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
148 rebasing 3:3163e20567cc "L1"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45215
diff changeset
149 rebasing 4:46f0b057b5c0 tip "L2"
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
150 merging common
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25382
diff changeset
151 warning: conflicts while merging common! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
152 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
153 [240]
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
154
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
155 $ 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
156 $ 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
157 $ 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
158 $ 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
159
42613
35ebdbb38efb continue: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 42583
diff changeset
160 $ hg continue
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
161 abort: cannot continue inconsistent rebase
20313
dcd65ce87260 hgext: fix one typo in rebase
Simon Heimberg <simohe@besonet.ch>
parents: 20117
diff changeset
162 (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
163 [255]
19849
e7fa36d2ad3a rebase: catch RepoLookupError at restoring rebase state for summary
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19848
diff changeset
164 $ 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
165 rebase: (use "hg rebase --abort" to clear broken state)
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
166 $ hg abort
19848
577f4c562d52 rebase: catch RepoLookupError at restoring rebase state for abort/continue
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18935
diff changeset
167 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
168
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
169 $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
170
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
171
17477
b1dfca74e3d0 spelling: Construct
timeless@mozdev.org
parents: 16913
diff changeset
172 Construct new repo:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
173
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
174 $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
175 $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
176
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
177 $ echo a > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
178 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
179 adding a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
180
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
181 $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
182 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
183 adding b
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
184
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
185 $ echo c > c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
186 $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
187 adding c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
188
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
189 $ 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
190
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
191 $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
192 $ hg ci -Am 'B bis'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
193 adding b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
194 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
195
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
196 $ echo c1 > c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
197 $ hg ci -Am C1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
198 adding c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
199
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
200 $ hg phase --force --secret 1
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
201 $ hg phase --public 1
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
202
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
203 Rebase and abort without generating new changesets:
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: 11316
diff changeset
205 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
206 @ 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
207 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
208 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
209 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
210 | o 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
211 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
212 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
213 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
214 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
215
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
216 $ 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
217 rebasing 3:a6484957d6b9 "B bis"
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
218 note: not rebasing 3:a6484957d6b9 "B bis", its destination already has all its changes
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45215
diff changeset
219 rebasing 4:145842775fec tip "C1"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
220 merging c
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25382
diff changeset
221 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
222 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
223 [240]
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
224
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
225 $ hg tglog
44347
9c9cfecd4600 rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42613
diff changeset
226 % 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
227 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
228 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
229 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
230 | @ 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
231 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
232 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
233 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
234 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
235
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
236 $ hg rebase -a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
237 rebase aborted
11316
7fa3968004c1 rebase: --abort doesn't strip away the target changeset (issue2220)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 11208
diff changeset
238
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
239 $ hg tglog
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
240 @ 4:draft 'C1'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
241 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
242 o 3:draft 'B bis'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
243 |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
244 | o 2:secret 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
245 | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
246 | o 1:public 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
247 |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
248 o 0:public 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11316
diff changeset
249
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15917
diff changeset
250
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15917
diff changeset
251 $ cd ..
19984
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
252
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
253 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
254 (issue4082)
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
255
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
256 $ hg init abortpublic
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
257 $ cd abortpublic
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
258 $ 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
259 $ hg book master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
260 $ hg book foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
261 $ 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
262 $ hg up -q master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
263 $ 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
264 $ hg phase -p -r .
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
265 $ hg up -q foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
266 $ 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
267 $ 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
268 @ 3 C foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
269 |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
270 | o 2 c master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
271 | |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
272 o | 1 b
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
273 |/
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
274 o 0 a
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
275
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
276
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
277 $ hg rebase -d master -r foo
45796
e9555305c5c6 templates: include all non-branch namespaces in default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
278 rebasing 3:6c0f977a22d8 foo tip "C"
19984
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
279 merging c
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25382
diff changeset
280 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
281 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
282 [240]
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
283 $ hg abort
19984
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
284 rebase aborted
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
285 $ 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
286 @ 3 C foo
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
287 |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
288 | o 2 c master
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
289 | |
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
290 o | 1 b
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
291 |/
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
292 o 0 a
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
293
7d5e7799a29f rebase: fix rebase aborts when 'tip-1' is public (issue4082)
Durham Goode <durham@fb.com>
parents: 19849
diff changeset
294 $ cd ..
25069
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
295
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
296 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
297 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
298
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
299 $ hg init noupdate
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
300 $ cd noupdate
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
301 $ hg book @
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
302 $ echo original > a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
303 $ hg add a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
304 $ hg commit -m a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
305 $ echo x > b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
306 $ hg add b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
307 $ hg commit -m b1
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
308 $ hg up 0
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
309 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
310 (leaving bookmark @)
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
311 $ hg book foo
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
312 $ echo y > b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
313 $ hg add b
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
314 $ hg commit -m b2
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
315 created new head
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
316
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
317 $ hg rebase -d @ -b foo --tool=internal:fail
45796
e9555305c5c6 templates: include all non-branch namespaces in default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
318 rebasing 2:070cf4580bb5 foo tip "b2"
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
319 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
320 [240]
25069
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
321
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
322 $ 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
323 $ 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
324 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
325
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
326 $ 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
327
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
328 $ echo new > a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
329 $ 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
330 abort: rebase in progress
45215
a253ded5b03d morestatus: mention --stop even if not using --verbose
Kyle Lippincott <spectral@google.com>
parents: 45150
diff changeset
331 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
332 [20]
25069
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
333
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
334 $ cat a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
335 new
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
336 $ hg abort
25069
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
337 rebase aborted
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
338 $ cat a
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
339 new
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
340
01ad8daae5be test-rebase-abort: add test from issue4009
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23835
diff changeset
341 $ cd ..
25070
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
342
27988
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
343 test aborting an interrupted series (issue5084)
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
344 $ hg init interrupted
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
345 $ cd interrupted
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
346 $ touch base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
347 $ hg add base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
348 $ hg commit -m base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
349 $ touch a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
350 $ hg add a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
351 $ hg commit -m a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
352 $ echo 1 > a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
353 $ hg commit -m 1
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
354 $ touch b
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
355 $ hg add b
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
356 $ hg commit -m b
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
357 $ echo 2 >> a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
358 $ hg commit -m c
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
359 $ touch d
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
360 $ hg add d
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
361 $ hg commit -m d
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
362 $ hg co -q 1
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
363 $ hg rm a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
364 $ hg commit -m no-a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
365 created new head
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
366 $ hg co 0
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
367 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
368 $ hg log -G --template "{rev} {desc} {bookmarks}"
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
369 o 6 no-a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
370 |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
371 | o 5 d
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
372 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
373 | o 4 c
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
374 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
375 | o 3 b
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
376 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
377 | o 2 1
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
378 |/
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
379 o 1 a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
380 |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
381 @ 0 base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
382
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
383 $ hg --config extensions.n=$TESTDIR/failfilemerge.py rebase -s 3 -d tip
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
384 rebasing 3:3a71550954f1 "b"
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
385 rebasing 4:e80b69427d80 "c"
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
386 abort: ^C
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
387 [255]
38181
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
388
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
389 New operations are blocked with the correct state message
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
390
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
391 $ find .hg -name '*state' -prune | sort
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
392 .hg/dirstate
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
393 .hg/merge/state
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
394 .hg/rebasestate
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
395 .hg/updatestate
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
396
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
397 $ hg rebase -s 3 -d tip
38182
79c54e7c0c52 rebase: prioritize indicating an interrupted rebase over update (issue5838)
Matt Harbison <matt_harbison@yahoo.com>
parents: 38181
diff changeset
398 abort: rebase in progress
45215
a253ded5b03d morestatus: mention --stop even if not using --verbose
Kyle Lippincott <spectral@google.com>
parents: 45150
diff changeset
399 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
400 [20]
38181
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
401 $ hg up .
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
402 abort: rebase in progress
45215
a253ded5b03d morestatus: mention --stop even if not using --verbose
Kyle Lippincott <spectral@google.com>
parents: 45150
diff changeset
403 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
404 [20]
38181
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
405 $ hg up -C .
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
406 abort: rebase in progress
45215
a253ded5b03d morestatus: mention --stop even if not using --verbose
Kyle Lippincott <spectral@google.com>
parents: 45150
diff changeset
407 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
408 [20]
38181
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
409
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
410 $ hg graft 3
38182
79c54e7c0c52 rebase: prioritize indicating an interrupted rebase over update (issue5838)
Matt Harbison <matt_harbison@yahoo.com>
parents: 38181
diff changeset
411 abort: rebase in progress
45215
a253ded5b03d morestatus: mention --stop even if not using --verbose
Kyle Lippincott <spectral@google.com>
parents: 45150
diff changeset
412 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
413 [20]
38181
712d6f535fc9 tests: demonstrate inconsistent messaging around interrupted rebases
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
414
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
415 $ hg abort
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34290
diff changeset
416 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/3d8812cf300d-93041a90-backup.hg
27988
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
417 rebase aborted
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
418 $ hg log -G --template "{rev} {desc} {bookmarks}"
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
419 o 6 no-a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
420 |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
421 | o 5 d
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
422 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
423 | o 4 c
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
424 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
425 | o 3 b
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
426 | |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
427 | o 2 1
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
428 |/
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
429 o 1 a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
430 |
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
431 @ 0 base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
432
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
433 $ hg summary
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
434 parent: 0:df4f53cec30a
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
435 base
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
436 branch: default
33121
a5abaa81fad6 rebase: backed out changeset cf8ad0e6c0e4 (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31226
diff changeset
437 commit: (clean)
27988
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
438 update: 6 new changesets (update)
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
439 phases: 7 draft
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
440
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
441 $ cd ..
25070
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
442 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
443 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
444 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
445
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
446 $ hg ini yesupdate
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
447 $ cd yesupdate
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
448 $ 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
449 $ hg add
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
450 adding foo.txt
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
451 $ 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
452 $ 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
453 $ 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
454 $ hg up 0
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
455 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
456 $ 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
457 $ 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
458 created new head
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
459 $ 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
460 $ 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
461
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
462 $ 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
463 rebasing 2:e4ea5cdc9789 "conflicting 1"
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
464 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
465 [240]
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
466 $ hg abort
25070
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
467 rebase aborted
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
468 $ hg summary
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
469 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
470 conflicting 2
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
471 branch: default
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
472 commit: (clean)
bd98d073a34f rebase: clear merge when aborting before any rebasing (issue4661)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25069
diff changeset
473 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
474 phases: 4 draft
28003
a1d4ca0c8483 tests: fix rebase-abort directory nesting
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
475 $ cd ..
26677
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
476
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
477 test aborting a rebase succeeds after rebasing with skipped commits onto a
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
478 public changeset (issue4896)
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
479
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
480 $ hg init succeedonpublic
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
481 $ cd succeedonpublic
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
482 $ echo 'content' > root
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
483 $ hg commit -A -m 'root' -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
484
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
485 set up public branch
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
486 $ echo 'content' > disappear
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
487 $ hg commit -A -m 'disappear public' -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
488 commit will cause merge conflict on rebase
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
489 $ echo '' > root
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
490 $ hg commit -m 'remove content public' -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
491 $ hg phase --public
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
492
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
493 setup the draft branch that will be rebased onto public commit
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
494 $ hg up -r 0 -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
495 $ echo 'content' > disappear
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
496 commit will disappear
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
497 $ hg commit -A -m 'disappear draft' -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
498 $ echo 'addedcontADDEDentadded' > root
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
499 commit will cause merge conflict on rebase
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
500 $ hg commit -m 'add content draft' -q
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
501
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
502 $ hg rebase -d 'public()' --tool :merge -q
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
503 note: not rebasing 3:0682fd3dabf5 "disappear draft", its destination already has all its changes
26677
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
504 warning: conflicts while merging root! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44396
diff changeset
505 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45796
diff changeset
506 [240]
42583
b9bc47211cf5 abort: added support for rebase
Taapas Agrawal <taapas2897@gmail.com>
parents: 40865
diff changeset
507 $ hg abort
26677
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
508 rebase aborted
28003
a1d4ca0c8483 tests: fix rebase-abort directory nesting
timeless <timeless@mozdev.org>
parents: 27027
diff changeset
509 $ cd ..
26677
e9b3d523f2e6 rebase: properly abort when destination is public (issue4896)
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
510