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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
===================================================================
--- gclient.py (revision 123383)
+++ gclient.py (working copy)
@@ -1166,6 +1166,22 @@
return 0
+def CMDfetch(parser, args):
+ """Fetches upstream commits for all modules.
+
+Completely git-specific. Simply runs 'git fetch origin' for each module.
+"""
+ parser.remove_option('--jobs')
M-A Ruel 2012/02/27 16:52:48 It's useful and safe to do them in parallel. I'd k
+ (options, parsed_args) = parser.parse_args(args)
M-A Ruel 2012/02/27 16:52:48 Why parse the arguments here? Just forward the mod
+ if parsed_args:
+ print >> sys.stderr, 'Fetch accepts no arguments!'
+ return 1
+ args.extend('-s git git fetch origin'.split(' '))
M-A Ruel 2012/02/27 16:52:48 Let's do args = ['-s', 'git', 'git', 'fetch'] + ar
+ # Add jobs option back, so CMDrecurse doesn't freak.
+ parser.add_option('--jobs')
+ return CMDrecurse(parser, args)
+
+
@attr('usage', '[url] [safesync url]')
def CMDconfig(parser, args):
"""Create a .gclient file in the current directory.
« 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