Commit b3065fb6 authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

bot_update: don't repack, don't gc in main repo of builder's checkout.

The main purpose is to avoid running slow and useless operation in
chromium/src checkouts. Ideally, this should be done in every DEPS-ed
repo, too, but that requires substantially more changes in gclient.
Thus, this CL provides biggest bang for the buck.

Example led build: https://ci.chromium.org/swarming/task/3c62efb31ed3a910?server=chromium-swarm.appspot.com

R=hinoka@chromium.org

Bug: 822437
Change-Id: I347d85e5cb5158b77969a755b67ca2289fb39d40
Reviewed-on: https://chromium-review.googlesource.com/973900
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarRyan Tseng <hinoka@chromium.org>
parent a68d82cb
......@@ -682,7 +682,9 @@ def _git_checkout(sln, sln_dir, revisions, shallow, refs, git_cache_dir,
if not path.isdir(sln_dir):
git('clone', '--no-checkout', '--local', '--shared', mirror_dir,
sln_dir)
_git_disable_gc(sln_dir)
else:
_git_disable_gc(sln_dir)
git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir)
git('fetch', 'origin', cwd=sln_dir)
for ref in refs:
......@@ -708,6 +710,10 @@ def _git_checkout(sln, sln_dir, revisions, shallow, refs, git_cache_dir,
else:
raise
def _git_disable_gc(cwd):
git('config', 'gc.autodetach', '0', cwd=cwd)
git('config', 'gc.autopacklimit', '0', cwd=cwd)
def _download(url):
"""Fetch url and return content, with retries for flake."""
......
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