Mercurial > hg
diff tests/test-copies-chain-merge.t @ 46814:c52c3c4cbd3f
copies: detect files as `touched/salvaged` if they only existed on one side
The file cannot be merged if there was content to merge on the other side. So
the previous record was wrong.
In the general case, the file existed only on one side and got touched during the
merge. So it should detected as touched.
They are a special case where the merge manually prevent the file to be deleted.
In this case the file is marked as `salvaged`.
The result of this `salvaged` recording, copy-tracing-wise, is the same as
recording it as `merged`. This is probably why they were recorded as `merged` in
the first place.
Differential Revision: https://phab.mercurial-scm.org/D10219
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 15 Mar 2021 13:37:45 +0100 |
parents | 316a768f2e43 |
children | 433cef8f3104 |
line wrap: on
line diff
--- a/tests/test-copies-chain-merge.t Tue Mar 02 02:00:29 2021 +0100 +++ b/tests/test-copies-chain-merge.t Mon Mar 15 13:37:45 2021 +0100 @@ -1987,29 +1987,13 @@ ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" ##### 1 sidedata entries entry-0014 size 14 - '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) - salvaged : d, ; (no-upgraded no-upgraded-parallel !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) - merged : d, ; (upgraded known-bad-output !) - '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) - salvaged : d, ; (upgraded missing-correct-output !) - '\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\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) - salvaged : d, ; (upgraded-parallel missing-correct-output !) + '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' + salvaged : d, ; ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" ##### 1 sidedata entries entry-0014 size 14 - '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (no-upgraded no-upgraded-parallel !) - salvaged : d, ; (no-upgraded no-upgraded-parallel !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded known-bad-output !) - merged : d, ; (upgraded known-bad-output !) - '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded missing-correct-output !) - salvaged : d, ; (upgraded missing-correct-output !) - '\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\x10\x00\x00\x00\x01\x00\x00\x00\x00d' (upgraded-parallel missing-correct-output !) - salvaged : d, ; (upgraded-parallel missing-correct-output !) + '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' + salvaged : d, ; ##### revision "j-1" ##### 1 sidedata entries entry-0014 size 24 @@ -2031,21 +2015,13 @@ ##### revision "mEA,Jm" ##### 1 sidedata entries entry-0014 size 24 - '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (no-upgraded no-upgraded-parallel !) - touched : unrelated-j, ; (no-upgraded no-upgraded-parallel !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (upgraded known-bad-output !) - merged : unrelated-j, ; (upgraded known-bad-output !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (upgraded-parallel known-bad-output !) - merged : unrelated-j, ; (upgraded-parallel known-bad-output !) + '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' + touched : unrelated-j, ; ##### revision "mJ,EAm" ##### 1 sidedata entries entry-0014 size 24 - '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (no-upgraded no-upgraded-parallel !) - touched : unrelated-j, ; (no-upgraded no-upgraded-parallel !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (upgraded known-bad-output !) - merged : unrelated-j, ; (upgraded known-bad-output !) - '\x00\x00\x00\x01\x08\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' (upgraded-parallel known-bad-output !) - merged : unrelated-j, ; (upgraded-parallel known-bad-output !) + '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' + touched : unrelated-j, ; ##### revision "s-1" ##### 1 sidedata entries entry-0014 size 24 @@ -3560,9 +3536,7 @@ $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")' M b A d - a (no-compatibility no-changeset no-upgraded no-upgraded-parallel !) - a (upgraded missing-correct-output !) - a (upgraded-parallel missing-correct-output !) + a (no-compatibility no-changeset !) A t p R a