Commit 0081c0ff authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

[git-cache] Add option to update_bootstrap to skip the populate step.

This will allow us to separate the 'populate' and 'upload' phases
in the git cache updater recipe, which will allow us to do all the
'populate' steps in parallel, but then limit the parallelism of the
`pack/gc/upload` operations.

R=tandrii@chromium.org

Change-Id: I8b8a9155f86350be37ed5a67c592ff1fec4d42ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1830857
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
parent 39058571
......@@ -700,14 +700,21 @@ def CMDupdate_bootstrap(parser, args):
print('Sorry, update bootstrap will not work on Windows.', file=sys.stderr)
return 1
parser.add_option('--skip-populate', action='store_true',
help='Skips "populate" step if mirror already exists.')
parser.add_option('--gc-aggressive', action='store_true',
help='Run aggressive repacking of the repo.')
parser.add_option('--prune', action='store_true',
help='Prune all other cached bundles of the same repo.')
# First, we need to ensure the cache is populated.
populate_args = args[:]
CMDpopulate(parser, populate_args)
options, args = parser.parse_args(args)
url = args[0]
mirror = Mirror(url)
if not options.skip_populate or not mirror.exists():
CMDpopulate(parser, populate_args)
else:
print('Skipped populate step.')
# Get the repo directory.
options, args = parser.parse_args(args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment