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

Unified Diff: tools/release/create_release.py

Issue 979243004: Make automated branch creation gnumbd-save. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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/create_release.py
diff --git a/tools/release/create_release.py b/tools/release/create_release.py
index 44c10d9b304367f6053a48ff9b2118afbe5701e2..3bbb50e491aa5bc175d747f3af996a8c4236226d 100755
--- a/tools/release/create_release.py
+++ b/tools/release/create_release.py
@@ -30,23 +30,10 @@ class PrepareBranchRevision(Step):
MESSAGE = "Check from which revision to branch off."
def RunStep(self):
- if self._options.revision:
- self["push_hash"], tree_object = self.GitLog(
- n=1, format="\"%H %T\"", git_hash=self._options.revision).split(" ")
- else:
- self["push_hash"], tree_object = self.GitLog(
- n=1, format="\"%H %T\"", branch="origin/master").split(" ")
- print "Release revision %s" % self["push_hash"]
+ self["push_hash"] = (self._options.revision or
+ self.GitLog(n=1, format="%H", branch="origin/master"))
assert self["push_hash"]
-
- pending_tuples = self.GitLog(
- n=200, format="\"%H %T\"", branch="refs/pending/heads/master")
- for hsh, tree in map(lambda s: s.split(" "), pending_tuples.splitlines()):
- if tree == tree_object:
- self["pending_hash"] = hsh
- break
- print "Pending release revision %s" % self["pending_hash"]
- assert self["pending_hash"]
+ print "Release revision %s" % self["push_hash"]
class IncrementVersion(Step):
@@ -174,7 +161,7 @@ class MakeBranch(Step):
def RunStep(self):
self.Git("reset --hard origin/master")
- self.Git("checkout -b work-branch %s" % self["pending_hash"])
+ self.Git("checkout -b work-branch %s" % self["push_hash"])
self.GitCheckoutFile(CHANGELOG_FILE, self["latest_version"])
self.GitCheckoutFile(VERSION_FILE, self["latest_version"])
@@ -229,8 +216,7 @@ class PushBranch(Step):
def RunStep(self):
pushspecs = [
"refs/heads/work-branch:refs/pending/heads/%s" % self["version"],
- "%s:refs/pending-tags/heads/%s" %
- (self["pending_hash"], self["version"]),
+ "%s:refs/pending-tags/heads/%s" % (self["push_hash"], self["version"]),
"%s:refs/heads/%s" % (self["push_hash"], self["version"]),
]
cmd = "push origin %s" % " ".join(pushspecs)
« 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