remotefilelog: Rust repack is the default

Summary:
Rust repack has been the default for a while now. Let's stop pretending we're
going to switch back to the Python repack by removing the config entirely.

Reviewed By: quark-zju

Differential Revision: D17135977

fbshipit-source-id: 5aaa0faa48e2b40a7314d5ab455f5eeaa4e4984d
This commit is contained in:
Xavier Deguillard 2019-08-30 15:07:35 -07:00 committed by Facebook Github Bot
parent b178492317
commit 6e0b6a2161
6 changed files with 13 additions and 36 deletions

View File

@ -83,8 +83,6 @@ Configs:
``remotefilelog.history.repacksizelimit`` the maximum total size of pack
files to include in an incremental history repack.
``remotefilelog.userustrepack`` use rust based repack implementation.
``remotefilelog.packsonlyrepack`` only repack packfiles during background
repacks.

View File

@ -80,10 +80,6 @@ def backgroundrepack(repo, incremental=True, packsonly=False, looseonly=False):
runshellcommand(cmd, encoding.environ)
def _userustrepack(repo):
return repo.ui.configbool("remotefilelog", "userustrepack", True)
def _runrustrepack(repo, options, packpath, incremental, pythonrepack):
# In the case of a loose-only repack, fallback to Python, as Rust doesn't support them.
if options.get(constants.OPTION_LOOSEONLY):
@ -157,12 +153,9 @@ def _shareddatastoresrepack(repo, options, incremental):
limit = repo.ui.configbytes("remotefilelog", "cachelimit", "10GB")
_cleanuppacks(repo.ui, packpath, limit)
if _userustrepack(repo):
_runrustrepack(
repo, options, packpath, incremental, _shareddatastorespythonrepack
)
else:
_shareddatastorespythonrepack(repo, options, packpath, incremental)
_runrustrepack(
repo, options, packpath, incremental, _shareddatastorespythonrepack
)
def _localdatapythonrepack(repo, options, packpath, incremental):
@ -201,10 +194,7 @@ def _localdatarepack(repo, options, incremental):
)
_cleanuppacks(repo.ui, packpath, 0)
if _userustrepack(repo):
_runrustrepack(repo, options, packpath, incremental, _localdatapythonrepack)
else:
_localdatapythonrepack(repo, options, packpath, incremental)
_runrustrepack(repo, options, packpath, incremental, _localdatapythonrepack)
def _manifestpythonrepack(
@ -250,20 +240,15 @@ def _manifestrepack(repo, options, incremental):
else 0
)
_cleanuppacks(repo.ui, packpath, limit)
if _userustrepack(repo):
_runrustrepack(
repo,
options,
packpath,
incremental,
lambda repo, options, packpath, incremental: _manifestpythonrepack(
repo, options, packpath, dstores, hstores, incremental, shared
),
)
else:
_manifestpythonrepack(
_runrustrepack(
repo,
options,
packpath,
incremental,
lambda repo, options, packpath, incremental: _manifestpythonrepack(
repo, options, packpath, dstores, hstores, incremental, shared
)
),
)
# Repack the shared manifest store
_domanifestrepack(spackpath, sdstores, shstores, True)

View File

@ -26,7 +26,7 @@
# Set the prefetchdays config to zero so that all commits are prefetched
# no matter what their creation date is.
$ cd shallow
$ setconfig remotefilelog.prefetchdays=0 remotefilelog.userustrepack=True
$ setconfig remotefilelog.prefetchdays=0
$ cd ..
# Test that repack cleans up the old files and creates new packs

View File

@ -24,7 +24,6 @@
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> prefetchdays=0
> userustrepack=True
> fetchpacks=True
> EOF
$ cd ..

View File

@ -23,10 +23,6 @@
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
$ cd shallow
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> userustrepack=True
> EOF
$ cd ..
$ cd shallow

View File

@ -24,7 +24,6 @@
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> prefetchdays=0
> userustrepack=True
> fetchpacks=True
> EOF
$ cd ..