Mercurial > hg
comparison tests/test-remotefilelog-prefetch.t @ 46847:47a9527731c3
remotefilelog: include file contents in bundles produced during strip
`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.
Differential Revision: https://phab.mercurial-scm.org/D10320
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Tue, 06 Apr 2021 14:21:03 -0700 |
parents | dc00324e80f4 |
children | 84a93fa7ecfd |
comparison
equal
deleted
inserted
replaced
46846:2819df466cae | 46847:47a9527731c3 |
---|---|
84 # prefetch on pull when configured | 84 # prefetch on pull when configured |
85 | 85 |
86 $ printf "[remotefilelog]\npullprefetch=bookmark()\n" >> .hg/hgrc | 86 $ printf "[remotefilelog]\npullprefetch=bookmark()\n" >> .hg/hgrc |
87 $ hg strip tip | 87 $ hg strip tip |
88 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/109c3a557a73-3f43405e-backup.hg (glob) | 88 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/109c3a557a73-3f43405e-backup.hg (glob) |
89 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) | |
89 | 90 |
90 $ clearcache | 91 $ clearcache |
91 $ hg pull | 92 $ hg pull |
92 pulling from ssh://user@dummy/master | 93 pulling from ssh://user@dummy/master |
93 searching for changes | 94 searching for changes |