Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1088 | 1088 |
| 1089 for path, url in entries.iteritems(): | 1089 for path, url in entries.iteritems(): |
| 1090 scm = gclient_scm.GetScmName(url) | 1090 scm = gclient_scm.GetScmName(url) |
| 1091 if scm_set and scm not in scm_set: | 1091 if scm_set and scm not in scm_set: |
| 1092 continue | 1092 continue |
| 1093 cwd = os.path.normpath(os.path.join(root, path)) | 1093 cwd = os.path.normpath(os.path.join(root, path)) |
| 1094 if scm: | 1094 if scm: |
| 1095 env['GCLIENT_SCM'] = scm | 1095 env['GCLIENT_SCM'] = scm |
| 1096 if url: | 1096 if url: |
| 1097 env['GCLIENT_URL'] = url | 1097 env['GCLIENT_URL'] = url |
| 1098 subprocess2.call(args, cwd=cwd, env=env) | 1098 if os.path.isdir(cwd): |
| 1099 subprocess2.call(args, cwd=cwd, env=env) | |
| 1100 else: | |
| 1101 print >> sys.stderr, 'Skipped non existing %s' % cwd | |
|
Dirk Pranke
2011/09/30 19:42:01
Nit: "nonexistent". Or "missing".
| |
| 1099 return 0 | 1102 return 0 |
| 1100 | 1103 |
| 1101 | 1104 |
| 1102 @attr('usage', '[url] [safesync url]') | 1105 @attr('usage', '[url] [safesync url]') |
| 1103 def CMDconfig(parser, args): | 1106 def CMDconfig(parser, args): |
| 1104 """Create a .gclient file in the current directory. | 1107 """Create a .gclient file in the current directory. |
| 1105 | 1108 |
| 1106 This specifies the configuration for further commands. After update/sync, | 1109 This specifies the configuration for further commands. After update/sync, |
| 1107 top-level DEPS files in each module are read to determine dependent | 1110 top-level DEPS files in each module are read to determine dependent |
| 1108 modules to operate on as well. If optional [url] parameter is | 1111 modules to operate on as well. If optional [url] parameter is |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1458 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1461 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 1459 print >> sys.stderr, 'Error: %s' % str(e) | 1462 print >> sys.stderr, 'Error: %s' % str(e) |
| 1460 return 1 | 1463 return 1 |
| 1461 | 1464 |
| 1462 | 1465 |
| 1463 if '__main__' == __name__: | 1466 if '__main__' == __name__: |
| 1464 fix_encoding.fix_encoding() | 1467 fix_encoding.fix_encoding() |
| 1465 sys.exit(Main(sys.argv[1:])) | 1468 sys.exit(Main(sys.argv[1:])) |
| 1466 | 1469 |
| 1467 # vim: ts=2:sw=2:tw=80:et: | 1470 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |