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

Unified Diff: fetch.py

Issue 1187913002: Run install-build-deps in the middle of 'fetch chromium' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 6 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 | recipes/chromium.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
diff --git a/fetch.py b/fetch.py
index 067d4c61ab0a8bec41af0fb3d15b47a3e248700f..03ba98671c81ba56a0271710980e09c67258ab17 100755
--- a/fetch.py
+++ b/fetch.py
@@ -62,7 +62,7 @@ class Checkout(object):
def run(self, cmd, **kwargs):
print 'Running: %s' % (' '.join(pipes.quote(x) for x in cmd))
if self.options.dry_run:
- return 0
+ return ''
return subprocess.check_output(cmd, **kwargs)
@@ -133,7 +133,7 @@ class GclientGitCheckout(GclientCheckout, GitCheckout):
# Configure and do the gclient checkout.
self.run_gclient('config', '--spec', self._format_spec())
sync_cmd = ['sync']
- if self.options.nohooks:
+ if self.options.nohooks or self.spec.get('fetch_hooks'):
sync_cmd.append('--nohooks')
if self.options.no_history:
sync_cmd.append('--no-history')
@@ -141,6 +141,11 @@ class GclientGitCheckout(GclientCheckout, GitCheckout):
sync_cmd.append('--with_branch_heads')
self.run_gclient(*sync_cmd)
+ for cmd in self.spec.get('fetch_hooks', []):
+ self.run(cmd)
+ if self.spec.get('fetch_hooks') and not self.options.nohooks:
+ self.run_gclient('runhooks')
+
# Configure git.
wd = os.path.join(self.base, self.root)
if self.options.dry_run:
« no previous file with comments | « no previous file | recipes/chromium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698