Changeset 84575 in webkit
- Timestamp:
- Apr 21, 2011 5:34:13 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r84568 r84575 1 2011-04-21 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 webkit-patch upload should assign the bug to you 6 https://bugs.webkit.org/show_bug.cgi?id=33699 7 8 This patch only re-assigns the bug if it is currently unassigned. We 9 can be more aggressive in the future if people want us to be more 10 agressive. 11 12 * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: 13 * Scripts/webkitpy/tool/commands/upload_unittest.py: 14 * Scripts/webkitpy/tool/mocktool.py: 15 * Scripts/webkitpy/tool/steps/postdiff.py: 16 1 17 2011-04-21 Ojan Vafai <ojan@chromium.org> 2 18 -
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
r84455 r84575 737 737 self.browser.submit() 738 738 739 def reassign_bug(self, bug_id, assignee, comment_text=None): 740 self.authenticate() 739 def _has_control(self, form, id): 740 return id in [control.id for control in form.controls] 741 742 def reassign_bug(self, bug_id, assignee=None, comment_text=None): 743 self.authenticate() 744 745 if not assignee: 746 assignee = self.username 741 747 742 748 log("Assigning bug %s to %s" % (bug_id, assignee)) … … 747 753 self.browser.open(self.bug_url_for_bug_id(bug_id)) 748 754 self.browser.select_form(name="changeform") 755 756 if not self._has_control(self.browser, "assigned_to"): 757 log("""Failed to assign bug to you (can't find assigned_to) control. 758 Do you have EditBugs privilages at bugs.webkit.org? 759 https://bugs.webkit.org/userprefs.cgi?tab=permissions 760 761 If not, you should email webkit-committers@webkit.org or ask in #webkit for 762 someone to add EditBugs to your bugs.webkit.org account.""") 763 return 764 749 765 if comment_text: 750 766 log(comment_text) -
trunk/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
r84455 r84575 43 43 def test_assign_to_committer(self): 44 44 tool = MockTool() 45 expected_stderr = "Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)\nBug 77 is already assigned to foo@foo.com (None).\nBug 76 has no non-obsolete patches, ignoring.\n" 45 expected_stderr = """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 46 MOCK reassign_bug: bug_id=42, assignee=eric@webkit.org 47 -- Begin comment -- 48 Attachment 128 was posted by a committer and has review+, assigning to Eric Seidel for commit. 49 -- End comment -- 50 Bug 77 is already assigned to foo@foo.com (None). 51 Bug 76 has no non-obsolete patches, ignoring. 52 """ 46 53 self.assert_execute_outputs(AssignToCommitter(), [], expected_stderr=expected_stderr, tool=tool) 47 tool.bugs.reassign_bug.assert_called_with(42, "eric@webkit.org", "Attachment 128 was posted by a committer and has review+, assigning to Eric Seidel for commit.")48 54 49 55 def test_obsolete_attachments(self): … … 63 69 Was that diff correct? 64 70 Obsoleting 2 old patches on bug 42 71 MOCK reassign_bug: bug_id=42, assignee=None 65 72 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False 66 73 MOCK: user.open_url: http://example.com/42 … … 110 117 Was that diff correct? 111 118 Obsoleting 2 old patches on bug 42 119 MOCK reassign_bug: bug_id=42, assignee=None 112 120 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False 113 121 MOCK: user.open_url: http://example.com/42 -
trunk/Tools/Scripts/webkitpy/tool/mocktool.py
r84549 r84575 330 330 return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param) 331 331 332 def reassign_bug(self, bug_id, assignee=None, comment_text=None): 333 log("MOCK reassign_bug: bug_id=%s, assignee=%s" % (bug_id, assignee)) 334 if comment_text: 335 log("-- Begin comment --") 336 log(comment_text) 337 log("-- End comment --") 338 332 339 def set_flag_on_attachment(self, 333 340 attachment_id, -
trunk/Tools/Scripts/webkitpy/tool/steps/postdiff.py
r84455 r84575 46 46 description = self._options.description or "Patch" 47 47 comment_text = self._options.comment 48 self._tool.bugs.add_patch_to_bug(state["bug_id"], diff, description, comment_text=comment_text, mark_for_review=self._options.review, mark_for_commit_queue=self._options.request_commit) 48 bug_id = state["bug_id"] 49 50 # FIXME: We should find some way of caching the Bug object instead of 51 # going back to the network here. 52 if self._tool.bugs.fetch_bug(bug_id).is_unassigned(): 53 self._tool.bugs.reassign_bug(bug_id) 54 55 self._tool.bugs.add_patch_to_bug(bug_id, diff, description, comment_text=comment_text, mark_for_review=self._options.review, mark_for_commit_queue=self._options.request_commit) 49 56 if self._options.open_bug: 50 self._tool.user.open_url(self._tool.bugs.bug_url_for_bug_id( state["bug_id"]))57 self._tool.user.open_url(self._tool.bugs.bug_url_for_bug_id(bug_id))
Note: See TracChangeset
for help on using the changeset viewer.