Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: bootstrap/win/win_tools.bat

Issue 150203005: Revert default Windows git to the old version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 script will try to find if svn and python are accessible and it not, 6 :: This script will try to find if svn and python are accessible and it not,
7 :: it will try to download it and 'install' it in depot_tools. 7 :: it will try to download it and 'install' it in depot_tools.
8 8
9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
10 :: returned. 10 :: returned.
11 11
12 set WIN_TOOLS_ROOT_URL=https://src.chromium.org/svn/trunk/tools 12 set WIN_TOOLS_ROOT_URL=https://src.chromium.org/svn/trunk/tools
13 :: It used to be %~dp0 but ADODB.Stream may fail to write to this directory if 13 :: It used to be %~dp0 but ADODB.Stream may fail to write to this directory if
14 :: the directory DACL is set to elevated integrity level. 14 :: the directory DACL is set to elevated integrity level.
15 set ZIP_DIR=%TEMP% 15 set ZIP_DIR=%TEMP%
16 16
17 :: Get absolute root directory (.js scripts don't handle relative paths well). 17 :: Get absolute root directory (.js scripts don't handle relative paths well).
18 pushd %~dp0..\.. 18 pushd %~dp0..\..
19 set WIN_TOOLS_ROOT_DIR=%CD% 19 set WIN_TOOLS_ROOT_DIR=%CD%
20 popd 20 popd
21 21
22 if "%1" == "force" ( 22 if "%1" == "force" (
23 set WIN_TOOLS_FORCE=1 23 set WIN_TOOLS_FORCE=1
24 shift /1 24 shift /1
25 ) 25 )
26 26
27 27
28 :GIT_CHECK 28 :GIT_CHECK
29 call ver | findstr "XP" 2>nul 1>nul 29 if "%DEPOT_TOOLS_GIT_1852%" == "1" goto :GIT_1852_CHECK
30 if errorlevel 0 goto :GIT_XP_CHECK 30 :: Our new build of git doesn't work on some systems (e.g. uses newer APIs than
31 if "%DEPOT_TOOLS_GIT_1852%" == "0" goto :GIT_180_CHECK 31 :: available in XP), so force systems back to the old git while the failures
32 goto :GIT_1852_CHECK 32 :: are investigated, unless the new git was explicitly requested above.
33 goto :GIT_180_FORCE
33 34
34 35
35 :GIT_1852_CHECK 36 :GIT_1852_CHECK
36 set GIT_VERSION=1.8.5.2.chromium.1 37 set GIT_VERSION=1.8.5.2.chromium.1
37 set GIT_BIN_DIR=git-%GIT_VERSION%_bin 38 set GIT_BIN_DIR=git-%GIT_VERSION%_bin
38 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip 39 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip
39 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F ILE% 40 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F ILE%
40 goto :GIT_COMMON 41 goto :GIT_COMMON
41 42
42 43
43 :: Our new build of git doesn't work on XP (uses newer APIs). 44 :GIT_180_FORCE
44 :GIT_XP_CHECK 45 :: If the new git was installed, remove all installed git packages to trigger
45 :: If the new git was installed, remove all old git packages and reinstall the 46 :: reinstallation of the old version.
46 :: correct version from scratch.
47 if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin" ( 47 if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin" (
48 rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin" 48 rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.5.2.chromium.1_bin"
49 if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin" ( 49 if exist "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin" (
50 rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin" 50 rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\git-1.8.0_bin"
51 ) 51 )
52 ) 52 )
53 goto :GIT_180_CHECK 53 goto :GIT_180_CHECK
54 54
55 55
56 :GIT_180_CHECK 56 :GIT_180_CHECK
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 goto :END 212 goto :END
213 213
214 214
215 :returncode 215 :returncode
216 set WIN_TOOLS_ROOT_URL= 216 set WIN_TOOLS_ROOT_URL=
217 set WIN_TOOLS_ROOT_DIR= 217 set WIN_TOOLS_ROOT_DIR=
218 exit /b %ERRORLEVEL% 218 exit /b %ERRORLEVEL%
219 219
220 :END 220 :END
221 call :returncode %ERRORLEVEL% 221 call :returncode %ERRORLEVEL%
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698