mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
clone: add option to enable nativecheckout during clone
Summary: Native checkout avoids the initial large prefetch, and instead does small batch prefetches and immediately writes them to disk. This will prevent the issue where data in the cache is evicted before it's used and has to be redownloaded in a non-batch fashion later. In a future diff, using native checkout will also allow us to serialize and deserialize it's CheckoutPlan, so we can make clones resumable. Reviewed By: quark-zju Differential Revision: D26825773 fbshipit-source-id: 6fde90cd7578f6af5fdd4ac78004f7f63af4f287
This commit is contained in:
parent
1fc4abff87
commit
ee45deeeb2
@ -2264,7 +2264,11 @@ def update(
|
||||
|
||||
fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)
|
||||
|
||||
if repo.ui.configbool("experimental", "nativecheckout"):
|
||||
# If we're doing the initial checkout from null, let's use the new fancier
|
||||
# nativecheckout, since it has more efficient fetch mechanics.
|
||||
if repo.ui.configbool("experimental", "nativecheckout") or (
|
||||
repo.ui.configbool("clone", "nativecheckout") and repo["."].node() == nullid
|
||||
):
|
||||
if branchmerge:
|
||||
fallbackcheckout = "branchmerge is not supported: %s" % branchmerge
|
||||
elif ancestor is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user