WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-161684-20160907112620.patch (text/plain), 4.13 KB, created by
Emanuele Aina
on 2016-09-07 02:28:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Emanuele Aina
Created:
2016-09-07 02:28:44 PDT
Size:
4.13 KB
patch
obsolete
>Subversion Revision: 205539 >diff --git c/Tools/ChangeLog w/Tools/ChangeLog >index 251c85e78e58843ca4ce00dd4c0b3c5e397cb510..337a29b082a9898136e7fa5ad0f08a1c8da700c7 100644 >--- c/Tools/ChangeLog >+++ w/Tools/ChangeLog >@@ -1,3 +1,26 @@ >+2016-09-07 Emanuele Aina <emanuele.aina@collabora.com> >+ >+ Replace bug URL placeholders independently of the short desc one >+ https://bugs.webkit.org/show_bug.cgi?id=161684 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Instead of adding the bug URL when replacing the short description >+ placeholder and then ignoring the bug URL placeholder, use the former >+ to set the short description and the latter for the bug URL. >+ This means that developers can fully prepare the changelog with short >+ and long description before submission leaving the bug placeholder in >+ place, and the changelog machinery will make sure to replace the >+ latter with the URL of the newly created bug while submitting. >+ >+ Note that this also means that the short description placeholder alone >+ no longer causes the bug URL to be added. >+ >+ * Scripts/webkitpy/common/checkout/changelog.py: >+ (ChangeLog.set_short_description_and_bug_url): >+ * Scripts/webkitpy/common/checkout/changelog_unittest.py: >+ (test_set_short_description_and_bug_url): >+ > 2016-09-07 Youenn Fablet <youenn@apple.com> > > Using tests-options.json to compute whether tests are slow >diff --git c/Tools/Scripts/webkitpy/common/checkout/changelog.py w/Tools/Scripts/webkitpy/common/checkout/changelog.py >index 2de79f5d850f1bbcc273869bd27ee81c05fca596..cda30c47a7d2c4bce1625dc5bf300a3f45314a43 100644 >--- c/Tools/Scripts/webkitpy/common/checkout/changelog.py >+++ w/Tools/Scripts/webkitpy/common/checkout/changelog.py >@@ -430,14 +430,17 @@ def set_reviewer(self, reviewer): > self._filesystem.write_text_file(self.path, newdata) > > def set_short_description_and_bug_url(self, short_description, bug_url): >- message = "%s\n%s%s" % (short_description, self._changelog_indent, bug_url) >- bug_boilerplate = "%sNeed the bug URL (OOPS!).\n" % self._changelog_indent > result = StringIO() > with self._filesystem.open_text_file_for_reading(self.path) as file: >+ short_description_placeholder = "Need a short description (OOPS!)." >+ bug_url_placeholder = "Need the bug URL (OOPS!)." > for line in file: >- line = line.replace("Need a short description (OOPS!).", message) >- if line != bug_boilerplate: >- result.write(line) >+ stripped = line.strip() >+ if stripped == short_description_placeholder: >+ line = self._changelog_indent + short_description + "\n" >+ if stripped == bug_url_placeholder: >+ line = self._changelog_indent + bug_url + "\n" >+ result.write(line) > self._filesystem.write_text_file(self.path, result.getvalue()) > > def delete_entries(self, num_entries): >diff --git c/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py w/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py >index 6f872b6f344ee18b5a9a3f4d96362a12c9b31975..812572da443bc6f053a495a64617144e6372b06e 100644 >--- c/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py >+++ w/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py >@@ -642,8 +642,7 @@ def test_set_short_description_and_bug_url(self): > bug_url = "http://example.com/b/2344" > ChangeLog(self._changelog_path, fs).set_short_description_and_bug_url(short_description, bug_url) > actual_contents = fs.read_text_file(self._changelog_path) >- expected_message = "%s\n %s" % (short_description, bug_url) >- expected_contents = changelog_contents.replace("Need a short description (OOPS!).", expected_message) >+ expected_contents = changelog_contents.replace("Need a short description (OOPS!).", short_description) > self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines()) > > changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 161684
:
288126
|
288682
|
288683