This is an archive of the discontinued Mercurial Phabricator instance.

upgrade: allow sidedata upgrade to modify revision flag
ClosedPublic

Authored by marmoute on Oct 13 2020, 6:40 AM.

Details

Summary

In the process, we fix the lack of HAS_COPIES_INFO flag on upgrade, and test the
results.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute created this revision.Oct 13 2020, 6:40 AM
pulkit added a subscriber: pulkit.Oct 14 2020, 3:29 AM
pulkit added inline comments.
mercurial/metadata.py
934

IIUC, this should be return False, f, {}, sidedataflag.REVIDX_HASCOPIESINFO, 0 instead of return False, f, {}, 0, sidedataflag.REVIDX_HASCOPIESINFO

mercurial/revlog.py
1494

unrelated change

1775

unrelated change

2047

unrelated change

tests/test-copies-chain-merge.t
1

Hm, didn't quite understand why we need a new case here.

marmoute added inline comments.Oct 14 2020, 4:43 AM
mercurial/metadata.py
934

Should it ? We are removing copy tracing sidedata information here. So we need to drop the flag.

tests/test-copies-chain-merge.t
1

(I just wrote a related reply on D9195)

They are three case I want tested (in addition to compatibility)

  1. how the copy tracing behave when it use information from the filelog
  2. how the copy tracing behave using sidedata generated at commit time
  3. how copy tracing behave using sidedata computed after the fact (the code that sets these metadata is completely different)

That last point is important, because the lack of it lead to breakage to got undetected.

marmoute updated this revision to Diff 23216.Oct 14 2020, 7:47 PM
marmoute marked 2 inline comments as done.Oct 14 2020, 7:48 PM
marmoute added inline comments.
mercurial/revlog.py
1775

These one should be fixed now.

pulkit accepted this revision.Oct 15 2020, 2:57 PM
This revision is now accepted and ready to land.Oct 15 2020, 2:57 PM
marmoute marked an inline comment as done.Oct 15 2020, 5:07 PM
marmoute updated this revision to Diff 23231.
This revision was automatically updated to reflect the committed changes.