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

Unified Diff: apply_issue.py

Issue 10918264: When a DEPS file is modified, run gclient sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Use BASE on Subversion Created 8 years, 3 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: apply_issue.py
diff --git a/apply_issue.py b/apply_issue.py
index bcaa6f267ee90cff02120abd8eb02f1d72d6fd1c..3b3f1f4c1db22907a1b082cb293cce875c33000e 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -10,6 +10,7 @@ import getpass
import logging
import optparse
import os
+import subprocess
import sys
import urllib2
@@ -17,6 +18,7 @@ import breakpad # pylint: disable=W0611
import checkout
import fix_encoding
+import gclient_utils
import rietveld
import scm
@@ -109,6 +111,16 @@ def main():
except checkout.PatchApplicationFailed, e:
print >> sys.stderr, str(e)
return 1
+
+ if 'DEPS' in map(os.path.basename, patchset.filenames):
+ gclient_root = gclient_utils.FindGclientRoot(options.root_dir)
+ if gclient_root and scm_type:
+ print(
+ 'A DEPS file was updated inside a gclient checkout, running gclient '
+ 'sync.')
+ base_rev = 'BASE' if scm_type == 'svn' else 'HEAD'
+ return subprocess.call(
+ ['gclient', 'sync', '--revision', base_rev], cwd=gclient_root)
return 0
« 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