sync: Default to interleaved mode
The previous default, "phased" sync (separate network and checkout
phases), can now be selected with `--no-interleaved`.
Bug: 421935613
Bug: 432082000
Change-Id: Ia8624daa609a28ea2f87f8ea4b42138d8b3e9269
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/489681
Reviewed-by: Scott Lee <ddoman@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 13a322b..b02fdd0 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -412,16 +412,18 @@
type=int,
metavar="JOBS",
help="number of network jobs to run in parallel (defaults to "
- "--jobs or 1). Ignored when --interleaved is set",
+ "--jobs or 1). Ignored unless --no-interleaved is set",
)
p.add_option(
"--jobs-checkout",
default=None,
type=int,
metavar="JOBS",
- help="number of local checkout jobs to run in parallel (defaults "
- f"to --jobs or {DEFAULT_LOCAL_JOBS}). Ignored when --interleaved "
- "is set",
+ help=(
+ "number of local checkout jobs to run in parallel (defaults "
+ f"to --jobs or {DEFAULT_LOCAL_JOBS}). Ignored unless "
+ "--no-interleaved is set"
+ ),
)
p.add_option(
@@ -480,7 +482,14 @@
p.add_option(
"--interleaved",
action="store_true",
- help="fetch and checkout projects in parallel (experimental)",
+ default=True,
+ help="fetch and checkout projects in parallel (default)",
+ )
+ p.add_option(
+ "--no-interleaved",
+ dest="interleaved",
+ action="store_false",
+ help="fetch and checkout projects in phases",
)
p.add_option(
"-n",