From: machenbach@chromium.org Date: Thu, 25 Sep 2014 14:09:34 +0000 (+0000) Subject: Refactoring: Remove unnecessary logic from push_to_trunk. X-Git-Tag: upstream/4.7.83~6687 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d092ce2c48caf5a72254c22c93098130f4f47000;p=platform%2Fupstream%2Fv8.git Refactoring: Remove unnecessary logic from push_to_trunk. Remove some svnish things that are output-only. BUG=chromium:410721 LOG=n TBR=tandrii@chromium.org Review URL: https://codereview.chromium.org/598403003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index e57106e..c1c2aa5 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -337,10 +337,10 @@ class GitSvnInterface(VCInterface): return "svn/%s" % name def Land(self): - return self.step.GitSVNDCommit() + self.step.GitSVNDCommit() def CLLand(self): - return self.step.GitDCommit() + self.step.GitDCommit() def Tag(self, tag): self.step.GitSVNTag(tag) diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index 45ee2e8..184617d 100755 --- a/tools/push-to-trunk/push_to_trunk.py +++ b/tools/push-to-trunk/push_to_trunk.py @@ -355,24 +355,6 @@ class CommitSVN(Step): def RunStep(self): result = self.vc.Land() - # TODO(machenbach): Remove/improve this logic before the git switch. - if not result: # pragma: no cover - self.Die("'git svn dcommit' failed.") - result = filter(lambda x: re.search(r"^Committed r[0-9]+", x), - result.splitlines()) - if len(result) > 0: - self["trunk_revision"] = re.sub(r"^Committed r([0-9]+)", r"\1",result[0]) - - # Sometimes grepping for the revision fails. No idea why. If you figure - # out why it is flaky, please do fix it properly. - if not self["trunk_revision"]: - print("Sorry, grepping for the SVN revision failed. Please look for it " - "in the last command's output above and provide it manually (just " - "the number, without the leading \"r\").") - self.DieNoManualMode("Can't prompt in forced mode.") - while not self["trunk_revision"]: - print "> ", - self["trunk_revision"] = self.ReadLine() class TagRevision(Step): @@ -387,10 +369,8 @@ class CleanUp(Step): def RunStep(self): print("Congratulations, you have successfully created the trunk " - "revision %s. Please don't forget to roll this new version into " - "Chromium, and to update the v8rel spreadsheet:" + "revision %s." % self["version"]) - print "%s\ttrunk\t%s" % (self["version"], self["trunk_revision"]) self.CommonCleanup() if self.Config("TRUNKBRANCH") != self["current_branch"]: diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 9af02b0..5475c49 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -790,8 +790,7 @@ Performance and stability improvements on all platforms.""", commit) if manual: expectations.append(RL("Y")) # Sanity check. expectations += [ - Cmd("git svn dcommit 2>&1", - "Some output\nCommitted r123456\nSome output\n"), + Cmd("git svn dcommit 2>&1", ""), 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"], ""),