Mercurial > hg
comparison tests/test-copies-unrelated.t @ 43298:dda9482f60d2
copies: add an explicit test using multiple roots
We explicitly add a test checking for copies of connected revision but involving
a different roots. This make sure the copies coming purely from the new roots
does not interfere with the merge.
Differential Revision: https://phab.mercurial-scm.org/D7075
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 12 Oct 2019 17:53:29 +0200 |
parents | 0171483b082f |
children | 16c361152133 |
comparison
equal
deleted
inserted
replaced
43297:8a2925265402 | 43298:dda9482f60d2 |
---|---|
392 x | 392 x |
393 $ hg debugpathcopies 1 2 | 393 $ hg debugpathcopies 1 2 |
394 $ hg debugpathcopies 2 1 | 394 $ hg debugpathcopies 2 1 |
395 $ hg graft -r 1 | 395 $ hg graft -r 1 |
396 grafting 1:* "copy x to y" (glob) | 396 grafting 1:* "copy x to y" (glob) |
397 | |
398 Copies involving a merge of multiple roots. | |
399 | |
400 $ newrepo | |
401 $ echo a > a | |
402 $ hg ci -Aqm 'add a' | |
403 $ echo a >> a | |
404 $ hg ci -Aqm 'update a' | |
405 $ echo a >> a | |
406 $ hg ci -Aqm 'update a' | |
407 | |
408 $ hg up null | |
409 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
410 $ echo b > a | |
411 $ hg ci -Aqm 'add a' | |
412 $ hg mv a b | |
413 $ hg ci -Aqm 'move a to b' | |
414 $ echo b >> b | |
415 $ hg ci -Aqm 'update b' | |
416 $ hg merge 0 | |
417 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
418 (branch merge, don't forget to commit) | |
419 $ hg ci -m "merge with other branch" | |
420 $ echo a >> a | |
421 $ echo a >> a | |
422 $ echo b >> b | |
423 $ hg ci -Aqm 'update a and b' | |
424 $ hg l | |
425 @ 7 update a and b | |
426 | a b | |
427 o 6 merge with other branch | |
428 |\ | |
429 | o 5 update b | |
430 | | b | |
431 | o 4 move a to b | |
432 | | a b | |
433 | o 3 add a | |
434 | a | |
435 | o 2 update a | |
436 | | a | |
437 | o 1 update a | |
438 |/ a | |
439 o 0 add a | |
440 a | |
441 $ hg cat a -r 7 | |
442 a | |
443 a | |
444 a | |
445 $ hg cat a -r 2 | |
446 a | |
447 a | |
448 a | |
449 $ hg cat a -r 0 | |
450 a | |
451 $ hg debugpathcopies 7 2 | |
452 $ hg debugpathcopies 2 7 | |
453 $ hg merge 2 | |
454 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
455 (branch merge, don't forget to commit) | |
456 |