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

Side by Side Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 2327213002: Don't try svn.chromium.org for src-internal check (Closed)
Patch Set: Created 4 years, 3 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
« 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Downloads and unpacks a toolchain for building on Windows. The contents are 6 """Downloads and unpacks a toolchain for building on Windows. The contents are
7 matched by sha1 which will be updated when the toolchain is updated. 7 matched by sha1 which will be updated when the toolchain is updated.
8 8
9 Having a toolchain script in depot_tools means that it's not versioned 9 Having a toolchain script in depot_tools means that it's not versioned
10 directly with the source code. That is, if the toolchain is upgraded, but 10 directly with the source code. That is, if the toolchain is upgraded, but
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 'files': [[f, os.path.getmtime(f)] for f in file_list], 203 'files': [[f, os.path.getmtime(f)] for f in file_list],
204 'sha1': sha1, 204 'sha1': sha1,
205 } 205 }
206 with open(MakeTimestampsFileName(root, sha1), 'wb') as f: 206 with open(MakeTimestampsFileName(root, sha1), 'wb') as f:
207 json.dump(timestamps_data, f) 207 json.dump(timestamps_data, f)
208 208
209 209
210 def HaveSrcInternalAccess(): 210 def HaveSrcInternalAccess():
211 """Checks whether access to src-internal is available.""" 211 """Checks whether access to src-internal is available."""
212 with open(os.devnull, 'w') as nul: 212 with open(os.devnull, 'w') as nul:
213 if subprocess.call(
214 ['svn', 'ls', '--non-interactive',
215 'svn://svn.chromium.org/chrome-internal/trunk/src-internal/'],
216 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0:
217 return True
218 return subprocess.call( 213 return subprocess.call(
219 ['git', '-c', 'core.askpass=true', 'remote', 'show', 214 ['git', '-c', 'core.askpass=true', 'remote', 'show',
220 'https://chrome-internal.googlesource.com/chrome/src-internal/'], 215 'https://chrome-internal.googlesource.com/chrome/src-internal/'],
221 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0 216 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0
222 217
223 218
224 def LooksLikeGoogler(): 219 def LooksLikeGoogler():
225 """Checks for a USERDOMAIN environment variable of 'GOOGLE', which 220 """Checks for a USERDOMAIN environment variable of 'GOOGLE', which
226 probably implies the current user is a Googler.""" 221 probably implies the current user is a Googler."""
227 return os.environ.get('USERDOMAIN', '').upper() == 'GOOGLE' 222 return os.environ.get('USERDOMAIN', '').upper() == 'GOOGLE'
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 if os.environ.get('GYP_MSVS_VERSION') == '2015': 539 if os.environ.get('GYP_MSVS_VERSION') == '2015':
545 InstallUniversalCRTIfNeeded(abs_toolchain_target_dir) 540 InstallUniversalCRTIfNeeded(abs_toolchain_target_dir)
546 541
547 RemoveUnusedToolchains(target_dir) 542 RemoveUnusedToolchains(target_dir)
548 543
549 return 0 544 return 0
550 545
551 546
552 if __name__ == '__main__': 547 if __name__ == '__main__':
553 sys.exit(main()) 548 sys.exit(main())
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