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

Unified Diff: scripts/slave/chromium_commands.py

Issue 157073002: Bot update! (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Chromium commands fix Created 6 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
Index: scripts/slave/chromium_commands.py
diff --git a/scripts/slave/chromium_commands.py b/scripts/slave/chromium_commands.py
index 9c8b82e023311b74aac87c0e6558e0d6e898d511..c44efa82211d3bd005525f7d97a86878d79447bd 100644
--- a/scripts/slave/chromium_commands.py
+++ b/scripts/slave/chromium_commands.py
@@ -269,6 +269,7 @@ class GClient(SourceBaseCommand):
self.no_gclient_revision = args.get('no_gclient_revision', False)
self.gclient_transitive = args.get('gclient_transitive')
self.gclient_jobs = args.get('gclient_jobs')
+ self.do_nothing = False
def start(self):
"""Start the update process.
@@ -287,8 +288,21 @@ class GClient(SourceBaseCommand):
self.sourcedatafile = os.path.join(self.builder.basedir,
self.srcdir,
".buildbot-sourcedata")
+ self.do_nothing = os.path.isfile(os.path.join(self.builder.basedir,
+ self.srcdir,
+ 'update.flag'))
+
+ d = defer.succeed(0)
+
+ if self.do_nothing:
+ # If bot update is run, we don't need to run the traditional update step.
+ msg = 'update.flag file found: bot_update has run and checkout is \n'
+ msg += 'already in a consistent state.\n'
+ msg += 'No actions will be performed in this step.'
+ self.sendStatus({'header': msg})
+ d.addCallback(self._sendRC)
+ return d
- d = defer.succeed(None)
# Do we need to clobber anything?
if self.mode in ("copy", "clobber", "export"):
d.addCallback(self.doClobber, self.workdir)

Powered by Google App Engine
This is Rietveld 408576698