OLD | NEW |
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 Loading... |
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 Loading... |
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: |
OLD | NEW |