From b8163224228b0e702ed02331766d244e579d8b83 Mon Sep 17 00:00:00 2001 From: Ravi Mistry Date: Mon, 11 Sep 2017 10:47:34 -0400 Subject: Sync only the current branch and use a shallow checkout Tried this out locally and it shrunk the size of the checkout from 1010M to 586M and shaved a few seconds off the running time as well. NoTry: true Bug: skia:7016 Change-Id: I472712e88d2cf30f0cfd71a373630d12a4937684 Reviewed-on: https://skia-review.googlesource.com/44820 Reviewed-by: Mike Klein Commit-Queue: Ravi Mistry --- tools/android/upload_to_android.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/android') diff --git a/tools/android/upload_to_android.py b/tools/android/upload_to_android.py index a033587578..6580b72f73 100644 --- a/tools/android/upload_to_android.py +++ b/tools/android/upload_to_android.py @@ -88,13 +88,12 @@ About to run repo init. If it hangs asking you to run glogin then please: """ os.chdir(android_dir) subprocess.check_call( - '%s init -u %s/a/platform/manifest -g "all,-notdefault,-darwin" -b master' + '%s init -u %s/a/platform/manifest -g "all,-notdefault,-darwin" ' + '-b master --depth=1' % (repo_binary, ANDROID_REPO_URL), shell=True) print 'Syncing the Android checkout at %s' % android_dir - print '%s sync %s tools/repohooks -j 32' % ( - repo_binary, SKIA_PATH_IN_ANDROID) - subprocess.check_call('%s sync %s tools/repohooks -j 32' % ( + subprocess.check_call('%s sync %s tools/repohooks -j 32 -c' % ( repo_binary, SKIA_PATH_IN_ANDROID), shell=True) # Set the necessary git config options. -- cgit v1.2.3