( )⚙ D10320 remotefilelog: include file contents in bundles produced during strip

This is an archive of the discontinued Mercurial Phabricator instance.

remotefilelog: include file contents in bundles produced during strip
ClosedPublic

Authored by spectral on Apr 6 2021, 8:21 PM.

Details

Summary

hg strip and other things that use repair.strip (such as the narrow
extension's hg tracked --removeinclude) will "save" some commits that have a
higher revision number than the oldest commit we're stripping, but aren't
actually descended from any of the commits that we're stripping. It saves them
in a bundle, and then reapplies them to the repo.

Remotefilelog doesn't generally participate in strip, it doesn't contribute
files to either the backup bundle or the "saved" bundle, and doesn't adjust
linknodes when commits are stripped. This can break things like push, which
rely on the linknodes.

This change makes it so that remotefilelog includes files in these bundles
during strip operations. During reapplication, the files are reapplied from the
bundle, and the linknode is properly updated.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

spectral created this revision.Apr 6 2021, 8:21 PM
pulkit accepted this revision.Apr 8 2021, 2:57 AM
This revision is now accepted and ready to land.Apr 8 2021, 2:57 AM