comparison tests/test-copies-in-changeset.t @ 46718:ba8e508a8e69

sidedata-exchange: rewrite sidedata on-the-fly whenever possible When a A exchanges with B, the difference of their supported sidedata categories is made, and the responsibility is always with the client to generated it: - If A pushes to B and B requires category `foo` that A does not have, A will need to generate it when sending it to B. - If A pulls from B and A needs category `foo`, it will generate `foo` before the end of the transaction. - Any category that is not required is removed. If peers are not compatible, abort. It is forbidden to rewrite sidedata for a rev that already has sidedata, since that would introduce unreachable (garbage) data in the data file, something we're not prepared for yet. Differential Revision: https://phab.mercurial-scm.org/D10032
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 19 Feb 2021 11:24:50 +0100
parents 3d740058b467
children 84a93fa7ecfd
comparison
equal deleted inserted replaced
46717:502e795b55ac 46718:ba8e508a8e69
269 269
270 #else 270 #else
271 $ hg ci --amend -m 'copy a to j, v2' 271 $ hg ci --amend -m 'copy a to j, v2'
272 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob) 272 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
273 $ hg debugsidedata -c -v -- -1 273 $ hg debugsidedata -c -v -- -1
274 1 sidedata entries (missing-correct-output !) 274 1 sidedata entries
275 entry-0014 size 24 (missing-correct-output !) 275 entry-0014 size 24
276 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj' (missing-correct-output !) 276 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
277 #endif 277 #endif
278 $ hg showcopies --config experimental.copies.read-from=filelog-only 278 $ hg showcopies --config experimental.copies.read-from=filelog-only
279 a -> j (sidedata missing-correct-output !) 279 a -> j
280 a -> j (no-sidedata !)
281 The entries should be written to extras even if they're empty (so the client 280 The entries should be written to extras even if they're empty (so the client
282 won't have to fall back to reading from filelogs) 281 won't have to fall back to reading from filelogs)
283 $ echo x >> j 282 $ echo x >> j
284 #if extra 283 #if extra
285 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility 284 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
353 rebasing 2:* tip "rename a to b" (glob) 352 rebasing 2:* tip "rename a to b" (glob)
354 merging a and b to b 353 merging a and b to b
355 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob) 354 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
356 $ hg st --change . --copies 355 $ hg st --change . --copies
357 A b 356 A b
358 a (sidedata missing-correct-output !) 357 a
359 a (no-sidedata !)
360 R a 358 R a
361 $ cd .. 359 $ cd ..
362 360
363 Test splitting a commit 361 Test splitting a commit
364 362