From 538dd3e875c850ced4b332aeb405f3cf9de9bb46 Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Fri, 24 Mar 2023 06:52:17 -0700 Subject: [PATCH] cronet import: set gclient --delete_unversioned_trees This option deletes gclient dependencies that were remove upstream, so it makes sense to always set this flag for the import (since the import directoy is reused to speed up the process). This change also fixes setup_folder_origin to run in a subshell to contain the directory change it performs. Test: none Change-Id: I87c60690be81843c3947acc0251967372ed4c34a --- Cronet/tools/import/import_cronet.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Cronet/tools/import/import_cronet.sh b/Cronet/tools/import/import_cronet.sh index 6639a4ced6..994e28a388 100755 --- a/Cronet/tools/import/import_cronet.sh +++ b/Cronet/tools/import/import_cronet.sh @@ -55,7 +55,7 @@ setup_upstream_import_branch() { # Arguments: # new_rev, string ####################################### -setup_folder_origin() { +setup_folder_origin() ( local _new_rev=$1 mkdir -p "${COPYBARA_FOLDER_ORIGIN}" cd "${COPYBARA_FOLDER_ORIGIN}" @@ -83,9 +83,10 @@ EOF cd src # Set appropriate gclient flags to speed up syncing. gclient sync \ - --no-history - --shallow -} + --no-history \ + --shallow \ + --delete_unversioned_trees +) ####################################### # Runs the copybara import of Chromium