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

Side by Side Diff: gcl.py

Issue 3620011: Fall back to our own codereview settings if a key is not found in gcl's settings. (Closed)
Patch Set: Created 10 years, 2 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 | tests/gclient_scm_test.py » ('j') | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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 """\ 6 """\
7 Wrapper script around Rietveld's upload.py that simplifies working with groups 7 Wrapper script around Rietveld's upload.py that simplifies working with groups
8 of files. 8 of files.
9 """ 9 """
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 for line in settings_file.splitlines(): 196 for line in settings_file.splitlines():
197 if not line or line.startswith('#'): 197 if not line or line.startswith('#'):
198 continue 198 continue
199 if not ':' in line: 199 if not ':' in line:
200 raise gclient_utils.Error( 200 raise gclient_utils.Error(
201 '%s is invalid, please fix. It\'s content:\n\n%s' % 201 '%s is invalid, please fix. It\'s content:\n\n%s' %
202 (CODEREVIEW_SETTINGS_FILE, settings_file)) 202 (CODEREVIEW_SETTINGS_FILE, settings_file))
203 k, v = line.split(':', 1) 203 k, v = line.split(':', 1)
204 CODEREVIEW_SETTINGS[k.strip()] = v.strip() 204 CODEREVIEW_SETTINGS[k.strip()] = v.strip()
205 CODEREVIEW_SETTINGS.setdefault('__just_initialized', None) 205 CODEREVIEW_SETTINGS.setdefault('__just_initialized', None)
206 return CODEREVIEW_SETTINGS.get(key, "") 206 return CODEREVIEW_SETTINGS.get(key, '')
M-A Ruel 2010/10/07 13:48:56 This doesn't change anything so remove it from thi
207 207
208 208
209 def Warn(msg): 209 def Warn(msg):
210 print >> sys.stderr, msg 210 print >> sys.stderr, msg
211 211
212 212
213 def ErrorExit(msg): 213 def ErrorExit(msg):
214 print >> sys.stderr, msg 214 print >> sys.stderr, msg
215 sys.exit(1) 215 sys.exit(1)
216 216
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 if e.code != 500: 1336 if e.code != 500:
1337 raise 1337 raise
1338 print >> sys.stderr, ( 1338 print >> sys.stderr, (
1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) 1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))
1341 return 1 1341 return 1
1342 1342
1343 1343
1344 if __name__ == "__main__": 1344 if __name__ == "__main__":
1345 sys.exit(main(sys.argv[1:])) 1345 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698