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

Unified Diff: tools/push-to-trunk/common_includes.py

Issue 212983003: Implement auto-roll script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py
index 39b68913426e3f845953434134339d6bd2e40d7c..4fd1aafa1de14d38f719db607bdf63668ccfdc54 100644
--- a/tools/push-to-trunk/common_includes.py
+++ b/tools/push-to-trunk/common_includes.py
@@ -256,11 +256,12 @@ class Step(GitRecipesMixin):
if self._requires and not self._state.get(self._requires):
return
- print ">>> Step %d: %s" % (self._number, self._text)
- self.RunStep()
-
- # Persist state.
- TextToFile(json.dumps(self._state), state_file)
+ try:
+ print ">>> Step %d: %s" % (self._number, self._text)
Jarin 2014/04/02 06:30:40 Why is the printing inside the try block? Can it f
+ return self.RunStep()
+ finally:
+ # Persist state.
+ TextToFile(json.dumps(self._state), state_file)
def RunStep(self): # pragma: no cover
raise NotImplementedError
@@ -555,7 +556,8 @@ class ScriptsBase(object):
steps.append(MakeStep(step_class, number, self._state, self._config,
options, self._side_effect_handler))
for step in steps[options.step:]:
- step.Run()
+ if step.Run():
+ return 1
return 0
def Run(self, args=None):

Powered by Google App Engine
This is Rietveld 408576698