From ebceaf4328436dee7e462f10687aa2a82f9ed709 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 12 May 2020 15:20:12 -0700 Subject: [PATCH] chore: make prepare_checkaout update browser_upstream/master (#2209) --- browser_patches/prepare_checkout.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/browser_patches/prepare_checkout.sh b/browser_patches/prepare_checkout.sh index cb5d43d432..2c5b12ddf2 100755 --- a/browser_patches/prepare_checkout.sh +++ b/browser_patches/prepare_checkout.sh @@ -91,15 +91,13 @@ else git remote add $REMOTE_BROWSER_UPSTREAM $REMOTE_URL fi -# Check if we have the $BASE_REVISION commit in GIT +# If not, fetch from REMOTE_BROWSER_UPSTREAM and check one more time. +git fetch $REMOTE_BROWSER_UPSTREAM $BASE_BRANCH if ! git cat-file -e $BASE_REVISION^{commit}; then - # If not, fetch from REMOTE_BROWSER_UPSTREAM and check one more time. - git fetch $REMOTE_BROWSER_UPSTREAM $BASE_BRANCH - if ! git cat-file -e $BASE_REVISION^{commit}; then - echo "ERROR: $FRIENDLY_CHECKOUT_PATH/ does not include the BASE_REVISION (@$BASE_REVISION). Wrong revision number?" - exit 1 - fi + echo "ERROR: $FRIENDLY_CHECKOUT_PATH/ does not include the BASE_REVISION (@$BASE_REVISION). Wrong revision number?" + exit 1 fi + echo "-- checking $FRIENDLY_CHECKOUT_PATH repo has BASE_REVISION (@$BASE_REVISION) commit - OK" # Check out the $BASE_REVISION