Create v8 roll branches in refs/heads.

This is needed as normal chromium checkouts don't fetch
branch-heads.

These branches will also be replicated by GitHub and are
fetched when cloning from the repository.

The expected object size will be the same or smaller than
before as we currently push the same information onto the
candidates branch (which already is in refs/heads). The only
difference is the increasing number of refs in refs/heads.

BUG=chromium:451975
TBR=tandrii@chromium.org
NOTRY=true
LOG=n

TEST=./script_test.py
TEST=tools/release/create_release.py -r machenbach@chromium.org -a machenbach@chromium.org --dry-run

Review URL: https://codereview.chromium.org/914973002

Cr-Commit-Position: refs/heads/master@{#26629}
This commit is contained in:
machenbach 2015-02-12 10:34:21 -08:00 committed by Commit bot
parent 2707d4c9f4
commit 44bc8646c3
2 changed files with 18 additions and 16 deletions

View File

@ -16,10 +16,12 @@ class Preparation(Step):
MESSAGE = "Preparation."
def RunStep(self):
self.Git("fetch origin +refs/heads/*:refs/heads/*")
self.Git("fetch origin +refs/branch-heads/*:refs/branch-heads/*")
self.Git("fetch origin +refs/pending/*:refs/pending/*")
self.Git("fetch origin +refs/pending-tags/*:refs/pending-tags/*")
fetchspecs = [
"+refs/heads/*:refs/heads/*",
"+refs/pending/*:refs/pending/*",
"+refs/pending-tags/*:refs/pending-tags/*",
]
self.Git("fetch origin %s" % " ".join(fetchspecs))
self.GitCheckout("origin/master")
self.DeleteBranch("work-branch")
@ -226,10 +228,10 @@ class PushBranch(Step):
def RunStep(self):
pushspecs = [
"refs/heads/work-branch:refs/pending/branch-heads/%s" % self["version"],
"%s:refs/pending-tags/branch-heads/%s" %
"refs/heads/work-branch:refs/pending/heads/%s" % self["version"],
"%s:refs/pending-tags/heads/%s" %
(self["pending_hash"], self["version"]),
"%s:refs/branch-heads/%s" % (self["push_hash"], self["version"]),
"%s:refs/heads/%s" % (self["push_hash"], self["version"]),
]
cmd = "push origin %s" % " ".join(pushspecs)
if self._options.dry_run:
@ -247,7 +249,7 @@ class TagRevision(Step):
(self["commit_title"], self["version"]))
else:
self.vc.Tag(self["version"],
"branch-heads/%s" % self["version"],
"origin/%s" % self["version"],
self["commit_title"])

View File

@ -915,10 +915,10 @@ Performance and stability improvements on all platforms."""
change_log)
expectations = [
Cmd("git fetch origin +refs/heads/*:refs/heads/*", ""),
Cmd("git fetch origin +refs/branch-heads/*:refs/branch-heads/*", ""),
Cmd("git fetch origin +refs/pending/*:refs/pending/*", ""),
Cmd("git fetch origin +refs/pending-tags/*:refs/pending-tags/*", ""),
Cmd("git fetch origin "
"+refs/heads/*:refs/heads/* "
"+refs/pending/*:refs/pending/* "
"+refs/pending-tags/*:refs/pending-tags/*", ""),
Cmd("git checkout -f origin/master", ""),
Cmd("git branch", ""),
Cmd("git log -1 --format=\"%H %T\" push_hash", "push_hash tree_hash"),
@ -943,12 +943,12 @@ Performance and stability improvements on all platforms."""
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
cb=CheckVersionCommit),
Cmd("git push origin "
"refs/heads/work-branch:refs/pending/branch-heads/3.22.5 "
"pending_hash:refs/pending-tags/branch-heads/3.22.5 "
"push_hash:refs/branch-heads/3.22.5", ""),
"refs/heads/work-branch:refs/pending/heads/3.22.5 "
"pending_hash:refs/pending-tags/heads/3.22.5 "
"push_hash:refs/heads/3.22.5", ""),
Cmd("git fetch", ""),
Cmd("git log -1 --format=%H --grep="
"\"Version 3.22.5\" branch-heads/3.22.5", "hsh_to_tag"),
"\"Version 3.22.5\" origin/3.22.5", "hsh_to_tag"),
Cmd("git tag 3.22.5 hsh_to_tag", ""),
Cmd("git push origin 3.22.5", ""),
Cmd("git checkout -f origin/master", ""),