comparison tests/test-stabilize-result.t @ 4481:d02a7c8cdee5 stable

test: consolidate the content-divergent test cases This commit move most of the content divergent related test in dedicated and thematic test files.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 10 Apr 2019 14:32:00 +0200
parents 8aa28e68ac44
children
comparison
equal deleted inserted replaced
4480:d18044dfc584 4481:d02a7c8cdee5
202 @@ -1,3 +1,4 @@ 202 @@ -1,3 +1,4 @@
203 a 203 a
204 a 204 a
205 newer a 205 newer a
206 +babar 206 +babar
207
208 Stabilize divergent changesets with same parent
209 ===============================================
210
211 $ rm a.orig
212 $ hg up 7bc2f5967f5e
213 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 $ cat << EOF >> a
215 > flore
216 > arthur
217 > zephir
218 > some
219 > less
220 > conflict
221 > EOF
222 $ hg ci -m 'More addition'
223 $ glog
224 @ 12:3932c176bbaa@default(draft) bk:[] More addition
225 |
226 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
227 | |
228 o | 7:7bc2f5967f5e@default(draft) bk:[] add c
229 | |
230 | o 6:1cf0aacfd363@default(public) bk:[] newer a
231 |/
232 o 5:66719795a494@default(public) bk:[changea] changea
233 |
234 o 0:07f494440405@default(public) bk:[] adda
235
236 $ echo 'babar' >> a
237 $ hg amend
238 $ hg up --hidden 3932c176bbaa
239 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 updated to hidden changeset 3932c176bbaa
241 (hidden revision '3932c176bbaa' was rewritten as: d2f173e25686)
242 working directory parent is obsolete! (3932c176bbaa)
243 (use 'hg evolve' to update to its successor: d2f173e25686)
244 $ mv a a.old
245 $ echo 'jungle' > a
246 $ cat a.old >> a
247 $ rm a.old
248 $ hg amend
249 2 new content-divergent changesets
250 $ glog
251 @ 14:eacc9c8240fe@default(draft) bk:[] More addition
252 |
253 | * 13:d2f173e25686@default(draft) bk:[] More addition
254 |/
255 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
256 | |
257 o | 7:7bc2f5967f5e@default(draft) bk:[] add c
258 | |
259 | o 6:1cf0aacfd363@default(public) bk:[] newer a
260 |/
261 o 5:66719795a494@default(public) bk:[changea] changea
262 |
263 o 0:07f494440405@default(public) bk:[] adda
264
265
266 Stabilize it
267
268 $ hg evolve -qn --confirm --content-divergent
269 merge:[14] More addition
270 with: [13] More addition
271 base: [12] More addition
272 perform evolve? [Ny] n
273 abort: evolve aborted by user
274 [255]
275 $ echo y | hg evolve -qn --confirm --config ui.interactive=True --content-divergent
276 merge:[14] More addition
277 with: [13] More addition
278 base: [12] More addition
279 perform evolve? [Ny] y
280 hg update -c eacc9c8240fe &&
281 hg merge d2f173e25686 &&
282 hg commit -m "auto merge resolving conflict between eacc9c8240fe and d2f173e25686"&&
283 hg up -C 3932c176bbaa &&
284 hg revert --all --rev tip &&
285 hg commit -m "`hg log -r eacc9c8240fe --template={desc}`";
286 $ hg evolve -v --content-divergent
287 merge:[14] More addition
288 with: [13] More addition
289 base: [12] More addition
290 merging "other" content-divergent changeset 'd2f173e25686'
291 resolving manifests
292 merging a
293 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
294 committing files:
295 a
296 committing manifest
297 committing changelog
298 working directory is now at 4d6ed26797bc
299 $ hg st
300 $ glog
301 @ 15:4d6ed26797bc@default(draft) bk:[] More addition
302 |
303 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
304 | |
305 o | 7:7bc2f5967f5e@default(draft) bk:[] add c
306 | |
307 | o 6:1cf0aacfd363@default(public) bk:[] newer a
308 |/
309 o 5:66719795a494@default(public) bk:[changea] changea
310 |
311 o 0:07f494440405@default(public) bk:[] adda
312
313 $ hg summary
314 parent: 15:4d6ed26797bc tip
315 More addition
316 branch: default
317 commit: (clean)
318 update: 2 new changesets, 2 branch heads (merge)
319 phases: 3 draft
320 $ hg export .
321 # HG changeset patch
322 # User test
323 # Date 0 0
324 # Thu Jan 01 00:00:00 1970 +0000
325 # Node ID 4d6ed26797bc392c0099e48402a5134e669f1a60
326 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
327 More addition
328
329 diff -r 7bc2f5967f5e -r 4d6ed26797bc a
330 --- a/a Thu Jan 01 00:00:00 1970 +0000
331 +++ b/a Thu Jan 01 00:00:00 1970 +0000
332 @@ -1,1 +1,9 @@
333 +jungle
334 a
335 +flore
336 +arthur
337 +zephir
338 +some
339 +less
340 +conflict
341 +babar
342
343 Check conflict during divergence resolution
344 -------------------------------------------------
345
346 $ hg up --hidden 3932c176bbaa
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
348 updated to hidden changeset 3932c176bbaa
349 (hidden revision '3932c176bbaa' was rewritten as: 4d6ed26797bc)
350 working directory parent is obsolete! (3932c176bbaa)
351 (use 'hg evolve' to update to its successor: 4d6ed26797bc)
352 $ echo 'gotta break' >> a
353 $ hg amend
354 2 new content-divergent changesets
355 # reamend so that the case is not the first precursor.
356 $ hg amend -m "More addition (2)"
357 $ hg phase 'contentdivergent()'
358 15: draft
359 17: draft
360
361 $ glog
362 @ 17:0b336205a5d0@default(draft) bk:[] More addition (2)
363 |
364 | * 15:4d6ed26797bc@default(draft) bk:[] More addition
365 |/
366 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
367 | |
368 o | 7:7bc2f5967f5e@default(draft) bk:[] add c
369 | |
370 | o 6:1cf0aacfd363@default(public) bk:[] newer a
371 |/
372 o 5:66719795a494@default(public) bk:[changea] changea
373 |
374 o 0:07f494440405@default(public) bk:[] adda
375
376
377 $ hg evolve -qn --content-divergent
378 hg update -c 0b336205a5d0 &&
379 hg merge 4d6ed26797bc &&
380 hg commit -m "auto merge resolving conflict between 0b336205a5d0 and 4d6ed26797bc"&&
381 hg up -C 3932c176bbaa &&
382 hg revert --all --rev tip &&
383 hg commit -m "`hg log -r 0b336205a5d0 --template={desc}`";
384 $ hg evolve --content-divergent
385 merge:[17] More addition (2)
386 with: [15] More addition
387 base: [12] More addition
388 merging "other" content-divergent changeset '4d6ed26797bc'
389 merging a
390 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
391 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
392 fix conflicts and see `hg help evolve.interrupted`
393 [1]
394
395 $ cat > a <<EOF
396 > jungle
397 > a
398 > flore
399 > arthur
400 > zephir
401 > some
402 > less
403 > conflict
404 > babar
405 > EOF
406
407 $ hg resolve -m
408 (no more unresolved files)
409 continue: hg evolve --continue
410 $ hg evolve --continue
411 working directory is now at e8746835a2a1
412 $ glog
413 @ 18:e8746835a2a1@default(draft) bk:[] More addition (2)
414 |
415 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
416 | |
417 o | 7:7bc2f5967f5e@default(draft) bk:[] add c
418 | |
419 | o 6:1cf0aacfd363@default(public) bk:[] newer a
420 |/
421 o 5:66719795a494@default(public) bk:[changea] changea
422 |
423 o 0:07f494440405@default(public) bk:[] adda
424
425 $ hg exp
426 # HG changeset patch
427 # User test
428 # Date 0 0
429 # Thu Jan 01 00:00:00 1970 +0000
430 # Node ID e8746835a2a13122bc8c0ed84fe4ee35649af25d
431 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
432 More addition (2)
433
434 diff -r 7bc2f5967f5e -r e8746835a2a1 a
435 --- a/a Thu Jan 01 00:00:00 1970 +0000
436 +++ b/a Thu Jan 01 00:00:00 1970 +0000
437 @@ -1,1 +1,9 @@
438 +jungle
439 a
440 +flore
441 +arthur
442 +zephir
443 +some
444 +less
445 +conflict
446 +babar