From: machenbach@chromium.org Date: Tue, 18 Mar 2014 12:46:48 +0000 (+0000) Subject: Deprecate ChangeLog on bleeding_edge. X-Git-Tag: upstream/4.7.83~10199 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c06c9f8e1efc9e8bd9423d01e7ce4b41b3971035;p=platform%2Fupstream%2Fv8.git Deprecate ChangeLog on bleeding_edge. - This adds a sentinel to the ChangeLog on bleeding edge. - Modifying the ChangeLog file directly when pushing to trunk is now no longer possible. If further modifications to the ChangeLog in manual push-to-trunk mode are required (e.g. after the prepare push LGTM), the change log entry temp file must be edited. - Functionality that is no longer needed is removed. BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/199893005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/ChangeLog b/ChangeLog index b961126..923eb75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-03-18: Sentinel + + The ChangeLog file is no longer maintained on bleeding_edge. This + sentinel should stay on top of this list. + + 2014-03-18: Version 3.25.15 Don't generate keyed store ICs for global proxies (Chromium issue diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 6dad59c..39b6891 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -84,14 +84,6 @@ def Fill80(line): subsequent_indent=" ") -def GetLastChangeLogEntries(change_log_file): - result = [] - for line in LinesInFile(change_log_file): - if re.search(r"^\d{4}-\d{2}-\d{2}:", line) and result: break - result.append(line) - return "".join(result) - - def MakeComment(text): return MSub(r"^( ?)", "#", text) diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index eca6993..987aa83 100755 --- a/tools/push-to-trunk/push_to_trunk.py +++ b/tools/push-to-trunk/push_to_trunk.py @@ -36,7 +36,6 @@ from common_includes import * TRUNKBRANCH = "TRUNKBRANCH" CHROMIUM = "CHROMIUM" DEPS_FILE = "DEPS_FILE" -NEW_CHANGELOG_FILE = "NEW_CHANGELOG_FILE" CONFIG = { BRANCHNAME: "prepare-push", @@ -46,7 +45,6 @@ CONFIG = { DOT_GIT_LOCATION: ".git", VERSION_FILE: "src/version.cc", CHANGELOG_FILE: "ChangeLog", - NEW_CHANGELOG_FILE: "/tmp/v8-push-to-trunk-tempfile-new-changelog", CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry", PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file", COMMITMSG_FILE: "/tmp/v8-push-to-trunk-tempfile-commitmsg", @@ -190,11 +188,7 @@ class EditChangeLog(Step): self.Die("Empty ChangeLog entry.") # Safe new change log for adding it later to the trunk patch. - TextToFile(changelog_entry, self.Config(NEW_CHANGELOG_FILE)) - - old_change_log = FileToText(self.Config(CHANGELOG_FILE)) - new_change_log = "%s\n\n\n%s" % (changelog_entry, old_change_log) - TextToFile(new_change_log, self.Config(CHANGELOG_FILE)) + TextToFile(changelog_entry, self.Config(CHANGELOG_ENTRY_FILE)) class IncrementVersion(Step): @@ -242,11 +236,6 @@ class CommitRepository(Step): def RunStep(self): self.WaitForLGTM() - # Re-read the ChangeLog entry (to pick up possible changes). - # FIXME(machenbach): This was hanging once with a broken pipe. - TextToFile(GetLastChangeLogEntries(self.Config(CHANGELOG_FILE)), - self.Config(CHANGELOG_ENTRY_FILE)) - self.GitPresubmit() self.GitDCommit() @@ -293,7 +282,6 @@ class SquashCommits(Step): if not text: # pragma: no cover self.Die("Commit message editing failed.") TextToFile(text, self.Config(COMMITMSG_FILE)) - os.remove(self.Config(CHANGELOG_ENTRY_FILE)) class NewBranch(Step): @@ -319,11 +307,11 @@ class AddChangeLog(Step): # on trunk and apply the exact changes determined by this PrepareChangeLog # step above. self.GitCheckoutFile(self.Config(CHANGELOG_FILE), "svn/trunk") - changelog_entry = FileToText(self.Config(NEW_CHANGELOG_FILE)) + changelog_entry = FileToText(self.Config(CHANGELOG_ENTRY_FILE)) old_change_log = FileToText(self.Config(CHANGELOG_FILE)) new_change_log = "%s\n\n\n%s" % (changelog_entry, old_change_log) TextToFile(new_change_log, self.Config(CHANGELOG_FILE)) - os.remove(self.Config(NEW_CHANGELOG_FILE)) + os.remove(self.Config(CHANGELOG_ENTRY_FILE)) class SetVersion(Step): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 0edfbfe..a8c7935 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -52,7 +52,6 @@ TEST_CONFIG = { VERSION_FILE: None, CHANGELOG_FILE: None, CHANGELOG_ENTRY_FILE: "/tmp/test-v8-push-to-trunk-tempfile-changelog-entry", - NEW_CHANGELOG_FILE: "/tmp/test-v8-push-to-trunk-tempfile-new-changelog", PATCH_FILE: "/tmp/test-v8-push-to-trunk-tempfile-patch", COMMITMSG_FILE: "/tmp/test-v8-push-to-trunk-tempfile-commitmsg", CHROMIUM: "/tmp/test-v8-push-to-trunk-tempfile-chromium", @@ -538,8 +537,6 @@ class ScriptTest(unittest.TestCase): def testEditChangeLog(self): TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile() - TEST_CONFIG[CHANGELOG_FILE] = self.MakeEmptyTempFile() - TextToFile(" Original CL", TEST_CONFIG[CHANGELOG_FILE]) TextToFile(" New \n\tLines \n", TEST_CONFIG[CHANGELOG_ENTRY_FILE]) os.environ["EDITOR"] = "vi" @@ -549,8 +546,8 @@ class ScriptTest(unittest.TestCase): self.RunStep(PushToTrunk, EditChangeLog) - self.assertEquals("New\n Lines\n\n\n Original CL", - FileToText(TEST_CONFIG[CHANGELOG_FILE])) + self.assertEquals("New\n Lines", + FileToText(TEST_CONFIG[CHANGELOG_ENTRY_FILE])) def testIncrementVersion(self): TEST_CONFIG[VERSION_FILE] = self.MakeTempVersionFile() @@ -567,22 +564,6 @@ class ScriptTest(unittest.TestCase): self.assertEquals("6", self._state["new_build"]) self.assertEquals("0", self._state["new_patch"]) - def testLastChangeLogEntries(self): - TEST_CONFIG[CHANGELOG_FILE] = self.MakeEmptyTempFile() - l = """ - Fixed something. - (issue 1234)\n""" - for _ in xrange(10): l = l + l - - cl_chunk = """2013-11-12: Version 3.23.2\n%s - Performance and stability improvements on all platforms.\n\n\n""" % l - - cl_chunk_full = cl_chunk + cl_chunk + cl_chunk - TextToFile(cl_chunk_full, TEST_CONFIG[CHANGELOG_FILE]) - - cl = GetLastChangeLogEntries(TEST_CONFIG[CHANGELOG_FILE]) - self.assertEquals(cl_chunk, cl) - def _TestSquashCommits(self, change_log, expected_msg): TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile() with open(TEST_CONFIG[CHANGELOG_ENTRY_FILE], "w") as f: @@ -642,22 +623,15 @@ Performance and stability improvements on all platforms.""" TEST_CONFIG[CHANGELOG_FILE] = self.MakeEmptyTempFile() if not os.path.exists(TEST_CONFIG[CHROMIUM]): os.makedirs(TEST_CONFIG[CHROMIUM]) - bleeding_edge_change_log = """1999-02-03: Version 3.12.2 - - Performance and stability improvements on all platforms.\n""" + bleeding_edge_change_log = "2014-03-17: Sentinel\n" TextToFile(bleeding_edge_change_log, TEST_CONFIG[CHANGELOG_FILE]) TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line", TEST_CONFIG[DEPS_FILE]) os.environ["EDITOR"] = "vi" def CheckPreparePush(): - cl = FileToText(TEST_CONFIG[CHANGELOG_FILE]) - self.assertTrue(re.search(r"Version 3.22.5", cl)) - self.assertTrue(re.search(r" Log text 1 \(issue 321\).", cl)) - self.assertFalse(re.search(r" \(author1@chromium\.org\)", cl)) - - # Make sure all comments got stripped. - self.assertFalse(re.search(r"^#", cl, flags=re.M)) + self.assertEquals(bleeding_edge_change_log, + FileToText(TEST_CONFIG[CHANGELOG_FILE])) version = FileToText(TEST_CONFIG[VERSION_FILE]) self.assertTrue(re.search(r"#define BUILD_NUMBER\s+6", version))