Fix svn tags in release scripts.

Rebase the local branch after committing so that git svn
tag works.

Some of these changes need to be ported to git in https://codereview.chromium.org/607893004/

BUG=chromium:410721,v8:3601
LOG=n
TEST=script_test.py
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-09-30 13:12:44 +00:00
parent bdc02f8a2e
commit f3a19a7e76
5 changed files with 17 additions and 5 deletions

View File

@ -152,7 +152,8 @@ class MakeTag(Step):
def RunStep(self):
if not self._options.dry_run:
self.GitReset(self["lkgr"])
self.vc.Tag(self["candidate_version"])
# FIXME(machenbach): Make this work with the git repo.
self.vc.Tag(self["candidate_version"], "svn/bleeding_edge")
class CleanUp(Step):

View File

@ -295,7 +295,7 @@ class VCInterface(object):
# TODO(machenbach): There is some svn knowledge in this interface. In svn,
# tag and commit are different remote commands, while in git we would commit
# and tag locally and then push/land in one unique step.
def Tag(self, tag):
def Tag(self, tag, remote):
raise NotImplementedError()
@ -342,7 +342,9 @@ class GitSvnInterface(VCInterface):
def CLLand(self):
self.step.GitDCommit()
def Tag(self, tag):
def Tag(self, tag, remote):
self.step.GitSVNFetch()
self.step.Git("rebase %s" % remote)
self.step.GitSVNTag(tag)

View File

@ -220,7 +220,7 @@ class TagRevision(Step):
if self._options.revert_bleeding_edge:
return
print "Creating tag svn/tags/%s" % self["version"]
self.vc.Tag(self["version"])
self.vc.Tag(self["version"], self.vc.RemoteBranch(self["merge_to_branch"]))
class CleanUp(Step):

View File

@ -361,7 +361,7 @@ class TagRevision(Step):
MESSAGE = "Tag the new revision."
def RunStep(self):
self.vc.Tag(self["version"])
self.vc.Tag(self["version"], self.vc.RemoteCandidateBranch())
class CleanUp(Step):

View File

@ -791,6 +791,8 @@ Performance and stability improvements on all platforms.""", commit)
expectations.append(RL("Y")) # Sanity check.
expectations += [
Cmd("git svn dcommit 2>&1", ""),
Cmd("git svn fetch", ""),
Cmd("git rebase svn/trunk", ""),
Cmd("git svn tag 3.22.5 -m \"Tagging version 3.22.5\"", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
@ -1143,6 +1145,8 @@ LOG=N
Cmd("git cl presubmit", "Presubmit successfull\n"),
Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n",
cb=VerifySVNCommit),
Cmd("git svn fetch", ""),
Cmd("git rebase svn/trunk", ""),
Cmd("git svn tag 3.22.5.1 -m \"Tagging version 3.22.5.1\"", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
@ -1272,6 +1276,9 @@ LOG=N
Cmd("git cl presubmit", "Presubmit successfull\n"),
Cmd("git cl dcommit -f --bypass-hooks", "Closing issue\n",
cb=VerifySVNCommit),
# FIXME(machenbach): This won't work when setting tags on the git repo.
Cmd("git svn fetch", ""),
Cmd("git rebase origin/candidates", ""),
Cmd("git svn tag 3.22.5.1 -m \"Tagging version 3.22.5.1\"", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
@ -1604,6 +1611,8 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
Cmd("git svn find-rev r123", "hash123"),
Cmd("git log -1 --format=%at hash123", "1"),
Cmd("git reset --hard hash123", ""),
Cmd("git svn fetch", ""),
Cmd("git rebase svn/bleeding_edge", ""),
Cmd("git svn tag 3.4.3 -m \"Tagging version 3.4.3\"", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),