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

Unified Diff: tools/release/common_includes.py

Issue 1002383002: Make release scripts more robust. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | tools/release/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/common_includes.py
diff --git a/tools/release/common_includes.py b/tools/release/common_includes.py
index c967384db6641b6d9ab41498d48a9115a6afdf1e..bf71c37c963a2a2aa09a73c4765d1a79841444a8 100644
--- a/tools/release/common_includes.py
+++ b/tools/release/common_includes.py
@@ -538,8 +538,8 @@ class Step(GitRecipesMixin):
if not self.GitIsWorkdirClean(): # pragma: no cover
self.Die("Workspace is not clean. Please commit or undo your changes.")
- # Persist current branch.
- self["current_branch"] = self.GitCurrentBranch()
+ # Checkout master in case the script was left on a work branch.
+ self.GitCheckout('origin/master')
# Fetch unfetched revisions.
self.vc.Fetch()
@@ -549,12 +549,8 @@ class Step(GitRecipesMixin):
self.DeleteBranch(self._config["BRANCHNAME"])
tandrii(chromium) 2015/03/15 10:50:17 this seems to be safer against weird branch names.
def CommonCleanup(self):
- if ' ' in self["current_branch"]:
- self.GitCheckout('master')
- else:
- self.GitCheckout(self["current_branch"])
- if self._config["BRANCHNAME"] != self["current_branch"]:
- self.GitDeleteBranch(self._config["BRANCHNAME"])
+ self.GitCheckout('origin/master')
+ self.GitDeleteBranch(self._config["BRANCHNAME"])
tandrii(chromium) 2015/03/15 10:50:18 seems inconsistent from above.
Michael Achenbach 2015/03/18 22:33:45 I don't follow. PrepareBranch is always called in
tandrii(chromium) 2015/03/25 23:12:01 I meant that I didn't quite understand why you cal
# Clean up all temporary files.
for f in glob.iglob("%s*" % self._config["PERSISTFILE_BASENAME"]):
« no previous file with comments | « no previous file | tools/release/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698