Mercurial > hg
diff tests/test-copies-chain-merge.t @ 46811:5a0b930cfb3e
commit: get info from mergestate whether a file was merged or not
While commiting a merge, the commit code does not know whether a file was merged
during `hg merge` or not. This leads the commit code to look for filelog
ancestor to choose parents of new filelog created on merge commit.
This leads to wrong results in some cases as demonstrated by previous patch.
From this patch, we start storing information about merged files in mergestate
in stateextras and then use that on commit to detect whether we need to set two
parents or not.
Differential Revision: https://phab.mercurial-scm.org/D10149
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 10 Mar 2021 13:14:32 +0530 |
parents | 6b52cffd8d0a |
children | e4696ba43ecd |
line wrap: on
line diff
--- a/tests/test-copies-chain-merge.t Wed Mar 17 20:06:35 2021 +0100 +++ b/tests/test-copies-chain-merge.t Wed Mar 10 13:14:32 2021 +0530 @@ -946,8 +946,7 @@ $ hg ci -m "mFB-change-m-0 $case_desc - the other way" created new head $ hg manifest --rev . --debug | grep " d" - 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset missing-correct-output !) - 646ed7992dec41eb29635ab28268e7867d0e59a0 644 d (no-changeset known-bad-output !) + 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) #if no-changeset $ hg debugindex d | ../no-linkrev @@ -961,7 +960,6 @@ 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 7 * d55cb4e9ef57 000000000000 000000000000 8 * 1c334238bd42 7b79e2fe0c89 000000000000 - 9 * 646ed7992dec 7b79e2fe0c89 d8252ab2e760 (known-bad-output !) #else $ hg debugindex d | ../no-linkrev rev linkrev nodeid p1 p2 @@ -1917,10 +1915,12 @@ ##### revision "mFB-change-m-0 merge with extra change - B side" ##### 1 sidedata entries entry-0014 size 14 - '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (known-bad-output !) - merged : d, ; (known-bad-output !) - '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (missing-correct-output !) - touched : d, ; (missing-correct-output !) + '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) + touched : d, ; (no-upgraded no-upgraded-parallel !) + '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel known-bad-output !) + merged : d, ; (upgraded-parallel known-bad-output !) + '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) + merged : d, ; (upgraded known-bad-output !) ##### revision "j-1" ##### 1 sidedata entries entry-0014 size 24 @@ -3357,13 +3357,7 @@ $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")' M b A d - h (filelog missing-correct-output !) - a (filelog known-bad-output !) - h (sidedata !) - h (upgraded !) - h (upgraded-parallel !) - h (changeset !) - h (compatibility !) + h A t p R a @@ -3422,10 +3416,6 @@ | : o : f-1: rename h -> i :/ - o i-2: c -move-> d, s -move-> t (known-bad-output !) - | (known-bad-output !) - o i-1: a -move-> c, p -move-> s (known-bad-output !) - | (known-bad-output !) o i-0 initial commit: a b h p q r #else