Add 'fetch' command to gclient with support for --jobs.

The fetch command is simply an alias for:
gclient recurse -s git git fetch origin

Rework 'recurse' command to use a WorkQueue so that --jobs is supported.

BUG=115840
TEST=

Review URL: http://codereview.chromium.org/9463044

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@124334 0039d316-1c4b-4281-b951-d872f2087c98
parent 4699a007
......@@ -1166,6 +1166,17 @@ def CMDrecurse(parser, args):
return 0
@attr('usage', '[args ...]')
def CMDfetch(parser, args):
"""Fetches upstream commits for all modules.
Completely git-specific. Simply runs 'git fetch [args ...]' for each module.
"""
(_, args) = parser.parse_args(args)
args = ['-s', 'git', 'git', 'fetch'] + args
return CMDrecurse(parser, args)
@attr('usage', '[url] [safesync url]')
def CMDconfig(parser, args):
"""Create a .gclient file in the current directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment