Reviewers: Jakob,

Message:
PTAL

Description:
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 not 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 got removed.

BUG=

Please review this at https://codereview.chromium.org/199893005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+14, -54 lines):
  M ChangeLog
  M tools/push-to-trunk/common_includes.py
  M tools/push-to-trunk/push_to_trunk.py
  M tools/push-to-trunk/test_scripts.py


Index: ChangeLog
diff --git a/ChangeLog b/ChangeLog
index 9a6e35e5bda0c53240f9b8072f9cc1a1b0aa1876..d9a82698fc9bb60946e46c32f4fc016857b2f7c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-17: Sentinel
+
+        The ChangeLog file is no longer maintained on bleeding_edge. This
+        sentinel should stay on top of this list.
+
+
 2014-03-17: Version 3.25.14

         Performance and stability improvements on all platforms.
Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 6dad59c6cffafa9d47e13f3c6c76419c42625d31..39b68913426e3f845953434134339d6bd2e40d7c 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)

Index: tools/push-to-trunk/push_to_trunk.py
diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index eca699315964e7646b9ed1fc2265978eaf1b94ca..987aa83263a5bfdb88e3c1f9f7014a92f12a5d51 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):
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 0edfbfe9747a1c39836548d9b5c8e238b626f87e..a8c79353c0f62dcab9d0384edc7e533548d2d2af 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))


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to