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

Side by Side Diff: gclient.py

Issue 3174020: Add stdout param to SubprocessCallAndFilter(). (Closed)
Patch Set: fix unit test Created 10 years, 4 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 level = None 1185 level = None
1186 if options.verbose == 2: 1186 if options.verbose == 2:
1187 level = logging.INFO 1187 level = logging.INFO
1188 elif options.verbose > 2: 1188 elif options.verbose > 2:
1189 level = logging.DEBUG 1189 level = logging.DEBUG
1190 logging.basicConfig(level=level, 1190 logging.basicConfig(level=level,
1191 format='%(module)s(%(lineno)d) %(funcName)s:%(message)s') 1191 format='%(module)s(%(lineno)d) %(funcName)s:%(message)s')
1192 options.entries_filename = options.config_filename + '_entries' 1192 options.entries_filename = options.config_filename + '_entries'
1193 if options.jobs < 1: 1193 if options.jobs < 1:
1194 parser.error('--jobs must be 1 or higher') 1194 parser.error('--jobs must be 1 or higher')
1195 # Useful for --jobs.
1196 options.stdout = sys.stdout
1195 1197
1196 # These hacks need to die. 1198 # These hacks need to die.
1197 if not hasattr(options, 'revisions'): 1199 if not hasattr(options, 'revisions'):
1198 # GClient.RunOnDeps expects it even if not applicable. 1200 # GClient.RunOnDeps expects it even if not applicable.
1199 options.revisions = [] 1201 options.revisions = []
1200 if not hasattr(options, 'head'): 1202 if not hasattr(options, 'head'):
1201 options.head = None 1203 options.head = None
1202 if not hasattr(options, 'nohooks'): 1204 if not hasattr(options, 'nohooks'):
1203 options.nohooks = True 1205 options.nohooks = True
1204 if not hasattr(options, 'deps_os'): 1206 if not hasattr(options, 'deps_os'):
(...skipping 17 matching lines...) Expand all
1222 return CMDhelp(parser, argv) 1224 return CMDhelp(parser, argv)
1223 except gclient_utils.Error, e: 1225 except gclient_utils.Error, e:
1224 print >> sys.stderr, 'Error: %s' % str(e) 1226 print >> sys.stderr, 'Error: %s' % str(e)
1225 return 1 1227 return 1
1226 1228
1227 1229
1228 if '__main__' == __name__: 1230 if '__main__' == __name__:
1229 sys.exit(Main(sys.argv[1:])) 1231 sys.exit(Main(sys.argv[1:]))
1230 1232
1231 # vim: ts=2:sw=2:tw=80:et: 1233 # 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