The new p, q and r file mirror the a, b and h but with different
content for each files. This will be used to create "mirror" test case that
involve actual merge happening.
For now, we only add the file to keep patches small and easier to review.
hg-reviewers |
The new p, q and r file mirror the a, b and h but with different
content for each files. This will be used to create "mirror" test case that
involve actual merge happening.
For now, we only add the file to keep patches small and easier to review.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-copies-chain-merge.t (18 lines) |
$ hg init repo-chain | $ hg init repo-chain | ||||
$ cd repo-chain | $ cd repo-chain | ||||
Add some linear rename initialy | Add some linear rename initialy | ||||
$ cp ../same-content.txt a | $ cp ../same-content.txt a | ||||
$ cp ../same-content.txt b | $ cp ../same-content.txt b | ||||
$ cp ../same-content.txt h | $ cp ../same-content.txt h | ||||
$ echo "original content for P" > p | |||||
$ echo "original content for Q" > q | |||||
$ echo "original content for R" > r | |||||
$ hg ci -Am 'i-0 initial commit: a b h' | $ hg ci -Am 'i-0 initial commit: a b h' | ||||
adding a | adding a | ||||
adding b | adding b | ||||
adding h | adding h | ||||
adding p | |||||
adding q | |||||
adding r | |||||
$ hg mv a c | $ hg mv a c | ||||
$ hg ci -Am 'i-1: a -move-> c' | $ hg ci -Am 'i-1: a -move-> c' | ||||
$ hg mv c d | $ hg mv c d | ||||
$ hg ci -Am 'i-2: c -move-> d' | $ hg ci -Am 'i-2: c -move-> d' | ||||
$ hg log -G | $ hg log -G | ||||
@ i-2: c -move-> d | @ i-2: c -move-> d | ||||
| | | | ||||
o i-1: a -move-> c | o i-1: a -move-> c | ||||
Create a "conflicting" merge where `d` get removed on one branch before its | Create a "conflicting" merge where `d` get removed on one branch before its | ||||
rename information actually conflict with the other branch. | rename information actually conflict with the other branch. | ||||
(the copy information from the branch that was not deleted should win). | (the copy information from the branch that was not deleted should win). | ||||
$ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" | $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" | ||||
$ hg up 'desc("i-0")' | $ hg up 'desc("i-0")' | ||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg mv b d | $ hg mv b d | ||||
$ hg ci -m "h-1: b -(move)-> d" | $ hg ci -m "h-1: b -(move)-> d" | ||||
created new head | created new head | ||||
$ hg up 'desc("c-1")' | $ hg up 'desc("c-1")' | ||||
1 files updated, 0 files merged, 2 files removed, 0 files unresolved | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
$ hg merge 'desc("h-1")' | $ hg merge 'desc("h-1")' | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
#if no-compatibility no-filelog no-changeset | #if no-compatibility no-filelog no-changeset | ||||
$ hg debugchangedfiles --compute 0 | $ hg debugchangedfiles --compute 0 | ||||
added : a, ; | added : a, ; | ||||
added : b, ; | added : b, ; | ||||
added : h, ; | added : h, ; | ||||
added : p, ; | |||||
added : q, ; | |||||
added : r, ; | |||||
$ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | ||||
> case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` | ||||
> echo "##### revision \"$case_id\" #####" | > echo "##### revision \"$case_id\" #####" | ||||
> hg debugsidedata -c -v -- $rev | > hg debugsidedata -c -v -- $rev | ||||
> hg debugchangedfiles $rev | > hg debugchangedfiles $rev | ||||
> done | > done | ||||
##### revision "i-0 initial commit" ##### | ##### revision "i-0 initial commit" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 34 | entry-0014 size 64 | ||||
'\x00\x00\x00\x03\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00abh' | '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr' | ||||
added : a, ; | added : a, ; | ||||
added : b, ; | added : b, ; | ||||
added : h, ; | added : h, ; | ||||
added : p, ; | |||||
added : q, ; | |||||
added : r, ; | |||||
##### revision "i-1" ##### | ##### revision "i-1" ##### | ||||
1 sidedata entries | 1 sidedata entries | ||||
entry-0014 size 24 | entry-0014 size 24 | ||||
'\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' | ||||
removed : a, ; | removed : a, ; | ||||
added p1: c, a; | added p1: c, a; | ||||
##### revision "i-2" ##### | ##### revision "i-2" ##### | ||||
1 sidedata entries | 1 sidedata entries |