From 12f944e3275f9ebda24321283184a0dc08a29aff Mon Sep 17 00:00:00 2001 From: "davidbarr@chromium.org" Date: Thu, 1 Mar 2012 02:18:31 +0000 Subject: [PATCH] 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 --- gclient.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gclient.py b/gclient.py index 5757d4229..9931ad791 100644 --- a/gclient.py +++ b/gclient.py @@ -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.