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

Side by Side Diff: gclient.py

Issue 3420014: Remove cruft from having to do bookeeping of options.stdout. (Closed)
Patch Set: Created 10 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 | gclient_scm.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) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 """Meta checkout manager supporting both Subversion and GIT. 6 """Meta checkout manager supporting both Subversion and GIT.
7 7
8 Files 8 Files
9 .gclient : Current client configuration, written by 'config' command. 9 .gclient : Current client configuration, written by 'config' command.
10 Format is a Python script defining 'solutions', a list whose 10 Format is a Python script defining 'solutions', a list whose
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 level = None 1196 level = None
1197 if options.verbose == 2: 1197 if options.verbose == 2:
1198 level = logging.INFO 1198 level = logging.INFO
1199 elif options.verbose > 2: 1199 elif options.verbose > 2:
1200 level = logging.DEBUG 1200 level = logging.DEBUG
1201 logging.basicConfig(level=level, 1201 logging.basicConfig(level=level,
1202 format='%(module)s(%(lineno)d) %(funcName)s:%(message)s') 1202 format='%(module)s(%(lineno)d) %(funcName)s:%(message)s')
1203 options.entries_filename = options.config_filename + '_entries' 1203 options.entries_filename = options.config_filename + '_entries'
1204 if options.jobs < 1: 1204 if options.jobs < 1:
1205 parser.error('--jobs must be 1 or higher') 1205 parser.error('--jobs must be 1 or higher')
1206 # TODO(maruel): Temporary, to be removed.
1207 options.stdout = sys.stdout
1208 1206
1209 # These hacks need to die. 1207 # These hacks need to die.
1210 if not hasattr(options, 'revisions'): 1208 if not hasattr(options, 'revisions'):
1211 # GClient.RunOnDeps expects it even if not applicable. 1209 # GClient.RunOnDeps expects it even if not applicable.
1212 options.revisions = [] 1210 options.revisions = []
1213 if not hasattr(options, 'head'): 1211 if not hasattr(options, 'head'):
1214 options.head = None 1212 options.head = None
1215 if not hasattr(options, 'nohooks'): 1213 if not hasattr(options, 'nohooks'):
1216 options.nohooks = True 1214 options.nohooks = True
1217 if not hasattr(options, 'deps_os'): 1215 if not hasattr(options, 'deps_os'):
(...skipping 17 matching lines...) Expand all
1235 return CMDhelp(parser, argv) 1233 return CMDhelp(parser, argv)
1236 except gclient_utils.Error, e: 1234 except gclient_utils.Error, e:
1237 print >> sys.stderr, 'Error: %s' % str(e) 1235 print >> sys.stderr, 'Error: %s' % str(e)
1238 return 1 1236 return 1
1239 1237
1240 1238
1241 if '__main__' == __name__: 1239 if '__main__' == __name__:
1242 sys.exit(Main(sys.argv[1:])) 1240 sys.exit(Main(sys.argv[1:]))
1243 1241
1244 # vim: ts=2:sw=2:tw=80:et: 1242 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698