Show More
@@ -1,505 +1,501 b'' | |||||
1 | ========================== |
|
1 | ========================== | |
2 | Test rebase with obsolete |
|
2 | Test rebase with obsolete | |
3 | ========================== |
|
3 | ========================== | |
4 |
|
4 | |||
5 | Enable obsolete |
|
5 | Enable obsolete | |
6 |
|
6 | |||
7 | $ cat >> $HGRCPATH << EOF |
|
7 | $ cat >> $HGRCPATH << EOF | |
8 | > [command-templates] |
|
8 | > [command-templates] | |
9 | > log= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} |
|
9 | > log= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} | |
10 | > [experimental] |
|
10 | > [experimental] | |
11 | > evolution.createmarkers=True |
|
11 | > evolution.createmarkers=True | |
12 | > evolution.allowunstable=True |
|
12 | > evolution.allowunstable=True | |
13 | > [phases] |
|
13 | > [phases] | |
14 | > publish=False |
|
14 | > publish=False | |
15 | > [extensions] |
|
15 | > [extensions] | |
16 | > rebase= |
|
16 | > rebase= | |
17 | > drawdag=$TESTDIR/drawdag.py |
|
17 | > drawdag=$TESTDIR/drawdag.py | |
18 | > strip= |
|
18 | > strip= | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | Test that bookmark is moved and working dir is updated when all changesets have |
|
21 | Test that bookmark is moved and working dir is updated when all changesets have | |
22 | equivalents in destination |
|
22 | equivalents in destination | |
23 | $ hg init rbsrepo && cd rbsrepo |
|
23 | $ hg init rbsrepo && cd rbsrepo | |
24 | $ echo "[experimental]" > .hg/hgrc |
|
24 | $ echo "[experimental]" > .hg/hgrc | |
25 | $ echo "evolution=true" >> .hg/hgrc |
|
25 | $ echo "evolution=true" >> .hg/hgrc | |
26 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc |
|
|||
27 | $ echo root > root && hg ci -Am root |
|
26 | $ echo root > root && hg ci -Am root | |
28 | adding root |
|
27 | adding root | |
29 | $ echo a > a && hg ci -Am a |
|
28 | $ echo a > a && hg ci -Am a | |
30 | adding a |
|
29 | adding a | |
31 | $ hg up 0 |
|
30 | $ hg up 0 | |
32 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
31 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
33 | $ echo b > b && hg ci -Am b |
|
32 | $ echo b > b && hg ci -Am b | |
34 | adding b |
|
33 | adding b | |
35 | created new head |
|
34 | created new head | |
36 | $ hg rebase -r 2 -d 1 |
|
35 | $ hg rebase -r 2 -d 1 | |
37 | rebasing 2:1e9a3c00cbe9 tip "b" |
|
36 | rebasing 2:1e9a3c00cbe9 tip "b" | |
38 | $ hg log -r . # working dir is at rev 3 (successor of 2) |
|
37 | $ hg log -r . # working dir is at rev 3 (successor of 2) | |
39 | 3:be1832deae9a b (no-eol) |
|
38 | 3:be1832deae9a b (no-eol) | |
40 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now |
|
39 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now | |
41 | bookmarking hidden changeset 1e9a3c00cbe9 |
|
40 | bookmarking hidden changeset 1e9a3c00cbe9 | |
42 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) |
|
41 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) | |
43 | $ hg up 2 && hg log -r . # working dir is at rev 2 again |
|
42 | $ hg up 2 && hg log -r . # working dir is at rev 2 again | |
44 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
45 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) |
|
44 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) | |
46 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 |
|
45 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 | |
47 | note: not rebasing 2:1e9a3c00cbe9 mybook "b", already in destination as 3:be1832deae9a tip "b" |
|
46 | note: not rebasing 2:1e9a3c00cbe9 mybook "b", already in destination as 3:be1832deae9a tip "b" | |
48 | Check that working directory and bookmark was updated to rev 3 although rev 2 |
|
47 | Check that working directory and bookmark was updated to rev 3 although rev 2 | |
49 | was skipped |
|
48 | was skipped | |
50 | $ hg log -r . |
|
49 | $ hg log -r . | |
51 | 3:be1832deae9a b (no-eol) |
|
50 | 3:be1832deae9a b (no-eol) | |
52 | $ hg bookmarks |
|
51 | $ hg bookmarks | |
53 | mybook 3:be1832deae9a |
|
52 | mybook 3:be1832deae9a | |
54 | $ hg debugobsolete --rev tip |
|
53 | $ hg debugobsolete --rev tip | |
55 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
54 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
56 |
|
55 | |||
57 | Obsoleted working parent and bookmark could be moved if an ancestor of working |
|
56 | Obsoleted working parent and bookmark could be moved if an ancestor of working | |
58 | parent gets moved: |
|
57 | parent gets moved: | |
59 |
|
58 | |||
60 | $ hg init $TESTTMP/ancestor-wd-move |
|
59 | $ hg init $TESTTMP/ancestor-wd-move | |
61 | $ cd $TESTTMP/ancestor-wd-move |
|
60 | $ cd $TESTTMP/ancestor-wd-move | |
62 | $ hg debugdrawdag <<'EOS' |
|
61 | $ hg debugdrawdag <<'EOS' | |
63 | > E D1 # rebase: D1 -> D2 |
|
62 | > E D1 # rebase: D1 -> D2 | |
64 | > | | |
|
63 | > | | | |
65 | > | C |
|
64 | > | C | |
66 | > D2 | |
|
65 | > D2 | | |
67 | > | B |
|
66 | > | B | |
68 | > |/ |
|
67 | > |/ | |
69 | > A |
|
68 | > A | |
70 | > EOS |
|
69 | > EOS | |
71 | $ hg update D1 -q |
|
70 | $ hg update D1 -q | |
72 | $ hg bookmark book -i |
|
71 | $ hg bookmark book -i | |
73 | $ hg rebase -r B+D1 -d E |
|
72 | $ hg rebase -r B+D1 -d E | |
74 | rebasing 1:112478962961 B "B" |
|
73 | rebasing 1:112478962961 B "B" | |
75 | note: not rebasing 5:15ecf15e0114 book D1 tip "D1", already in destination as 2:0807738e0be9 D2 "D2" |
|
74 | note: not rebasing 5:15ecf15e0114 book D1 tip "D1", already in destination as 2:0807738e0be9 D2 "D2" | |
76 | 1 new orphan changesets |
|
75 | 1 new orphan changesets | |
77 | $ hg log -G -T '{desc} {bookmarks}' |
|
76 | $ hg log -G -T '{desc} {bookmarks}' | |
78 | @ B book |
|
77 | @ B book | |
79 | | |
|
78 | | | |
80 | | x D1 |
|
79 | | x D1 | |
81 | | | |
|
80 | | | | |
82 | o | E |
|
81 | o | E | |
83 | | | |
|
82 | | | | |
84 | | * C |
|
83 | | * C | |
85 | | | |
|
84 | | | | |
86 | o | D2 |
|
85 | o | D2 | |
87 | | | |
|
86 | | | | |
88 | | x B |
|
87 | | x B | |
89 | |/ |
|
88 | |/ | |
90 | o A |
|
89 | o A | |
91 |
|
90 | |||
92 | Rebasing a merge with one of its parent having a hidden successor |
|
91 | Rebasing a merge with one of its parent having a hidden successor | |
93 |
|
92 | |||
94 | $ hg init $TESTTMP/merge-p1-hidden-successor |
|
93 | $ hg init $TESTTMP/merge-p1-hidden-successor | |
95 | $ cd $TESTTMP/merge-p1-hidden-successor |
|
94 | $ cd $TESTTMP/merge-p1-hidden-successor | |
96 |
|
95 | |||
97 | $ hg debugdrawdag <<'EOS' |
|
96 | $ hg debugdrawdag <<'EOS' | |
98 | > E |
|
97 | > E | |
99 | > | |
|
98 | > | | |
100 | > B3 B2 # amend: B1 -> B2 -> B3 |
|
99 | > B3 B2 # amend: B1 -> B2 -> B3 | |
101 | > |/ # B2 is hidden |
|
100 | > |/ # B2 is hidden | |
102 | > | D |
|
101 | > | D | |
103 | > | |\ |
|
102 | > | |\ | |
104 | > | B1 C |
|
103 | > | B1 C | |
105 | > |/ |
|
104 | > |/ | |
106 | > A |
|
105 | > A | |
107 | > EOS |
|
106 | > EOS | |
108 | 1 new orphan changesets |
|
107 | 1 new orphan changesets | |
109 |
|
108 | |||
110 | $ eval `hg tags -T '{tag}={node}\n'` |
|
109 | $ eval `hg tags -T '{tag}={node}\n'` | |
111 | $ rm .hg/localtags |
|
110 | $ rm .hg/localtags | |
112 |
|
111 | |||
113 | $ hg rebase -r $D -d $E |
|
112 | $ hg rebase -r $D -d $E | |
114 | rebasing 5:9e62094e4d94 "D" |
|
113 | rebasing 5:9e62094e4d94 "D" | |
115 |
|
114 | |||
116 | $ hg log -G |
|
115 | $ hg log -G | |
117 | o 7:a699d059adcf D |
|
116 | o 7:a699d059adcf D | |
118 | |\ |
|
117 | |\ | |
119 | | o 6:ecc93090a95c E |
|
118 | | o 6:ecc93090a95c E | |
120 | | | |
|
119 | | | | |
121 | | o 4:0dc878468a23 B3 |
|
120 | | o 4:0dc878468a23 B3 | |
122 | | | |
|
121 | | | | |
123 | o | 1:96cc3511f894 C |
|
122 | o | 1:96cc3511f894 C | |
124 | / |
|
123 | / | |
125 | o 0:426bada5c675 A |
|
124 | o 0:426bada5c675 A | |
126 |
|
125 | |||
127 |
For some reasons (--hidden, |
|
126 | For some reasons (--hidden, directaccess, etc.), | |
128 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. |
|
127 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. | |
129 |
|
128 | |||
130 | $ hg init $TESTTMP/hidden-state1 |
|
129 | $ hg init $TESTTMP/hidden-state1 | |
131 | $ cd $TESTTMP/hidden-state1 |
|
130 | $ cd $TESTTMP/hidden-state1 | |
132 | $ cat >> .hg/hgrc <<EOF |
|
|||
133 | > [experimental] |
|
|||
134 | > rebaseskipobsolete=0 |
|
|||
135 | > EOF |
|
|||
136 |
|
131 | |||
137 | $ hg debugdrawdag <<'EOS' |
|
132 | $ hg debugdrawdag <<'EOS' | |
138 | > C |
|
133 | > C | |
139 | > | |
|
134 | > | | |
140 |
> D B # |
|
135 | > D B # B/D=B | |
141 |
> |/ |
|
136 | > |/ | |
142 | > A |
|
137 | > A | |
143 | > EOS |
|
138 | > EOS | |
144 |
|
139 | |||
145 |
$ |
|
140 | $ eval `hg tags -T '{tag}={node}\n'` | |
146 | $ rm .hg/localtags |
|
141 | $ rm .hg/localtags | |
147 |
|
142 | |||
148 |
$ hg update -q $C |
|
143 | $ hg update -q $C | |
149 | updated to hidden changeset 7829726be4dc |
|
|||
150 | (hidden revision '7829726be4dc' is pruned) |
|
|||
151 |
$ |
|
144 | $ hg rebase -s $B -d $D | |
152 | rebasing 1:2ec65233581b "B" |
|
145 | rebasing 1:2ec65233581b "B" | |
153 | merging D |
|
146 | merging D | |
154 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') |
|
147 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') | |
155 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
148 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
156 | [240] |
|
149 | [240] | |
157 |
|
150 | |||
|
151 | $ hg debugobsolete $B | |||
|
152 | 1 new obsolescence markers | |||
|
153 | obsoleted 1 changesets | |||
|
154 | 1 new orphan changesets | |||
|
155 | $ hg debugobsolete $C | |||
|
156 | 1 new obsolescence markers | |||
|
157 | obsoleted 1 changesets | |||
158 |
$ |
|
158 | $ cp -R . $TESTTMP/hidden-state2 | |
159 |
|
159 | |||
160 |
$ |
|
160 | $ hg log -G | |
161 | @ 2:b18e25de2cf5 D |
|
161 | @ 2:b18e25de2cf5 D | |
162 | | |
|
162 | | | |
163 |
| % 1:2ec65233581b B (pruned |
|
163 | | % 1:2ec65233581b B (pruned) | |
164 | |/ |
|
164 | |/ | |
165 | o 0:426bada5c675 A |
|
165 | o 0:426bada5c675 A | |
166 |
|
166 | |||
167 | $ hg summary |
|
167 | $ hg summary | |
168 | parent: 2:b18e25de2cf5 tip |
|
168 | parent: 2:b18e25de2cf5 tip | |
169 | D |
|
169 | D | |
170 | branch: default |
|
170 | branch: default | |
171 | commit: 1 modified, 1 added, 1 unknown, 1 unresolved |
|
171 | commit: 1 modified, 1 added, 1 unknown, 1 unresolved | |
172 | update: 1 new changesets, 2 branch heads (merge) |
|
172 | update: 1 new changesets, 2 branch heads (merge) | |
173 | phases: 3 draft |
|
173 | phases: 3 draft | |
174 | rebase: 0 rebased, 2 remaining (rebase --continue) |
|
174 | rebase: 0 rebased, 2 remaining (rebase --continue) | |
175 |
|
175 | |||
176 | $ hg rebase --abort |
|
176 | $ hg rebase --abort | |
177 | rebase aborted |
|
177 | rebase aborted | |
178 |
|
178 | |||
179 | Also test --continue for the above case |
|
179 | Also test --continue for the above case | |
180 |
|
180 | |||
181 | $ cd $TESTTMP/hidden-state2 |
|
181 | $ cd $TESTTMP/hidden-state2 | |
182 | $ hg resolve -m |
|
182 | $ hg resolve -m | |
183 | (no more unresolved files) |
|
183 | (no more unresolved files) | |
184 | continue: hg rebase --continue |
|
184 | continue: hg rebase --continue | |
185 | $ hg rebase --continue |
|
185 | $ hg rebase --continue | |
186 | rebasing 1:2ec65233581b "B" |
|
186 | note: not rebasing 1:2ec65233581b "B", it has no successor | |
187 | rebasing 3:7829726be4dc tip "C" |
|
187 | note: not rebasing 3:7829726be4dc tip "C", it has no successor | |
188 |
$ |
|
188 | $ hg log -G | |
189 | @ 5:1964d5d5b547 C |
|
189 | @ 2:b18e25de2cf5 D | |
190 | | |
|
|||
191 | o 4:68deb90c12a2 B |
|
|||
192 | | |
|
|||
193 | o 2:b18e25de2cf5 D |
|
|||
194 | | |
|
190 | | | |
195 | o 0:426bada5c675 A |
|
191 | o 0:426bada5c675 A | |
196 |
|
192 | |||
197 | ==================== |
|
193 | ==================== | |
198 | Test --stop option | |
|
194 | Test --stop option | | |
199 | ==================== |
|
195 | ==================== | |
200 | $ cd .. |
|
196 | $ cd .. | |
201 | $ hg init rbstop |
|
197 | $ hg init rbstop | |
202 | $ cd rbstop |
|
198 | $ cd rbstop | |
203 | $ echo a>a |
|
199 | $ echo a>a | |
204 | $ hg ci -Aqma |
|
200 | $ hg ci -Aqma | |
205 | $ echo b>b |
|
201 | $ echo b>b | |
206 | $ hg ci -Aqmb |
|
202 | $ hg ci -Aqmb | |
207 | $ echo c>c |
|
203 | $ echo c>c | |
208 | $ hg ci -Aqmc |
|
204 | $ hg ci -Aqmc | |
209 | $ echo d>d |
|
205 | $ echo d>d | |
210 | $ hg ci -Aqmd |
|
206 | $ hg ci -Aqmd | |
211 | $ hg up 0 -q |
|
207 | $ hg up 0 -q | |
212 | $ echo f>f |
|
208 | $ echo f>f | |
213 | $ hg ci -Aqmf |
|
209 | $ hg ci -Aqmf | |
214 | $ echo D>d |
|
210 | $ echo D>d | |
215 | $ hg ci -Aqm "conflict with d" |
|
211 | $ hg ci -Aqm "conflict with d" | |
216 | $ hg up 3 -q |
|
212 | $ hg up 3 -q | |
217 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
213 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
218 | o 5:00bfc9898aeb test |
|
214 | o 5:00bfc9898aeb test | |
219 | | conflict with d |
|
215 | | conflict with d | |
220 | | |
|
216 | | | |
221 | o 4:dafd40200f93 test |
|
217 | o 4:dafd40200f93 test | |
222 | | f |
|
218 | | f | |
223 | | |
|
219 | | | |
224 | | @ 3:055a42cdd887 test |
|
220 | | @ 3:055a42cdd887 test | |
225 | | | d |
|
221 | | | d | |
226 | | | |
|
222 | | | | |
227 | | o 2:177f92b77385 test |
|
223 | | o 2:177f92b77385 test | |
228 | | | c |
|
224 | | | c | |
229 | | | |
|
225 | | | | |
230 | | o 1:d2ae7f538514 test |
|
226 | | o 1:d2ae7f538514 test | |
231 | |/ b |
|
227 | |/ b | |
232 | | |
|
228 | | | |
233 | o 0:cb9a9f314b8b test |
|
229 | o 0:cb9a9f314b8b test | |
234 | a |
|
230 | a | |
235 |
|
231 | |||
236 | $ hg rebase -s 1 -d 5 |
|
232 | $ hg rebase -s 1 -d 5 | |
237 | rebasing 1:d2ae7f538514 "b" |
|
233 | rebasing 1:d2ae7f538514 "b" | |
238 | rebasing 2:177f92b77385 "c" |
|
234 | rebasing 2:177f92b77385 "c" | |
239 | rebasing 3:055a42cdd887 "d" |
|
235 | rebasing 3:055a42cdd887 "d" | |
240 | merging d |
|
236 | merging d | |
241 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
237 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
242 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
238 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
243 | [240] |
|
239 | [240] | |
244 | $ hg rebase --stop |
|
240 | $ hg rebase --stop | |
245 | 1 new orphan changesets |
|
241 | 1 new orphan changesets | |
246 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
242 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
247 | o 7:7fffad344617 test |
|
243 | o 7:7fffad344617 test | |
248 | | c |
|
244 | | c | |
249 | | |
|
245 | | | |
250 | o 6:b15528633407 test |
|
246 | o 6:b15528633407 test | |
251 | | b |
|
247 | | b | |
252 | | |
|
248 | | | |
253 | o 5:00bfc9898aeb test |
|
249 | o 5:00bfc9898aeb test | |
254 | | conflict with d |
|
250 | | conflict with d | |
255 | | |
|
251 | | | |
256 | o 4:dafd40200f93 test |
|
252 | o 4:dafd40200f93 test | |
257 | | f |
|
253 | | f | |
258 | | |
|
254 | | | |
259 | | @ 3:055a42cdd887 test |
|
255 | | @ 3:055a42cdd887 test | |
260 | | | d |
|
256 | | | d | |
261 | | | |
|
257 | | | | |
262 | | x 2:177f92b77385 test |
|
258 | | x 2:177f92b77385 test | |
263 | | | c |
|
259 | | | c | |
264 | | | |
|
260 | | | | |
265 | | x 1:d2ae7f538514 test |
|
261 | | x 1:d2ae7f538514 test | |
266 | |/ b |
|
262 | |/ b | |
267 | | |
|
263 | | | |
268 | o 0:cb9a9f314b8b test |
|
264 | o 0:cb9a9f314b8b test | |
269 | a |
|
265 | a | |
270 |
|
266 | |||
271 | Test it aborts if unstable csets is not allowed: |
|
267 | Test it aborts if unstable csets is not allowed: | |
272 | =============================================== |
|
268 | =============================================== | |
273 | $ cat >> $HGRCPATH << EOF |
|
269 | $ cat >> $HGRCPATH << EOF | |
274 | > [experimental] |
|
270 | > [experimental] | |
275 | > evolution.allowunstable=False |
|
271 | > evolution.allowunstable=False | |
276 | > EOF |
|
272 | > EOF | |
277 |
|
273 | |||
278 | $ hg strip 6 --no-backup -q |
|
274 | $ hg strip 6 --no-backup -q | |
279 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
275 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
280 | o 5:00bfc9898aeb test |
|
276 | o 5:00bfc9898aeb test | |
281 | | conflict with d |
|
277 | | conflict with d | |
282 | | |
|
278 | | | |
283 | o 4:dafd40200f93 test |
|
279 | o 4:dafd40200f93 test | |
284 | | f |
|
280 | | f | |
285 | | |
|
281 | | | |
286 | | @ 3:055a42cdd887 test |
|
282 | | @ 3:055a42cdd887 test | |
287 | | | d |
|
283 | | | d | |
288 | | | |
|
284 | | | | |
289 | | o 2:177f92b77385 test |
|
285 | | o 2:177f92b77385 test | |
290 | | | c |
|
286 | | | c | |
291 | | | |
|
287 | | | | |
292 | | o 1:d2ae7f538514 test |
|
288 | | o 1:d2ae7f538514 test | |
293 | |/ b |
|
289 | |/ b | |
294 | | |
|
290 | | | |
295 | o 0:cb9a9f314b8b test |
|
291 | o 0:cb9a9f314b8b test | |
296 | a |
|
292 | a | |
297 |
|
293 | |||
298 | $ hg rebase -s 1 -d 5 |
|
294 | $ hg rebase -s 1 -d 5 | |
299 | rebasing 1:d2ae7f538514 "b" |
|
295 | rebasing 1:d2ae7f538514 "b" | |
300 | rebasing 2:177f92b77385 "c" |
|
296 | rebasing 2:177f92b77385 "c" | |
301 | rebasing 3:055a42cdd887 "d" |
|
297 | rebasing 3:055a42cdd887 "d" | |
302 | merging d |
|
298 | merging d | |
303 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
299 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
304 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
300 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
305 | [240] |
|
301 | [240] | |
306 | $ hg rebase --stop |
|
302 | $ hg rebase --stop | |
307 | abort: cannot remove original changesets with unrebased descendants |
|
303 | abort: cannot remove original changesets with unrebased descendants | |
308 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) |
|
304 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) | |
309 | [20] |
|
305 | [20] | |
310 | $ hg rebase --abort |
|
306 | $ hg rebase --abort | |
311 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
307 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
312 | rebase aborted |
|
308 | rebase aborted | |
313 |
|
309 | |||
314 | Test --stop when --keep is passed: |
|
310 | Test --stop when --keep is passed: | |
315 | ================================== |
|
311 | ================================== | |
316 | $ hg rebase -s 1 -d 5 --keep |
|
312 | $ hg rebase -s 1 -d 5 --keep | |
317 | rebasing 1:d2ae7f538514 "b" |
|
313 | rebasing 1:d2ae7f538514 "b" | |
318 | rebasing 2:177f92b77385 "c" |
|
314 | rebasing 2:177f92b77385 "c" | |
319 | rebasing 3:055a42cdd887 "d" |
|
315 | rebasing 3:055a42cdd887 "d" | |
320 | merging d |
|
316 | merging d | |
321 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
317 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
322 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
318 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
323 | [240] |
|
319 | [240] | |
324 | $ hg rebase --stop |
|
320 | $ hg rebase --stop | |
325 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
321 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
326 | o 7:7fffad344617 test |
|
322 | o 7:7fffad344617 test | |
327 | | c |
|
323 | | c | |
328 | | |
|
324 | | | |
329 | o 6:b15528633407 test |
|
325 | o 6:b15528633407 test | |
330 | | b |
|
326 | | b | |
331 | | |
|
327 | | | |
332 | o 5:00bfc9898aeb test |
|
328 | o 5:00bfc9898aeb test | |
333 | | conflict with d |
|
329 | | conflict with d | |
334 | | |
|
330 | | | |
335 | o 4:dafd40200f93 test |
|
331 | o 4:dafd40200f93 test | |
336 | | f |
|
332 | | f | |
337 | | |
|
333 | | | |
338 | | @ 3:055a42cdd887 test |
|
334 | | @ 3:055a42cdd887 test | |
339 | | | d |
|
335 | | | d | |
340 | | | |
|
336 | | | | |
341 | | o 2:177f92b77385 test |
|
337 | | o 2:177f92b77385 test | |
342 | | | c |
|
338 | | | c | |
343 | | | |
|
339 | | | | |
344 | | o 1:d2ae7f538514 test |
|
340 | | o 1:d2ae7f538514 test | |
345 | |/ b |
|
341 | |/ b | |
346 | | |
|
342 | | | |
347 | o 0:cb9a9f314b8b test |
|
343 | o 0:cb9a9f314b8b test | |
348 | a |
|
344 | a | |
349 |
|
345 | |||
350 | Test --stop aborts when --collapse was passed: |
|
346 | Test --stop aborts when --collapse was passed: | |
351 | ============================================= |
|
347 | ============================================= | |
352 | $ cat >> $HGRCPATH << EOF |
|
348 | $ cat >> $HGRCPATH << EOF | |
353 | > [experimental] |
|
349 | > [experimental] | |
354 | > evolution.allowunstable=True |
|
350 | > evolution.allowunstable=True | |
355 | > EOF |
|
351 | > EOF | |
356 |
|
352 | |||
357 | $ hg strip 6 |
|
353 | $ hg strip 6 | |
358 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
354 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
359 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
355 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
360 | o 5:00bfc9898aeb test |
|
356 | o 5:00bfc9898aeb test | |
361 | | conflict with d |
|
357 | | conflict with d | |
362 | | |
|
358 | | | |
363 | o 4:dafd40200f93 test |
|
359 | o 4:dafd40200f93 test | |
364 | | f |
|
360 | | f | |
365 | | |
|
361 | | | |
366 | | @ 3:055a42cdd887 test |
|
362 | | @ 3:055a42cdd887 test | |
367 | | | d |
|
363 | | | d | |
368 | | | |
|
364 | | | | |
369 | | o 2:177f92b77385 test |
|
365 | | o 2:177f92b77385 test | |
370 | | | c |
|
366 | | | c | |
371 | | | |
|
367 | | | | |
372 | | o 1:d2ae7f538514 test |
|
368 | | o 1:d2ae7f538514 test | |
373 | |/ b |
|
369 | |/ b | |
374 | | |
|
370 | | | |
375 | o 0:cb9a9f314b8b test |
|
371 | o 0:cb9a9f314b8b test | |
376 | a |
|
372 | a | |
377 |
|
373 | |||
378 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" |
|
374 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" | |
379 | rebasing 1:d2ae7f538514 "b" |
|
375 | rebasing 1:d2ae7f538514 "b" | |
380 | rebasing 2:177f92b77385 "c" |
|
376 | rebasing 2:177f92b77385 "c" | |
381 | rebasing 3:055a42cdd887 "d" |
|
377 | rebasing 3:055a42cdd887 "d" | |
382 | merging d |
|
378 | merging d | |
383 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
379 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
384 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
380 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
385 | [240] |
|
381 | [240] | |
386 | $ hg rebase --stop |
|
382 | $ hg rebase --stop | |
387 | abort: cannot stop in --collapse session |
|
383 | abort: cannot stop in --collapse session | |
388 | [20] |
|
384 | [20] | |
389 | $ hg rebase --abort |
|
385 | $ hg rebase --abort | |
390 | rebase aborted |
|
386 | rebase aborted | |
391 | $ hg diff |
|
387 | $ hg diff | |
392 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
388 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
393 | o 5:00bfc9898aeb test |
|
389 | o 5:00bfc9898aeb test | |
394 | | conflict with d |
|
390 | | conflict with d | |
395 | | |
|
391 | | | |
396 | o 4:dafd40200f93 test |
|
392 | o 4:dafd40200f93 test | |
397 | | f |
|
393 | | f | |
398 | | |
|
394 | | | |
399 | | @ 3:055a42cdd887 test |
|
395 | | @ 3:055a42cdd887 test | |
400 | | | d |
|
396 | | | d | |
401 | | | |
|
397 | | | | |
402 | | o 2:177f92b77385 test |
|
398 | | o 2:177f92b77385 test | |
403 | | | c |
|
399 | | | c | |
404 | | | |
|
400 | | | | |
405 | | o 1:d2ae7f538514 test |
|
401 | | o 1:d2ae7f538514 test | |
406 | |/ b |
|
402 | |/ b | |
407 | | |
|
403 | | | |
408 | o 0:cb9a9f314b8b test |
|
404 | o 0:cb9a9f314b8b test | |
409 | a |
|
405 | a | |
410 |
|
406 | |||
411 | Test --stop raise errors with conflicting options: |
|
407 | Test --stop raise errors with conflicting options: | |
412 | ================================================= |
|
408 | ================================================= | |
413 | $ hg rebase -s 3 -d 5 |
|
409 | $ hg rebase -s 3 -d 5 | |
414 | rebasing 3:055a42cdd887 "d" |
|
410 | rebasing 3:055a42cdd887 "d" | |
415 | merging d |
|
411 | merging d | |
416 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
412 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
417 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
413 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
418 | [240] |
|
414 | [240] | |
419 | $ hg rebase --stop --dry-run |
|
415 | $ hg rebase --stop --dry-run | |
420 | abort: cannot specify both --stop and --dry-run |
|
416 | abort: cannot specify both --stop and --dry-run | |
421 | [10] |
|
417 | [10] | |
422 |
|
418 | |||
423 | $ hg rebase -s 3 -d 5 |
|
419 | $ hg rebase -s 3 -d 5 | |
424 | abort: rebase in progress |
|
420 | abort: rebase in progress | |
425 | (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop') |
|
421 | (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop') | |
426 | [20] |
|
422 | [20] | |
427 | $ hg rebase --stop --continue |
|
423 | $ hg rebase --stop --continue | |
428 | abort: cannot specify both --stop and --continue |
|
424 | abort: cannot specify both --stop and --continue | |
429 | [10] |
|
425 | [10] | |
430 |
|
426 | |||
431 | Test --stop moves bookmarks of original revisions to new rebased nodes: |
|
427 | Test --stop moves bookmarks of original revisions to new rebased nodes: | |
432 | ====================================================================== |
|
428 | ====================================================================== | |
433 | $ cd .. |
|
429 | $ cd .. | |
434 | $ hg init repo |
|
430 | $ hg init repo | |
435 | $ cd repo |
|
431 | $ cd repo | |
436 |
|
432 | |||
437 | $ echo a > a |
|
433 | $ echo a > a | |
438 | $ hg ci -Am A |
|
434 | $ hg ci -Am A | |
439 | adding a |
|
435 | adding a | |
440 |
|
436 | |||
441 | $ echo b > b |
|
437 | $ echo b > b | |
442 | $ hg ci -Am B |
|
438 | $ hg ci -Am B | |
443 | adding b |
|
439 | adding b | |
444 | $ hg book X |
|
440 | $ hg book X | |
445 | $ hg book Y |
|
441 | $ hg book Y | |
446 |
|
442 | |||
447 | $ echo c > c |
|
443 | $ echo c > c | |
448 | $ hg ci -Am C |
|
444 | $ hg ci -Am C | |
449 | adding c |
|
445 | adding c | |
450 | $ hg book Z |
|
446 | $ hg book Z | |
451 |
|
447 | |||
452 | $ echo d > d |
|
448 | $ echo d > d | |
453 | $ hg ci -Am D |
|
449 | $ hg ci -Am D | |
454 | adding d |
|
450 | adding d | |
455 |
|
451 | |||
456 | $ hg up 0 -q |
|
452 | $ hg up 0 -q | |
457 | $ echo e > e |
|
453 | $ echo e > e | |
458 | $ hg ci -Am E |
|
454 | $ hg ci -Am E | |
459 | adding e |
|
455 | adding e | |
460 | created new head |
|
456 | created new head | |
461 |
|
457 | |||
462 | $ echo doubt > d |
|
458 | $ echo doubt > d | |
463 | $ hg ci -Am "conflict with d" |
|
459 | $ hg ci -Am "conflict with d" | |
464 | adding d |
|
460 | adding d | |
465 |
|
461 | |||
466 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
462 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
467 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
463 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
468 | | |
|
464 | | | |
469 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
465 | o 4: 9c1e55f411b6 'E' bookmarks: | |
470 | | |
|
466 | | | |
471 | | o 3: 67a385d4e6f2 'D' bookmarks: Z |
|
467 | | o 3: 67a385d4e6f2 'D' bookmarks: Z | |
472 | | | |
|
468 | | | | |
473 | | o 2: 49cb3485fa0c 'C' bookmarks: Y |
|
469 | | o 2: 49cb3485fa0c 'C' bookmarks: Y | |
474 | | | |
|
470 | | | | |
475 | | o 1: 6c81ed0049f8 'B' bookmarks: X |
|
471 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
476 | |/ |
|
472 | |/ | |
477 | o 0: 1994f17a630e 'A' bookmarks: |
|
473 | o 0: 1994f17a630e 'A' bookmarks: | |
478 |
|
474 | |||
479 | $ hg rebase -s 1 -d 5 |
|
475 | $ hg rebase -s 1 -d 5 | |
480 | rebasing 1:6c81ed0049f8 X "B" |
|
476 | rebasing 1:6c81ed0049f8 X "B" | |
481 | rebasing 2:49cb3485fa0c Y "C" |
|
477 | rebasing 2:49cb3485fa0c Y "C" | |
482 | rebasing 3:67a385d4e6f2 Z "D" |
|
478 | rebasing 3:67a385d4e6f2 Z "D" | |
483 | merging d |
|
479 | merging d | |
484 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
480 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
485 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
481 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
486 | [240] |
|
482 | [240] | |
487 | $ hg rebase --stop |
|
483 | $ hg rebase --stop | |
488 | 1 new orphan changesets |
|
484 | 1 new orphan changesets | |
489 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
485 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
490 | o 7: 9c86c650b686 'C' bookmarks: Y |
|
486 | o 7: 9c86c650b686 'C' bookmarks: Y | |
491 | | |
|
487 | | | |
492 | o 6: 9b87b54e5fd8 'B' bookmarks: X |
|
488 | o 6: 9b87b54e5fd8 'B' bookmarks: X | |
493 | | |
|
489 | | | |
494 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
490 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
495 | | |
|
491 | | | |
496 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
492 | o 4: 9c1e55f411b6 'E' bookmarks: | |
497 | | |
|
493 | | | |
498 | | * 3: 67a385d4e6f2 'D' bookmarks: Z |
|
494 | | * 3: 67a385d4e6f2 'D' bookmarks: Z | |
499 | | | |
|
495 | | | | |
500 | | x 2: 49cb3485fa0c 'C' bookmarks: |
|
496 | | x 2: 49cb3485fa0c 'C' bookmarks: | |
501 | | | |
|
497 | | | | |
502 | | x 1: 6c81ed0049f8 'B' bookmarks: |
|
498 | | x 1: 6c81ed0049f8 'B' bookmarks: | |
503 | |/ |
|
499 | |/ | |
504 | o 0: 1994f17a630e 'A' bookmarks: |
|
500 | o 0: 1994f17a630e 'A' bookmarks: | |
505 |
|
501 |
General Comments 0
You need to be logged in to leave comments.
Login now