Fix push script for autoroll account.

Push tags to the repo not to the remote - which is a cache
checkout on the bots.

Add new files when doing pure svn commits. Otherwise, new
files are silently ignored and not committed.

BUG=408523
LOG=n
TEST=script_test.py
TBR=tandrii@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25049}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-11-02 13:12:46 +00:00
parent a4ee4d608b
commit 803872ecbd
2 changed files with 15 additions and 2 deletions

View File

@ -400,6 +400,9 @@ class GitTagsOnlyMixin(VCInterface):
return "origin/%s" % name
return "branch-heads/%s" % name
def PushRef(self, ref):
self.step.Git("push origin %s" % ref)
def Tag(self, tag, remote, message):
# Wait for the commit to appear. Assumes unique commit message titles (this
# is the case for all automated merge and push commits - also no title is
@ -418,7 +421,7 @@ class GitTagsOnlyMixin(VCInterface):
"git updater is lagging behind?")
self.step.Git("tag %s %s" % (tag, commit))
self.step.Git("push origin %s" % tag)
self.PushRef(tag)
class GitReadSvnWriteInterface(GitTagsOnlyMixin, GitSvnInterface):
@ -436,11 +439,17 @@ class GitInterface(GitTagsOnlyMixin):
raise NotImplementedError()
def Land(self):
# FIXME(machenbach): This will not work with checkouts from bot_update
# after flag day because it will push to the cache. Investigate if it
# will work with "cl land".
self.step.Git("push origin")
def CLLand(self):
self.step.GitCLLand()
def PushRef(self, ref):
self.step.Git("push https://chromium.googlesource.com/v8/v8 %s" % ref)
VC_INTERFACES = {
"git_svn": GitSvnInterface,
@ -726,6 +735,8 @@ class Step(GitRecipesMixin):
(root, self._config["PATCH_FILE"]),
cwd=self._options.svn):
self.Die("Could not apply patch.")
# Recursively add possibly newly added files.
self.Command("svn", "add --force %s" % root, cwd=self._options.svn)
self.Command(
"svn",
"commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" %

View File

@ -948,6 +948,7 @@ Performance and stability improvements on all platforms.""", commit)
Cmd("svn status", "", cwd=svn_root),
Cmd("patch -d trunk -p1 -i %s" %
TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root),
Cmd("svn add --force trunk", "", cwd=svn_root),
Cmd("svn commit --non-interactive --username=author@chromium.org "
"--config-dir=[CONFIG_DIR] "
"-m \"Version 3.22.5 (based on push_hash)\"",
@ -957,7 +958,7 @@ Performance and stability improvements on all platforms.""", commit)
"\"Version 3.22.5 (based on push_hash)\""
" origin/candidates", "hsh_to_tag"),
Cmd("git tag 3.22.5 hsh_to_tag", ""),
Cmd("git push origin 3.22.5", ""),
Cmd("git push https://chromium.googlesource.com/v8/v8 3.22.5", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
@ -1769,6 +1770,7 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
Cmd("svn status", "", cwd=svn_root),
Cmd("patch -d branches/bleeding_edge -p1 -i %s" %
TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root),
Cmd("svn add --force branches/bleeding_edge", "", cwd=svn_root),
Cmd("svn commit --non-interactive --username=author@chromium.org "
"--config-dir=[CONFIG_DIR] "
"-m \"[Auto-roll] Bump up version to 3.11.6.0\"",