818 files = compute_all_files_changes(ctx) |
818 files = compute_all_files_changes(ctx) |
819 return encode_files_sidedata(files), files.has_copies_info |
819 return encode_files_sidedata(files), files.has_copies_info |
820 |
820 |
821 |
821 |
822 def copies_sidedata_computer(repo, revlog, rev, existing_sidedata): |
822 def copies_sidedata_computer(repo, revlog, rev, existing_sidedata): |
823 return _getsidedata(repo, rev)[0] |
823 sidedata, has_copies_info = _getsidedata(repo, rev) |
|
824 flags_to_add = sidedataflag.REVIDX_HASCOPIESINFO if has_copies_info else 0 |
|
825 return sidedata, (flags_to_add, 0) |
824 |
826 |
825 |
827 |
826 def set_sidedata_spec_for_repo(repo): |
828 def set_sidedata_spec_for_repo(repo): |
827 if requirementsmod.COPIESSDC_REQUIREMENT in repo.requirements: |
829 if requirementsmod.COPIESSDC_REQUIREMENT in repo.requirements: |
828 repo.register_wanted_sidedata(sidedatamod.SD_FILES) |
830 repo.register_wanted_sidedata(sidedatamod.SD_FILES) |
829 repo.register_sidedata_computer( |
831 repo.register_sidedata_computer( |
830 revlogconst.KIND_CHANGELOG, |
832 revlogconst.KIND_CHANGELOG, |
831 sidedatamod.SD_FILES, |
833 sidedatamod.SD_FILES, |
832 (sidedatamod.SD_FILES,), |
834 (sidedatamod.SD_FILES,), |
833 copies_sidedata_computer, |
835 copies_sidedata_computer, |
|
836 sidedataflag.REVIDX_HASCOPIESINFO, |
834 ) |
837 ) |
835 |
838 |
836 |
839 |
837 def getsidedataadder(srcrepo, destrepo): |
840 def getsidedataadder(srcrepo, destrepo): |
838 use_w = srcrepo.ui.configbool(b'experimental', b'worker.repository-upgrade') |
841 use_w = srcrepo.ui.configbool(b'experimental', b'worker.repository-upgrade') |