git-repo/subcmds
Mike Frysinger 355f4398d8 sync: rework --jobs to provide better defaults
For --jobs-network, the logic is now:
* If the user specifies --jobs-network, use that.
* Else, if the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to 1.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.

For --jobs-checkout, the logic is now:
* If the user specifies --jobs-checkout, use that.
* Else, if the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to DEFAULT_LOCAL_JOBS which is based on user's ncpus.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.

For garbage collecting, the logic is now:
* If the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to the user's ncpus.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.

Having to factor in the manifest settings makes this more complicated
which is why we delay processing of defaults until after we've synced
the manifest projects.

Bug: http://b/239712300
Change-Id: Id27cda63c76c156f1d63f6a20cb2c4ceeb3d547c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/341394
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: LaMont Jones <lamontjones@google.com>
2022-07-25 15:36:43 +00:00
..
__init__.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
abandon.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
branches.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
checkout.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
cherry_pick.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
diff.py status, diff: display correct path for multi-manifest 2022-07-14 16:00:18 +00:00
diffmanifests.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
download.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
forall.py forall: fix multi-manifest variables. 2022-04-14 14:31:47 +00:00
gitc_delete.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
gitc_init.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
grep.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
help.py help: fix grammar in help text 2021-11-12 17:30:32 +00:00
info.py manifest: add submanifest.default_groups attribute 2022-04-29 18:42:23 +00:00
init.py Fix the printed path of the ".repo" dir after a fresh init. 2022-07-25 15:22:14 +00:00
list.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
manifest.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
overview.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
prune.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
rebase.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
selfupdate.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
smartsync.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
stage.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
start.py Add multi-manifest support with <submanifest> element 2022-02-17 21:57:55 +00:00
status.py status, diff: display correct path for multi-manifest 2022-07-14 16:00:18 +00:00
sync.py sync: rework --jobs to provide better defaults 2022-07-25 15:36:43 +00:00
upload.py upload: add ‘--ignore-untracked-files’ option 2022-07-11 17:57:43 +00:00
version.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00