webkit-patch upload regenerates the WebCore ChangeLog every time it's called
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 07:58:03 +0000 (07:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 07:58:03 +0000 (07:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108983

Patch by Timothy Loh <timloh@chromium.com> on 2013-02-11
Reviewed by Ryosuke Niwa.

This patch puts the behaviour from Bug 74358 behind the flag (default=OFF)
`--update-changelogs', and removes the flag `--no-prepare-changelogs'.
The flag name change from prepare to update is since we still want to
prepare changelogs in the default case when none currently exist.

* Scripts/webkitpy/tool/commands/commandtest.py:
(CommandsTest.assert_execute_outputs):
* Scripts/webkitpy/tool/steps/options.py:
(Options):
* Scripts/webkitpy/tool/steps/preparechangelog.py:
(PrepareChangeLog.options):
(PrepareChangeLog.run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142589 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/tool/commands/commandtest.py
Tools/Scripts/webkitpy/tool/steps/options.py
Tools/Scripts/webkitpy/tool/steps/preparechangelog.py

index df5393ba5f8c4c2eebc6d2d45adac55d957445cf..50bf77e635918b51e2bde2e22ae25b772d089913 100644 (file)
@@ -1,3 +1,23 @@
+2013-02-11  Timothy Loh  <timloh@chromium.com>
+
+        webkit-patch upload regenerates the WebCore ChangeLog every time it's called
+        https://bugs.webkit.org/show_bug.cgi?id=108983
+
+        Reviewed by Ryosuke Niwa.
+
+        This patch puts the behaviour from Bug 74358 behind the flag (default=OFF)
+        `--update-changelogs', and removes the flag `--no-prepare-changelogs'.
+        The flag name change from prepare to update is since we still want to
+        prepare changelogs in the default case when none currently exist.
+
+        * Scripts/webkitpy/tool/commands/commandtest.py:
+        (CommandsTest.assert_execute_outputs):
+        * Scripts/webkitpy/tool/steps/options.py:
+        (Options):
+        * Scripts/webkitpy/tool/steps/preparechangelog.py:
+        (PrepareChangeLog.options):
+        (PrepareChangeLog.run):
+
 2013-02-11  Jochen Eisinger  <jochen@chromium.org>
 
         [chromium] move printPage() implementation to testRunner library
index 6d009bcca9ff02e8fea6932bac9331bed2757552..655c33fdac41dc411b9578d514a2d98b16e0ea91 100644 (file)
@@ -42,7 +42,7 @@ class CommandsTest(TestCase):
         options.obsolete_patches = True
         options.open_bug = True
         options.port = 'MOCK port'
-        options.prepare_changelogs = True
+        options.update_changelogs = False
         options.quiet = True
         options.reviewer = 'MOCK reviewer'
         command.bind_to_tool(tool)
index 05204fa166a85379a1c53587d3c909d51031cab4..7eda6145901bf52d8b89c75d4dca65fc5345322f 100644 (file)
@@ -49,7 +49,6 @@ class Options(object):
     obsolete_patches = make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one.")
     open_bug = make_option("--open-bug", action="store_true", dest="open_bug", default=False, help="Opens the associated bug in a browser.")
     parent_command = make_option("--parent-command", action="store", dest="parent_command", default=None, help="(Internal) The command that spawned this instance.")
-    prepare_changelogs = make_option("--no-prepare-changelogs", action="store_false", dest="prepare_changelogs", default=True, help="Don't prepare (create and/or update) ChangeLogs.")
     quiet = make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output.")
     request_commit = make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review.")
     review = make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review.")
@@ -57,4 +56,5 @@ class Options(object):
     suggest_reviewers = make_option("--suggest-reviewers", action="store_true", default=False, help="Offer to CC appropriate reviewers.")
     test = make_option("--test", action="store_true", dest="test", default=False, help="Run run-webkit-tests before committing.")
     update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
+    update_changelogs = make_option("--update-changelogs", action="store_true", dest="update_changelogs", default=False, help="Update existing ChangeLog entries with new date, bug description, and touched files/functions.")
     changelog_count = make_option("--changelog-count", action="store", type="int", dest="changelog_count", help="Number of changelogs to parse.")
index 9262903bac44c2ce1ed7b594ea2f68a9737dfc5c..716ab826d5bfa07a1be8553135314c65d05f822a 100644 (file)
@@ -45,7 +45,7 @@ class PrepareChangeLog(AbstractStep):
             Options.quiet,
             Options.email,
             Options.git_commit,
-            Options.prepare_changelogs,
+            Options.update_changelogs,
         ]
 
     def _ensure_bug_url(self, state):
@@ -102,11 +102,10 @@ class PrepareChangeLog(AbstractStep):
         return final_entry + "\n"
 
     def run(self, state):
-        if not self._options.prepare_changelogs:
-            return
-
         if self.cached_lookup(state, "changelogs"):
             self._ensure_bug_url(state)
+            if not self._options.update_changelogs:
+                return
 
         args = self._tool.deprecated_port().prepare_changelog_command()
         if state.get("bug_id"):