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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 | 993 |
994 for path, url in entries.iteritems(): | 994 for path, url in entries.iteritems(): |
995 scm = gclient_scm.GetScmName(url) | 995 scm = gclient_scm.GetScmName(url) |
996 if scm_set and scm not in scm_set: | 996 if scm_set and scm not in scm_set: |
997 continue | 997 continue |
998 cwd = os.path.normpath(os.path.join(root, path)) | 998 cwd = os.path.normpath(os.path.join(root, path)) |
999 if scm: | 999 if scm: |
1000 env['GCLIENT_SCM'] = scm | 1000 env['GCLIENT_SCM'] = scm |
1001 if url: | 1001 if url: |
1002 env['GCLIENT_URL'] = url | 1002 env['GCLIENT_URL'] = url |
1003 gclient_utils.Popen(args, cwd=cwd, env=env).communicate() | 1003 subprocess2.call(args, cwd=cwd, env=env) |
1004 return 0 | 1004 return 0 |
1005 | 1005 |
1006 | 1006 |
1007 @attr('usage', '[url] [safesync url]') | 1007 @attr('usage', '[url] [safesync url]') |
1008 def CMDconfig(parser, args): | 1008 def CMDconfig(parser, args): |
1009 """Create a .gclient file in the current directory. | 1009 """Create a .gclient file in the current directory. |
1010 | 1010 |
1011 This specifies the configuration for further commands. After update/sync, | 1011 This specifies the configuration for further commands. After update/sync, |
1012 top-level DEPS files in each module are read to determine dependent | 1012 top-level DEPS files in each module are read to determine dependent |
1013 modules to operate on as well. If optional [url] parameter is | 1013 modules to operate on as well. If optional [url] parameter is |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1357 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1358 print >> sys.stderr, 'Error: %s' % str(e) | 1358 print >> sys.stderr, 'Error: %s' % str(e) |
1359 return 1 | 1359 return 1 |
1360 | 1360 |
1361 | 1361 |
1362 if '__main__' == __name__: | 1362 if '__main__' == __name__: |
1363 fix_encoding.fix_encoding() | 1363 fix_encoding.fix_encoding() |
1364 sys.exit(Main(sys.argv[1:])) | 1364 sys.exit(Main(sys.argv[1:])) |
1365 | 1365 |
1366 # vim: ts=2:sw=2:tw=80:et: | 1366 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |