Changeset 206918 in webkit
- Timestamp:
- Oct 7, 2016 10:04:27 AM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r206911 r206918 1 2016-10-07 Emanuele Aina <emanuele.aina@collabora.com> 2 3 Replace bug URL placeholders independently of the short desc one 4 https://bugs.webkit.org/show_bug.cgi?id=161684 5 6 Reviewed by Darin Adler. 7 8 Instead of adding the bug URL when replacing the short description 9 placeholder and then ignoring the bug URL placeholder, use the former 10 to set the short description and the latter for the bug URL. 11 This means that developers can fully prepare the changelog with short 12 and long description before submission leaving the bug placeholder in 13 place, and the changelog machinery will make sure to replace the 14 latter with the URL of the newly created bug while submitting. 15 16 Note that this also means that the short description placeholder alone 17 no longer causes the bug URL to be added. 18 19 * Scripts/webkitpy/common/checkout/changelog.py: 20 (ChangeLog.set_short_description_and_bug_url): 21 * Scripts/webkitpy/common/checkout/changelog_unittest.py: 22 (test_set_short_description_and_bug_url): 23 1 24 2016-10-07 Jonathan Bedard <jbedard@apple.com> 2 25 -
trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py
r202362 r206918 431 431 432 432 def set_short_description_and_bug_url(self, short_description, bug_url): 433 message = "%s\n%s%s" % (short_description, self._changelog_indent, bug_url)434 bug_boilerplate = "%sNeed the bug URL (OOPS!).\n" % self._changelog_indent435 433 result = StringIO() 436 434 with self._filesystem.open_text_file_for_reading(self.path) as file: 435 short_description_placeholder = "Need a short description (OOPS!)." 436 bug_url_placeholder = "Need the bug URL (OOPS!)." 437 437 for line in file: 438 line = line.replace("Need a short description (OOPS!).", message) 439 if line != bug_boilerplate: 440 result.write(line) 438 stripped = line.strip() 439 if stripped == short_description_placeholder: 440 line = self._changelog_indent + short_description + "\n" 441 if stripped == bug_url_placeholder: 442 line = self._changelog_indent + bug_url + "\n" 443 result.write(line) 441 444 self._filesystem.write_text_file(self.path, result.getvalue()) 442 445 -
trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
r202362 r206918 643 643 ChangeLog(self._changelog_path, fs).set_short_description_and_bug_url(short_description, bug_url) 644 644 actual_contents = fs.read_text_file(self._changelog_path) 645 expected_message = "%s\n %s" % (short_description, bug_url) 646 expected_contents = changelog_contents.replace("Need a short description (OOPS!).", expected_message) 645 expected_contents = changelog_contents.replace("Need a short description (OOPS!).", short_description) 647 646 self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines()) 648 647
Note: See TracChangeset
for help on using the changeset viewer.