mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
remotefilelog: run python repack even if the pack directory doesn't exist
Summary: When rust repack is default, and the packs directory doesn't exist, we wouldn't try to run the loosefile repack, even if we had some. Let's move the packs directory check a bit later to allow the loosefile repack to run. Reviewed By: quark-zju Differential Revision: D16774857 fbshipit-source-id: 1d1b67ae93c1b3aa2d07d5d15325e9be16a01196
This commit is contained in:
parent
d257546639
commit
97a6bc8e6a
@ -85,9 +85,6 @@ def _userustrepack(repo):
|
||||
|
||||
|
||||
def _runrustrepack(repo, options, packpath, incremental, pythonrepack):
|
||||
if not os.path.isdir(packpath):
|
||||
return
|
||||
|
||||
# In the case of a loose-only repack, fallback to Python, as Rust doesn't support them.
|
||||
if options.get(constants.OPTION_LOOSEONLY):
|
||||
return pythonrepack(repo, options, packpath, incremental)
|
||||
@ -98,6 +95,9 @@ def _runrustrepack(repo, options, packpath, incremental, pythonrepack):
|
||||
newoptions[constants.OPTION_LOOSEONLY] = True
|
||||
pythonrepack(repo, newoptions, packpath, incremental)
|
||||
|
||||
if not os.path.isdir(packpath):
|
||||
return
|
||||
|
||||
failed = False
|
||||
|
||||
if incremental:
|
||||
|
Loading…
Reference in New Issue
Block a user