| 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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 | 1168 |
| 1169 def Main(argv): | 1169 def Main(argv): |
| 1170 """Doesn't parse the arguments here, just find the right subcommand to | 1170 """Doesn't parse the arguments here, just find the right subcommand to |
| 1171 execute.""" | 1171 execute.""" |
| 1172 try: | 1172 try: |
| 1173 # Do it late so all commands are listed. | 1173 # Do it late so all commands are listed. |
| 1174 CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([ | 1174 CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([ |
| 1175 ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) | 1175 ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) |
| 1176 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) | 1176 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) |
| 1177 parser = optparse.OptionParser(version='%prog ' + __version__) | 1177 parser = optparse.OptionParser(version='%prog ' + __version__) |
| 1178 parser.add_option('-j', '--jobs', default=8, type='int', | 1178 parser.add_option('-j', '--jobs', default=1, type='int', |
| 1179 help='Specify how many SCM commands can run in parallel; ' | 1179 help='Specify how many SCM commands can run in parallel; ' |
| 1180 'default=%default') | 1180 'default=%default') |
| 1181 parser.add_option('-v', '--verbose', action='count', default=0, | 1181 parser.add_option('-v', '--verbose', action='count', default=0, |
| 1182 help='Produces additional output for diagnostics. Can be ' | 1182 help='Produces additional output for diagnostics. Can be ' |
| 1183 'used up to three times for more logging info.') | 1183 'used up to three times for more logging info.') |
| 1184 parser.add_option('--gclientfile', dest='config_filename', | 1184 parser.add_option('--gclientfile', dest='config_filename', |
| 1185 default=os.environ.get('GCLIENT_FILE', '.gclient'), | 1185 default=os.environ.get('GCLIENT_FILE', '.gclient'), |
| 1186 help='Specify an alternate %default file') | 1186 help='Specify an alternate %default file') |
| 1187 # Integrate standard options processing. | 1187 # Integrate standard options processing. |
| 1188 old_parser = parser.parse_args | 1188 old_parser = parser.parse_args |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 return CMDhelp(parser, argv) | 1230 return CMDhelp(parser, argv) |
| 1231 except gclient_utils.Error, e: | 1231 except gclient_utils.Error, e: |
| 1232 print >> sys.stderr, 'Error: %s' % str(e) | 1232 print >> sys.stderr, 'Error: %s' % str(e) |
| 1233 return 1 | 1233 return 1 |
| 1234 | 1234 |
| 1235 | 1235 |
| 1236 if '__main__' == __name__: | 1236 if '__main__' == __name__: |
| 1237 sys.exit(Main(sys.argv[1:])) | 1237 sys.exit(Main(sys.argv[1:])) |
| 1238 | 1238 |
| 1239 # vim: ts=2:sw=2:tw=80:et: | 1239 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |