diff --git a/tools/push-to-trunk/auto_tag.py b/tools/push-to-trunk/auto_tag.py index 7b82e83890..5ba7f766d9 100755 --- a/tools/push-to-trunk/auto_tag.py +++ b/tools/push-to-trunk/auto_tag.py @@ -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): diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 7ea39f73c9..f015601a07 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -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) diff --git a/tools/push-to-trunk/merge_to_branch.py b/tools/push-to-trunk/merge_to_branch.py index 006afbb443..9a9e65cd0a 100755 --- a/tools/push-to-trunk/merge_to_branch.py +++ b/tools/push-to-trunk/merge_to_branch.py @@ -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): diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index 184617d159..ce18da4db3 100755 --- a/tools/push-to-trunk/push_to_trunk.py +++ b/tools/push-to-trunk/push_to_trunk.py @@ -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): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 4edb3481b8..0eb57e1066 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -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"], ""),