Mercurial > evolve
comparison tests/test-evolve-continue.t @ 6198:cc80747ef3c8
evolve: support hg continue
author | Luke Granger-Brown <hg@lukegb.com> |
---|---|
date | Mon, 14 Mar 2022 18:00:00 +0000 |
parents | f1d4c9eddcc1 |
children | b1d1f4ade142 |
comparison
equal
deleted
inserted
replaced
6197:f1d4c9eddcc1 | 6198:cc80747ef3c8 |
---|---|
93 () draft | 93 () draft |
94 | 94 |
95 $ hg up | 95 $ hg up |
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
97 | 97 |
98 Testing hg continue for evolve | |
99 | |
100 $ hg up 'desc("added b")' | |
101 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
102 $ echo bar > c | |
103 $ hg add c | |
104 $ hg amend | |
105 2 new orphan changesets | |
106 $ hg glog | |
107 @ 7:8591ebad2ee8 added b | |
108 | () draft | |
109 | * 6:2a4e03d422e2 added d | |
110 | | () draft orphan | |
111 | * 5:cb6a2ab625bb added c | |
112 | | () draft orphan | |
113 | x 2:b1661037fa25 added b | |
114 |/ () draft | |
115 o 1:c7586e2a9264 added a | |
116 | () draft | |
117 o 0:8fa14d15e168 added hgignore | |
118 () draft | |
119 | |
120 $ hg evolve --all | |
121 move:[5] added c | |
122 atop:[7] added b | |
123 merging c (inmemory !) | |
124 hit merge conflicts; retrying merge in working copy (inmemory !) | |
125 merging c | |
126 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
127 unresolved merge conflicts | |
128 (see 'hg help evolve.interrupted') | |
129 [240] | |
130 | |
131 $ echo foo > c | |
132 $ hg resolve -m | |
133 (no more unresolved files) | |
134 continue: hg evolve --continue | |
135 | |
136 $ hg continue | |
137 evolving 5:cb6a2ab625bb "added c" | |
138 move:[6] added d | |
139 atop:[8] added c | |
140 | |
141 $ hg glog | |
142 o 9:ee53d012d45b added d | |
143 | () draft | |
144 o 8:ba3724c42438 added c | |
145 | () draft | |
146 @ 7:8591ebad2ee8 added b | |
147 | () draft | |
148 o 1:c7586e2a9264 added a | |
149 | () draft | |
150 o 0:8fa14d15e168 added hgignore | |
151 () draft | |
152 | |
153 $ hg up | |
154 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 | |
98 Case when conflicts resolution lead to empty wdir in evolve --continue | 156 Case when conflicts resolution lead to empty wdir in evolve --continue |
99 | 157 |
100 $ echo foo > e | 158 $ echo foo > e |
101 $ hg ci -Aqm "added e" | 159 $ hg ci -Aqm "added e" |
102 $ hg prev | 160 $ hg prev |
103 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 161 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
104 [6] added d | 162 [9] added d |
105 $ echo bar > e | 163 $ echo bar > e |
106 $ hg add e | 164 $ hg add e |
107 $ hg amend | 165 $ hg amend |
108 1 new orphan changesets | 166 1 new orphan changesets |
109 | 167 |
110 $ hg glog | 168 $ hg glog |
111 @ 8:00a5c774cc37 added d | 169 @ 11:184dba7cf613 added d |
112 | () draft | 170 | () draft |
113 | * 7:ad0a59d83efe added e | 171 | * 10:87d7311179ee added e |
114 | | () draft orphan | 172 | | () draft orphan |
115 | x 6:2a4e03d422e2 added d | 173 | x 9:ee53d012d45b added d |
116 |/ () draft | 174 |/ () draft |
117 o 5:cb6a2ab625bb added c | 175 o 8:ba3724c42438 added c |
118 | () draft | 176 | () draft |
119 o 2:b1661037fa25 added b | 177 o 7:8591ebad2ee8 added b |
120 | () draft | 178 | () draft |
121 o 1:c7586e2a9264 added a | 179 o 1:c7586e2a9264 added a |
122 | () draft | 180 | () draft |
123 o 0:8fa14d15e168 added hgignore | 181 o 0:8fa14d15e168 added hgignore |
124 () draft | 182 () draft |
125 | 183 |
126 $ hg evolve --update | 184 $ hg evolve --update |
127 move:[7] added e | 185 move:[10] added e |
128 atop:[8] added d | 186 atop:[11] added d |
129 merging e (inmemory !) | 187 merging e (inmemory !) |
130 hit merge conflicts; retrying merge in working copy (inmemory !) | 188 hit merge conflicts; retrying merge in working copy (inmemory !) |
131 merging e | 189 merging e |
132 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | 190 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
133 unresolved merge conflicts | 191 unresolved merge conflicts |
139 (no more unresolved files) | 197 (no more unresolved files) |
140 continue: hg evolve --continue | 198 continue: hg evolve --continue |
141 $ hg diff | 199 $ hg diff |
142 | 200 |
143 $ hg evolve --continue | 201 $ hg evolve --continue |
144 evolving 7:ad0a59d83efe "added e" | 202 evolving 10:87d7311179ee "added e" |
145 evolution of 7:ad0a59d83efe created no changes to commit | 203 evolution of 10:87d7311179ee created no changes to commit |
146 | 204 |
147 $ hg glog | 205 $ hg glog |
148 @ 8:00a5c774cc37 added d | 206 @ 11:184dba7cf613 added d |
149 | () draft | 207 | () draft |
150 o 5:cb6a2ab625bb added c | 208 o 8:ba3724c42438 added c |
151 | () draft | 209 | () draft |
152 o 2:b1661037fa25 added b | 210 o 7:8591ebad2ee8 added b |
153 | () draft | 211 | () draft |
154 o 1:c7586e2a9264 added a | 212 o 1:c7586e2a9264 added a |
155 | () draft | 213 | () draft |
156 o 0:8fa14d15e168 added hgignore | 214 o 0:8fa14d15e168 added hgignore |
157 () draft | 215 () draft |
164 $ hg add b | 222 $ hg add b |
165 $ hg amend | 223 $ hg amend |
166 3 new orphan changesets | 224 3 new orphan changesets |
167 | 225 |
168 $ hg evolve --all --update | 226 $ hg evolve --all --update |
169 move:[2] added b | 227 move:[7] added b |
170 atop:[9] added a | 228 atop:[12] added a |
171 merging b (inmemory !) | 229 merging b (inmemory !) |
172 hit merge conflicts; retrying merge in working copy (inmemory !) | 230 hit merge conflicts; retrying merge in working copy (inmemory !) |
173 merging b | 231 merging b |
174 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | 232 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
175 unresolved merge conflicts | 233 unresolved merge conflicts |
179 $ echo foo > b | 237 $ echo foo > b |
180 $ hg resolve -m | 238 $ hg resolve -m |
181 (no more unresolved files) | 239 (no more unresolved files) |
182 continue: hg evolve --continue | 240 continue: hg evolve --continue |
183 $ hg evolve --continue | 241 $ hg evolve --continue |
184 evolving 2:b1661037fa25 "added b" | 242 evolving 7:8591ebad2ee8 "added b" |
185 move:[5] added c | 243 move:[8] added c |
186 atop:[10] added b | 244 atop:[13] added b |
187 move:[8] added d | 245 move:[11] added d |
188 working directory is now at 6642d2c9176e | 246 working directory is now at 44cb92e89781 |
189 | 247 |
190 $ hg glog | 248 $ hg glog |
191 @ 12:6642d2c9176e added d | 249 @ 15:44cb92e89781 added d |
192 | () draft | 250 | () draft |
193 o 11:95665a2de664 added c | 251 o 14:152ba81b0477 added c |
194 | () draft | 252 | () draft |
195 o 10:87f748868183 added b | 253 o 13:58b400d15a91 added b |
196 | () draft | 254 | () draft |
197 o 9:53b632d203d8 added a | 255 o 12:53b632d203d8 added a |
198 | () draft | 256 | () draft |
199 o 0:8fa14d15e168 added hgignore | 257 o 0:8fa14d15e168 added hgignore |
200 () draft | 258 () draft |
201 | 259 |
202 Conlicts -> resolve -> continue -> conflicts -> resolve -> continue | 260 Conlicts -> resolve -> continue -> conflicts -> resolve -> continue |
203 Test multiple conflicts in one evolve | 261 Test multiple conflicts in one evolve |
204 | 262 |
205 $ for ch in f g h; do echo foo > $ch; hg add $ch; hg ci -m "added "$ch; done; | 263 $ for ch in f g h; do echo foo > $ch; hg add $ch; hg ci -m "added "$ch; done; |
206 | 264 |
207 $ hg glog | 265 $ hg glog |
208 @ 15:09becba8f97d added h | 266 @ 18:bc3b992c22bd added h |
209 | () draft | 267 | () draft |
210 o 14:5aa7b2bbd944 added g | 268 o 17:28352edcd58d added g |
211 | () draft | 269 | () draft |
212 o 13:be88f889b6dc added f | 270 o 16:f9f6a4a00822 added f |
213 | () draft | 271 | () draft |
214 o 12:6642d2c9176e added d | 272 o 15:44cb92e89781 added d |
215 | () draft | 273 | () draft |
216 o 11:95665a2de664 added c | 274 o 14:152ba81b0477 added c |
217 | () draft | 275 | () draft |
218 o 10:87f748868183 added b | 276 o 13:58b400d15a91 added b |
219 | () draft | 277 | () draft |
220 o 9:53b632d203d8 added a | 278 o 12:53b632d203d8 added a |
221 | () draft | 279 | () draft |
222 o 0:8fa14d15e168 added hgignore | 280 o 0:8fa14d15e168 added hgignore |
223 () draft | 281 () draft |
224 | 282 |
225 $ hg up 'desc("added c")' | 283 $ hg up 'desc("added c")' |
230 $ hg add f h | 288 $ hg add f h |
231 $ hg amend | 289 $ hg amend |
232 4 new orphan changesets | 290 4 new orphan changesets |
233 | 291 |
234 $ hg glog | 292 $ hg glog |
235 @ 16:645135c5caa4 added c | 293 @ 19:f4023955bf12 added c |
236 | () draft | 294 | () draft |
237 | * 15:09becba8f97d added h | 295 | * 18:bc3b992c22bd added h |
238 | | () draft orphan | 296 | | () draft orphan |
239 | * 14:5aa7b2bbd944 added g | 297 | * 17:28352edcd58d added g |
240 | | () draft orphan | 298 | | () draft orphan |
241 | * 13:be88f889b6dc added f | 299 | * 16:f9f6a4a00822 added f |
242 | | () draft orphan | 300 | | () draft orphan |
243 | * 12:6642d2c9176e added d | 301 | * 15:44cb92e89781 added d |
244 | | () draft orphan | 302 | | () draft orphan |
245 | x 11:95665a2de664 added c | 303 | x 14:152ba81b0477 added c |
246 |/ () draft | 304 |/ () draft |
247 o 10:87f748868183 added b | 305 o 13:58b400d15a91 added b |
248 | () draft | 306 | () draft |
249 o 9:53b632d203d8 added a | 307 o 12:53b632d203d8 added a |
250 | () draft | 308 | () draft |
251 o 0:8fa14d15e168 added hgignore | 309 o 0:8fa14d15e168 added hgignore |
252 () draft | 310 () draft |
253 | 311 |
254 $ hg evolve --all --update | 312 $ hg evolve --all --update |
255 move:[12] added d | 313 move:[15] added d |
256 atop:[16] added c | 314 atop:[19] added c |
257 move:[13] added f | 315 move:[16] added f |
258 merging f (inmemory !) | 316 merging f (inmemory !) |
259 hit merge conflicts; retrying merge in working copy (inmemory !) | 317 hit merge conflicts; retrying merge in working copy (inmemory !) |
260 merging f | 318 merging f |
261 warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | 319 warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
262 unresolved merge conflicts | 320 unresolved merge conflicts |
266 $ echo foo > f | 324 $ echo foo > f |
267 $ hg resolve -m | 325 $ hg resolve -m |
268 (no more unresolved files) | 326 (no more unresolved files) |
269 continue: hg evolve --continue | 327 continue: hg evolve --continue |
270 $ hg evolve --continue | 328 $ hg evolve --continue |
271 evolving 13:be88f889b6dc "added f" | 329 evolving 16:f9f6a4a00822 "added f" |
272 move:[14] added g | 330 move:[17] added g |
273 atop:[18] added f | 331 atop:[21] added f |
274 move:[15] added h | 332 move:[18] added h |
275 merging h (inmemory !) | 333 merging h (inmemory !) |
276 hit merge conflicts; retrying merge in working copy (inmemory !) | 334 hit merge conflicts; retrying merge in working copy (inmemory !) |
277 merging h | 335 merging h |
278 warning: conflicts while merging h! (edit, then use 'hg resolve --mark') | 336 warning: conflicts while merging h! (edit, then use 'hg resolve --mark') |
279 unresolved merge conflicts | 337 unresolved merge conflicts |
283 $ echo foo > h | 341 $ echo foo > h |
284 $ hg resolve -m | 342 $ hg resolve -m |
285 (no more unresolved files) | 343 (no more unresolved files) |
286 continue: hg evolve --continue | 344 continue: hg evolve --continue |
287 $ hg evolve --continue | 345 $ hg evolve --continue |
288 evolving 15:09becba8f97d "added h" | 346 evolving 18:bc3b992c22bd "added h" |
289 working directory is now at 3ba9d3d1b089 | 347 working directory is now at b4b76f2b86eb |
290 | 348 |
291 Make sure, confirmopt is respected while continue | 349 Make sure, confirmopt is respected while continue |
292 | 350 |
293 $ hg glog | 351 $ hg glog |
294 @ 20:3ba9d3d1b089 added h | 352 @ 23:b4b76f2b86eb added h |
295 | () draft | 353 | () draft |
296 o 19:981e615b14ca added g | 354 o 22:c75da1c807b4 added g |
297 | () draft | 355 | () draft |
298 o 18:5794f1a3cbb2 added f | 356 o 21:1b1bb06b1b76 added f |
299 | () draft | 357 | () draft |
300 o 17:e47537da02b3 added d | 358 o 20:63d80a6d5203 added d |
301 | () draft | 359 | () draft |
302 o 16:645135c5caa4 added c | 360 o 19:f4023955bf12 added c |
303 | () draft | 361 | () draft |
304 o 10:87f748868183 added b | 362 o 13:58b400d15a91 added b |
305 | () draft | 363 | () draft |
306 o 9:53b632d203d8 added a | 364 o 12:53b632d203d8 added a |
307 | () draft | 365 | () draft |
308 o 0:8fa14d15e168 added hgignore | 366 o 0:8fa14d15e168 added hgignore |
309 () draft | 367 () draft |
310 | 368 |
311 $ hg up 'desc("added f")' | 369 $ hg up 'desc("added f")' |
316 2 new orphan changesets | 374 2 new orphan changesets |
317 | 375 |
318 $ hg evolve --all --update --confirm << EOF | 376 $ hg evolve --all --update --confirm << EOF |
319 > y | 377 > y |
320 > EOF | 378 > EOF |
321 move:[19] added g | 379 move:[22] added g |
322 atop:[21] added f | 380 atop:[24] added f |
323 perform evolve? [Ny] y | 381 perform evolve? [Ny] y |
324 merging g (inmemory !) | 382 merging g (inmemory !) |
325 hit merge conflicts; retrying merge in working copy (inmemory !) | 383 hit merge conflicts; retrying merge in working copy (inmemory !) |
326 merging g | 384 merging g |
327 warning: conflicts while merging g! (edit, then use 'hg resolve --mark') | 385 warning: conflicts while merging g! (edit, then use 'hg resolve --mark') |
335 continue: hg evolve --continue | 393 continue: hg evolve --continue |
336 | 394 |
337 $ hg evolve --continue << EOF | 395 $ hg evolve --continue << EOF |
338 > y | 396 > y |
339 > EOF | 397 > EOF |
340 evolving 19:981e615b14ca "added g" | 398 evolving 22:c75da1c807b4 "added g" |
341 move:[20] added h | 399 move:[23] added h |
342 atop:[22] added g | 400 atop:[25] added g |
343 perform evolve? [Ny] y | 401 perform evolve? [Ny] y |
344 working directory is now at af6bd002a48d | 402 working directory is now at 53fa2be5b910 |
345 | 403 |
346 $ hg glog | 404 $ hg glog |
347 @ 23:af6bd002a48d added h | 405 @ 26:53fa2be5b910 added h |
348 | () draft | 406 | () draft |
349 o 22:d2c94a8f44bd added g | 407 o 25:3efe414bea19 added g |
350 | () draft | 408 | () draft |
351 o 21:9849fa96c885 added f | 409 o 24:a8dd354780ea added f |
352 | () draft | 410 | () draft |
353 o 17:e47537da02b3 added d | 411 o 20:63d80a6d5203 added d |
354 | () draft | 412 | () draft |
355 o 16:645135c5caa4 added c | 413 o 19:f4023955bf12 added c |
356 | () draft | 414 | () draft |
357 o 10:87f748868183 added b | 415 o 13:58b400d15a91 added b |
358 | () draft | 416 | () draft |
359 o 9:53b632d203d8 added a | 417 o 12:53b632d203d8 added a |
360 | () draft | 418 | () draft |
361 o 0:8fa14d15e168 added hgignore | 419 o 0:8fa14d15e168 added hgignore |
362 () draft | 420 () draft |
363 | 421 |
364 Testing `evolve --continue` after `hg next --evolve` | 422 Testing `evolve --continue` after `hg next --evolve` |
368 $ echo foobar > g | 426 $ echo foobar > g |
369 $ hg amend | 427 $ hg amend |
370 2 new orphan changesets | 428 2 new orphan changesets |
371 | 429 |
372 $ hg next --evolve | 430 $ hg next --evolve |
373 move:[22] added g | 431 move:[25] added g |
374 atop:[24] added f | 432 atop:[27] added f |
375 merging g (inmemory !) | 433 merging g (inmemory !) |
376 hit merge conflicts; retrying merge in working copy (inmemory !) | 434 hit merge conflicts; retrying merge in working copy (inmemory !) |
377 merging g | 435 merging g |
378 warning: conflicts while merging g! (edit, then use 'hg resolve --mark') | 436 warning: conflicts while merging g! (edit, then use 'hg resolve --mark') |
379 unresolved merge conflicts | 437 unresolved merge conflicts |
382 $ echo foo > g | 440 $ echo foo > g |
383 $ hg resolve -m | 441 $ hg resolve -m |
384 (no more unresolved files) | 442 (no more unresolved files) |
385 continue: hg evolve --continue | 443 continue: hg evolve --continue |
386 $ hg evolve --continue | 444 $ hg evolve --continue |
387 evolving 22:d2c94a8f44bd "added g" | 445 evolving 25:3efe414bea19 "added g" |
388 | 446 |
389 Testing that interrupted evolve don't get confused about copies (issue5930): | 447 Testing that interrupted evolve don't get confused about copies (issue5930): |
390 ---------------------------------------------------------------------------- | 448 ---------------------------------------------------------------------------- |
391 | 449 |
392 $ cd .. | 450 $ cd .. |