Chromium Code Reviews| Index: update_depot_tools.bat |
| diff --git a/update_depot_tools.bat b/update_depot_tools.bat |
| index 10b35fb909d19d07d5ed799d8393289a715a9217..187f2bad76f60dc28a04e9e1324c95004aa053e8 100644 |
| --- a/update_depot_tools.bat |
| +++ b/update_depot_tools.bat |
| @@ -7,6 +7,8 @@ |
| setlocal |
| +set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| + |
| :: Will download svn and python. |
| :: If you don't want to install the depot_tools version of these tools, remove |
| :: the 'force' option on the next command. The tools will be installed only if |
| @@ -35,6 +37,19 @@ goto :EOF |
| cd /d "%~dp0." |
| call git config remote.origin.fetch > NUL |
| if errorlevel 1 goto :GIT_SVN_UPDATE |
| +for /F %%x in ('git config --get remote.origin.url') DO ( |
| + IF "%%x" == "%GIT_URL%" ( |
|
M-A Ruel
2013/01/07 19:18:11
IF not "%%x" == "%GIT_URL%" (
would work.
szager1
2013/01/07 19:24:57
Done.
|
| + rem |
| + ) ELSE ( |
| + 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 errorlevel 2 ( |
|
M-A Ruel
2013/01/07 19:18:11
IF not errorlevel 2 (
szager1
2013/01/07 19:24:57
Done.
|
| + rem |
| + ) ELSE ( |
| + call git config remote.origin.url "%GIT_URL%" |
| + ) |
| + ) |
| +) |
| call git fetch -q origin > NUL |
| call git rebase -q origin/master > NUL |
| goto :EOF |