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

Side by Side Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 182553004: Make git non-interactive when checking for src-internal access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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 #!/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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 def HaveSrcInternalAccess(): 120 def HaveSrcInternalAccess():
121 """Checks whether access to src-internal is available.""" 121 """Checks whether access to src-internal is available."""
122 with open(os.devnull, 'w') as nul: 122 with open(os.devnull, 'w') as nul:
123 if subprocess.call( 123 if subprocess.call(
124 ['svn', 'ls', '--non-interactive', 124 ['svn', 'ls', '--non-interactive',
125 'svn://svn.chromium.org/chrome-internal/trunk/src-internal/'], 125 'svn://svn.chromium.org/chrome-internal/trunk/src-internal/'],
126 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0: 126 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0:
127 return True 127 return True
128 return subprocess.call( 128 return subprocess.call(
129 ['git', 'remote', 'show', 129 ['git', '-c', 'core.askpass=true', 'remote', 'show',
130 'https://chrome-internal.googlesource.com/chrome/src-internal/'], 130 'https://chrome-internal.googlesource.com/chrome/src-internal/'],
131 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0 131 shell=True, stdin=nul, stdout=nul, stderr=nul) == 0
132 132
133 133
134 def DelayBeforeRemoving(target_dir): 134 def DelayBeforeRemoving(target_dir):
135 """A grace period before deleting the out of date toolchain directory.""" 135 """A grace period before deleting the out of date toolchain directory."""
136 if (os.path.isdir(target_dir) and 136 if (os.path.isdir(target_dir) and
137 not bool(int(os.environ.get('CHROME_HEADLESS', '0')))): 137 not bool(int(os.environ.get('CHROME_HEADLESS', '0')))):
138 for i in range(9, 0, -1): 138 for i in range(9, 0, -1):
139 sys.stdout.write( 139 sys.stdout.write(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 if options.output_json: 197 if options.output_json:
198 shutil.copyfile(os.path.join(target_dir, '..', 'data.json'), 198 shutil.copyfile(os.path.join(target_dir, '..', 'data.json'),
199 options.output_json) 199 options.output_json)
200 200
201 return 0 201 return 0
202 202
203 203
204 if __name__ == '__main__': 204 if __name__ == '__main__':
205 sys.exit(main()) 205 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