| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 :: Use of this source code is governed by a BSD-style license that can be | 3 :: Use of this source code is governed by a BSD-style license that can be |
| 4 :: found in the LICENSE file. | 4 :: found in the LICENSE file. |
| 5 | 5 |
| 6 :: This batch file will try to sync the root directory. | 6 :: This batch file will try to sync the root directory. |
| 7 | 7 |
| 8 setlocal | 8 setlocal |
| 9 | 9 |
| 10 :: Windows freaks out if a file is overwritten while it's being executed. Copy | 10 :: Windows freaks out if a file is overwritten while it's being executed. Copy |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF | 31 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF |
| 32 | 32 |
| 33 :: We need either .\.svn\. or .\.git\. to be able to sync. | 33 :: We need either .\.svn\. or .\.git\. to be able to sync. |
| 34 IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE | 34 IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE |
| 35 IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE | 35 IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE |
| 36 echo Error updating depot_tools, no revision tool found. | 36 echo Error updating depot_tools, no revision tool found. |
| 37 goto :EOF | 37 goto :EOF |
| 38 | 38 |
| 39 | 39 |
| 40 :SVN_UPDATE | 40 :SVN_UPDATE |
| 41 echo ======================== |
| 42 echo WARNING: You have an SVN checkout of depot_tools! |
| 43 echo. |
| 44 echo depot_tools is migrating to Git on June 6, 2016. If you still have an |
| 45 echo SVN checkout then, you will STOP RECEIVING UPDATES to depot_tools. |
| 46 echo. |
| 47 echo Before that date, please follow the instructions here[1] to get a Git |
| 48 echo copy of depot_tools. |
| 49 echo. |
| 50 echo [1]: https://www.chromium.org/developers/how-tos/install-depot-tools |
| 51 echo ======================== |
| 41 FOR %%A IN (%*) DO ( | 52 FOR %%A IN (%*) DO ( |
| 42 IF "%%A" == "--force" ( | 53 IF "%%A" == "--force" ( |
| 43 call svn -q revert -R "%DEPOT_TOOLS_DIR%." | 54 call svn -q revert -R "%DEPOT_TOOLS_DIR%." |
| 44 ) | 55 ) |
| 45 ) | 56 ) |
| 46 call svn -q up "%DEPOT_TOOLS_DIR%." | 57 call svn -q up "%DEPOT_TOOLS_DIR%." |
| 47 goto :EOF | 58 goto :EOF |
| 48 | 59 |
| 49 | 60 |
| 50 :GIT_UPDATE | 61 :GIT_UPDATE |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 call git fetch -q origin > NUL | 74 call git fetch -q origin > NUL |
| 64 call git rebase -q origin/master > NUL | 75 call git rebase -q origin/master > NUL |
| 65 if errorlevel 1 echo Failed to update depot_tools. | 76 if errorlevel 1 echo Failed to update depot_tools. |
| 66 goto :EOF | 77 goto :EOF |
| 67 | 78 |
| 68 | 79 |
| 69 :GIT_SVN_UPDATE | 80 :GIT_SVN_UPDATE |
| 70 cd /d "%DEPOT_TOOLS_DIR%." | 81 cd /d "%DEPOT_TOOLS_DIR%." |
| 71 call git svn rebase -q -q | 82 call git svn rebase -q -q |
| 72 goto :EOF | 83 goto :EOF |
| OLD | NEW |