Changeset 57572 in webkit
- Timestamp:
- Apr 14, 2010 2:00:58 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r57561 r57572 1 2010-04-14 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Teach webkit-patch how to handle revisions missing ChangeLogs 6 https://bugs.webkit.org/show_bug.cgi?id=37519 7 8 Make commit_info_for_revision return None when revision 9 is missing a ChangeLog. Previously we would throw an array index 10 exception. 11 Teach callers how to handle None. 12 13 * Scripts/webkitpy/common/checkout/api.py: 14 * Scripts/webkitpy/common/checkout/api_unittest.py: 15 * Scripts/webkitpy/tool/commands/download.py: 16 * Scripts/webkitpy/tool/commands/queries.py: 17 * Scripts/webkitpy/tool/commands/sheriffbot.py: 18 1 19 2010-04-13 Eric Seidel <eric@webkit.org> 2 20 -
trunk/WebKitTools/Scripts/webkitpy/common/checkout/api.py
r56993 r57572 62 62 # Assume for now that the first entry has everything we need: 63 63 # FIXME: This will throw an exception if there were no ChangeLogs. 64 if not len(changelog_entries): 65 return None 64 66 changelog_entry = changelog_entries[0] 65 67 changelog_data = { -
trunk/WebKitTools/Scripts/webkitpy/common/checkout/api_unittest.py
r56891 r57572 145 145 self.assertEqual(commitinfo.committer(), None) 146 146 147 checkout.changelog_entries_for_revision = lambda revision: [] 148 self.assertEqual(checkout.commit_info_for_revision(1), None) 149 147 150 def test_bug_id_for_revision(self): 148 151 scm = Mock() -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/download.py
r56964 r57572 255 255 def _commit_info(self, revision): 256 256 commit_info = self.tool.checkout().commit_info_for_revision(revision) 257 if commit_info .bug_id():257 if commit_info and commit_info.bug_id(): 258 258 # Note: Don't print a bug URL here because it will confuse the 259 259 # SheriffBot because the SheriffBot just greps the output -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queries.py
r57195 r57572 143 143 for revision in suspect_revisions: 144 144 commit_info = self.tool.checkout().commit_info_for_revision(revision) 145 print commit_info.blame_string(self.tool.bugs) 145 if commit_info: 146 print commit_info.blame_string(self.tool.bugs) 147 else: 148 print "FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision 146 149 147 150 def execute(self, options, args, tool): … … 202 205 for revision in suspect_revisions: 203 206 commit_info = self.tool.checkout().commit_info_for_revision(revision) 204 print commit_info.blame_string(self.tool.bugs) 207 if commit_info: 208 print commit_info.blame_string(self.tool.bugs) 209 else: 210 print "FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision 205 211 206 212 def _explain_failures_for_builder(self, builder, start_revision, search_limit=1000): -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/sheriffbot.py
r57430 r57572 81 81 try: 82 82 commit_info = self.tool.checkout().commit_info_for_revision(svn_revision) 83 if not commit_info: 84 print "FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision 85 continue 83 86 self._sheriff.post_irc_warning(commit_info, builders) 84 87 self._sheriff.post_blame_comment_on_bug(commit_info,
Note: See TracChangeset
for help on using the changeset viewer.