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

Side by Side Diff: gclient.py

Issue 9463044: Add 'fetch' command to gclient with support for --jobs. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 env['GCLIENT_SCM'] = scm 1159 env['GCLIENT_SCM'] = scm
1160 if url: 1160 if url:
1161 env['GCLIENT_URL'] = url 1161 env['GCLIENT_URL'] = url
1162 if os.path.isdir(cwd): 1162 if os.path.isdir(cwd):
1163 subprocess2.call(args, cwd=cwd, env=env) 1163 subprocess2.call(args, cwd=cwd, env=env)
1164 else: 1164 else:
1165 print >> sys.stderr, 'Skipped missing %s' % cwd 1165 print >> sys.stderr, 'Skipped missing %s' % cwd
1166 return 0 1166 return 0
1167 1167
1168 1168
1169 @attr('usage', '[args ...]')
1170 def CMDfetch(parser, args):
1171 """Fetches upstream commits for all modules.
1172
1173 Completely git-specific. Simply runs 'git fetch [args ...]' for each module.
1174 """
1175 (_, args) = parser.parse_args(args)
1176 args = ['-s', 'git', 'git', 'fetch'] + args
1177 return CMDrecurse(parser, args)
1178
1179
1169 @attr('usage', '[url] [safesync url]') 1180 @attr('usage', '[url] [safesync url]')
1170 def CMDconfig(parser, args): 1181 def CMDconfig(parser, args):
1171 """Create a .gclient file in the current directory. 1182 """Create a .gclient file in the current directory.
1172 1183
1173 This specifies the configuration for further commands. After update/sync, 1184 This specifies the configuration for further commands. After update/sync,
1174 top-level DEPS files in each module are read to determine dependent 1185 top-level DEPS files in each module are read to determine dependent
1175 modules to operate on as well. If optional [url] parameter is 1186 modules to operate on as well. If optional [url] parameter is
1176 provided, then configuration is read from a specified Subversion server 1187 provided, then configuration is read from a specified Subversion server
1177 URL. 1188 URL.
1178 """ 1189 """
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1549 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1539 print >> sys.stderr, 'Error: %s' % str(e) 1550 print >> sys.stderr, 'Error: %s' % str(e)
1540 return 1 1551 return 1
1541 1552
1542 1553
1543 if '__main__' == __name__: 1554 if '__main__' == __name__:
1544 fix_encoding.fix_encoding() 1555 fix_encoding.fix_encoding()
1545 sys.exit(Main(sys.argv[1:])) 1556 sys.exit(Main(sys.argv[1:]))
1546 1557
1547 # vim: ts=2:sw=2:tw=80:et: 1558 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698