Changeset 141829 in webkit
- Timestamp:
- Feb 4, 2013 4:30:22 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r141823 r141829 1 2013-02-04 Timothy Loh <timloh@chromium.com> 2 3 Don't update author info in PrepareChangeLog and allow users to skip the PrepareChangeLog step entirely. 4 https://bugs.webkit.org/show_bug.cgi?id=108788 5 6 Reviewed by Ryosuke Niwa. 7 8 As per discussion in Bug 74358, it's probably preferable to remove the 9 behaviour of updating the author details in a ChangeLog entry. We also 10 want to be able to skip preparing change logs (e.g. rebaselining many 11 tests), so a --no-prepare-changelogs option is added to webkit-patch. 12 13 * Scripts/webkitpy/common/checkout/changelog.py: 14 (ChangeLogEntry._parse_entry): 15 (ChangeLogEntry.date): Added 16 * Scripts/webkitpy/common/checkout/changelog_unittest.py: 17 (test_parse_log_entries_from_changelog): 18 * Scripts/webkitpy/tool/commands/commandtest.py: 19 (CommandsTest.assert_execute_outputs): 20 * Scripts/webkitpy/tool/steps/options.py: 21 (Options): Added --no-prepare-changelogs 22 * Scripts/webkitpy/tool/steps/preparechangelog.py: 23 (PrepareChangeLog.options): 24 (PrepareChangeLog._merge_entries): date_line() gets the entire line, including 25 the author's name and email, but we only want to replace the date. 26 (PrepareChangeLog.run): 27 * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py: 28 (PrepareChangeLogTest.test_resolve_existing_entry): Added tests for changed 29 authors. Removed unneeded variable. 30 1 31 2013-02-04 Jochen Eisinger <jochen@chromium.org> 2 32 -
trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py
r141723 r141829 196 196 197 197 self._date_line = match.group() 198 self._date = match.group("date") 198 199 self._bug_description = self._parse_bug_description(self._contents) 199 200 … … 211 212 def date_line(self): 212 213 return self._date_line 214 215 def date(self): 216 return self._date 213 217 214 218 def author_text(self): -
trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
r141723 r141829 238 238 self.assertEqual(len(parsed_entries), 9) 239 239 self.assertEqual(parsed_entries[0].date_line(), u"2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>") 240 self.assertEqual(parsed_entries[0].date(), "2009-08-17") 240 241 self.assertEqual(parsed_entries[0].reviewer_text(), "David Levin") 241 242 self.assertEqual(parsed_entries[0].is_touched_files_text_clean(), False) 243 self.assertEqual(parsed_entries[1].date_line(), "2009-08-16 David Kilzer <ddkilzer@apple.com>") 244 self.assertEqual(parsed_entries[1].date(), "2009-08-16") 242 245 self.assertEqual(parsed_entries[1].author_email(), "ddkilzer@apple.com") 243 246 self.assertEqual(parsed_entries[1].touched_files_text(), " * Scripts/bugzilla-tool:\n * Scripts/modules/scm.py:\n") -
trunk/Tools/Scripts/webkitpy/tool/commands/commandtest.py
r135744 r141829 43 43 options.open_bug = True 44 44 options.port = 'MOCK port' 45 options.prepare_changelogs = True 45 46 options.quiet = True 46 47 options.reviewer = 'MOCK reviewer' -
trunk/Tools/Scripts/webkitpy/tool/steps/options.py
r136555 r141829 50 50 open_bug = make_option("--open-bug", action="store_true", dest="open_bug", default=False, help="Opens the associated bug in a browser.") 51 51 parent_command = make_option("--parent-command", action="store", dest="parent_command", default=None, help="(Internal) The command that spawned this instance.") 52 prepare_changelogs = make_option("--no-prepare-changelogs", action="store_false", dest="prepare_changelogs", default=True, help="Don't prepare (create and/or update) ChangeLogs.") 52 53 quiet = make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output.") 53 54 request_commit = make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review.") -
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
r141022 r141829 46 46 Options.email, 47 47 Options.git_commit, 48 Options.prepare_changelogs, 48 49 ] 49 50 … … 84 85 final_entry = old_entry.contents() 85 86 86 new_date_line = new_entry.date_line() 87 old_date_line = old_entry.date_line() 88 if new_date_line != old_date_line: 89 final_entry = final_entry.replace(old_date_line, new_date_line) 87 final_entry = final_entry.replace(old_entry.date(), new_entry.date(), 1) 90 88 91 89 new_bug_desc = new_entry.bug_description() … … 105 103 106 104 def run(self, state): 105 if not self._options.prepare_changelogs: 106 return 107 107 108 if self.cached_lookup(state, "changelogs"): 108 109 self._ensure_bug_url(state) -
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
r141022 r141829 41 41 step = PrepareChangeLog(MockTool(), MockOptions()) 42 42 43 roll_over = "== Rolled over to ChangeLog-2012-10-02 =="44 45 43 headers = ["2013-01-18 Timothy Loh <timloh@chromium.com>\n\n", 46 44 "2013-01-20 Timothy Loh <timloh@chromium.com>\n\n", 47 45 u"2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n", 48 46 u"2009-08-18 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n", 47 "2013-01-18 Eric Seidel <eric@webkit.org>\n\n", 48 "2013-01-20 Eric Seidel <eric@webkit.org>\n\n", 49 49 ] 50 50 … … 94 94 ((1, 1, 0, 1), (0, 0, 0, 2), (1, 1, 0, 3)), 95 95 ((3, 0, 0, 0), (2, 0, 1, 0), (3, 0, 1, 0)), 96 ((4, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)), 97 ((5, 0, 0, 0), (0, 0, 0, 0), (1, 0, 0, 0)), 98 ((0, 0, 0, 0), (4, 0, 0, 0), (4, 0, 0, 0)), 99 ((1, 0, 0, 0), (4, 0, 0, 0), (5, 0, 0, 0)), 96 100 ] 97 101 … … 99 103 new_entry = make_entry(new) 100 104 old_entry = make_entry(old) 101 start_file = new_entry + old_entry + roll_over105 start_file = new_entry + old_entry + self._rolled_over_footer 102 106 103 107 final_entry = make_entry(final) 104 end_file = final_entry + roll_over108 end_file = final_entry + self._rolled_over_footer 105 109 106 110 path = "ChangeLog"
Note: See TracChangeset
for help on using the changeset viewer.