commit-log-message has extra blank line at the top of pre-populated message
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Aug 2014 08:09:08 +0000 (08:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Aug 2014 08:09:08 +0000 (08:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135744

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-08
Reviewed by Csaba Osztrogon√°c.

Do not add a blank leading line in single ChangeLog commit messages.

* Scripts/commit-log-editor:
(createCommitMessage):
* Scripts/webkitpy/common/checkout/checkout_unittest.py:
(test_commit_message_for_one_reviewed_changelog):
(test_commit_message_for_one_rollout_changelog):

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

Tools/ChangeLog
Tools/Scripts/commit-log-editor
Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py

index 801dbdc..6308a66 100644 (file)
@@ -1,3 +1,18 @@
+2014-08-08  Joseph Pecoraro  <pecoraro@apple.com>
+
+        commit-log-message has extra blank line at the top of pre-populated message
+        https://bugs.webkit.org/show_bug.cgi?id=135744
+
+        Reviewed by Csaba Osztrogon√°c.
+
+        Do not add a blank leading line in single ChangeLog commit messages.
+
+        * Scripts/commit-log-editor:
+        (createCommitMessage):
+        * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+        (test_commit_message_for_one_reviewed_changelog):
+        (test_commit_message_for_one_rollout_changelog):
+
 2014-08-07  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed gardening.
index f5b4212..570efaa 100755 (executable)
@@ -346,9 +346,6 @@ sub createCommitMessage(@)
             push @result, normalizeLineEndings("\n", $endl);
             push @result, normalizeLineEndings("$label:\n", $endl);
         }
-        if (!$commonPrefix) {
-            push @result, normalizeLineEndings("\n", $endl);
-        }
         push @result, normalizeLineEndings($changeLogContents{$label}, $endl);
     }
 
index 58db9b1..6b2dc74 100644 (file)
@@ -205,8 +205,7 @@ Second part of this complicated change by me, Tor Arne Vestb\u00f8!
         self.assertMultiLineEqual(commit_message.message(), expected_commit_message)
 
     def test_commit_message_for_one_reviewed_changelog(self):
-        expected_commit_message = u"""
-SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
+        expected_commit_message = u"""SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
 <http://webkit.org/b/135006>
 
 Patch by David Kilzer <ddkilzer@apple.com> on 2014-07-17
@@ -280,8 +279,7 @@ Filler change.
         self.assertMultiLineEqual(commit_message.message(), expected_commit_message)
 
     def test_commit_message_for_one_rollout_changelog(self):
-        expected_commit_message = u"""
-Rolling out r170340 and r170339.
+        expected_commit_message = u"""Rolling out r170340 and r170339.
 
 Changeset r170339 broke the Apple Windows Debug and Release builds.