mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
remotefilelog: local loosefiles should always be fully repacked
Summary: The loosefiles repack was made incremental to greatly reduce the repack time for users. Since the amount of local loosefiles should be way smaller than the amount of shared ones, let's always run a full repack on the former. This should allow us to kill all the local loosefiles, which will help in no longer supporting them. Reviewed By: quark-zju Differential Revision: D17135975 fbshipit-source-id: 9480993b31aa57d0d6e6b7caffd282929183f782
This commit is contained in:
parent
91462ec10e
commit
4b28370d5e
@ -152,29 +152,23 @@ def _shareddatastoresrepack(repo, options, incremental):
|
||||
|
||||
def _localdatapythonrepack(repo, options, packpath, incremental):
|
||||
if incremental:
|
||||
_incrementalrepack(
|
||||
repo,
|
||||
repo.fileslog.localdatastores,
|
||||
repo.fileslog.localhistorystores,
|
||||
packpath,
|
||||
constants.FILEPACK_CATEGORY,
|
||||
options=options,
|
||||
shared=False,
|
||||
)
|
||||
else:
|
||||
datasource = contentstore.unioncontentstore(*repo.fileslog.localdatastores)
|
||||
historysource = metadatastore.unionmetadatastore(
|
||||
*repo.fileslog.localhistorystores, allowincomplete=True
|
||||
)
|
||||
_runrepack(
|
||||
repo,
|
||||
datasource,
|
||||
historysource,
|
||||
packpath,
|
||||
constants.FILEPACK_CATEGORY,
|
||||
options=options,
|
||||
shared=False,
|
||||
)
|
||||
# Always do a full repack of the local loosefiles.
|
||||
options = dict(options)
|
||||
options["incremental"] = False
|
||||
|
||||
datasource = contentstore.unioncontentstore(*repo.fileslog.localdatastores)
|
||||
historysource = metadatastore.unionmetadatastore(
|
||||
*repo.fileslog.localhistorystores, allowincomplete=True
|
||||
)
|
||||
_runrepack(
|
||||
repo,
|
||||
datasource,
|
||||
historysource,
|
||||
packpath,
|
||||
constants.FILEPACK_CATEGORY,
|
||||
options=options,
|
||||
shared=False,
|
||||
)
|
||||
|
||||
|
||||
def _localdatarepack(repo, options, incremental):
|
||||
|
@ -16,5 +16,3 @@
|
||||
$ hg repack --incremental --config remotefilelog.localdatarepack=True
|
||||
|
||||
$ findfilessorted .hg/store/data
|
||||
.hg/store/data/11f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0
|
||||
.hg/store/data/11f6ad8ec52a2984abaafd7c3b516503785c2072/filename
|
||||
|
Loading…
Reference in New Issue
Block a user