mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
This reverts commit 4d92fe4300.
Reason for revert: This moved the logging from invoking `led` or `vpython` to whenever someone would run something that would end up invoking `update_depot_tools`. It's good that we are calling this when we run update_depot_tools, but we probably should've suppressed the logging there in at least the success case, because now things are even more confusing. See crbug.com/748651.
Original change's description:
> [bootstraps] Sync at gclient, suppress output.
>
> Have the "update_depot_tools" script also do a CIPD tool sync. This will
> ensure that users and systems have access to tooling at sync-time rather
> than just-in-time loading them at execution time.
>
> Update the tool boostraps to suppress any sort of syncing logic, if it
> does happen. This will ensure that users who execute the tools don't se
> unexpected output.
>
> BUG=None
> TEST=local
> - Tested on Mac and Windows.
>
> R=dpranke@chromium.org, iannucci@chromium.org
>
> Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
> Reviewed-on: https://chromium-review.googlesource.com/581494
> Commit-Queue: Daniel Jacques <dnj@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
TBR=iannucci@chromium.org,dpranke@chromium.org,dnj@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: None
Change-Id: I2485c9dd2e48a8dbdeebfff5da9d4c708e0edcb7
Reviewed-on: https://chromium-review.googlesource.com/585867
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
57 lines
1.8 KiB
Batchfile
57 lines
1.8 KiB
Batchfile
@echo off
|
|
:: Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
:: Use of this source code is governed by a BSD-style license that can be
|
|
:: found in the LICENSE file.
|
|
|
|
:: This batch file will try to sync the root directory.
|
|
|
|
setlocal
|
|
|
|
:: Windows freaks out if a file is overwritten while it's being executed. Copy
|
|
:: this script off to a temporary location and reinvoke from there before
|
|
:: running any git commands.
|
|
IF "%~nx0"=="update_depot_tools.bat" (
|
|
COPY /Y "%~dp0update_depot_tools.bat" "%TEMP%\update_depot_tools_tmp.bat" >nul
|
|
if errorlevel 1 goto :EOF
|
|
"%TEMP%\update_depot_tools_tmp.bat" "%~dp0" %*
|
|
)
|
|
|
|
set DEPOT_TOOLS_DIR=%~1
|
|
SHIFT
|
|
|
|
IF EXIST "%DEPOT_TOOLS_DIR%.disable_auto_update" GOTO :EOF
|
|
|
|
set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
|
|
:: Will download git and python.
|
|
call "%DEPOT_TOOLS_DIR%bootstrap\win\win_tools.bat"
|
|
if errorlevel 1 goto :EOF
|
|
:: Now clear errorlevel so it can be set by other programs later.
|
|
set errorlevel=
|
|
|
|
:: Shall skip automatic update?
|
|
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF
|
|
|
|
:: We need .\.git\. to be able to sync.
|
|
IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE
|
|
echo Error updating depot_tools, no revision tool found.
|
|
goto :EOF
|
|
|
|
|
|
:GIT_UPDATE
|
|
cd /d "%DEPOT_TOOLS_DIR%."
|
|
call git config remote.origin.fetch > NUL
|
|
for /F %%x in ('git config --get remote.origin.url') DO (
|
|
IF not "%%x" == "%GIT_URL%" (
|
|
echo Your depot_tools checkout is configured to fetch from an obsolete URL
|
|
choice /N /T 60 /D N /M "Would you like to update it? [y/N]: "
|
|
IF not errorlevel 2 (
|
|
call git config remote.origin.url "%GIT_URL%"
|
|
)
|
|
)
|
|
)
|
|
call git fetch -q origin > NUL
|
|
call git rebase -q origin/master > NUL
|
|
if errorlevel 1 echo Failed to update depot_tools.
|
|
goto :EOF
|