Changeset 139224 in webkit
- Timestamp:
- Jan 9, 2013 12:33:51 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r139207 r139224 1 2013-01-09 Csaba Osztrogonác <ossy@webkit.org> 2 3 webkitpy cleanup: Merge additional_comment_text into comment_text 4 https://bugs.webkit.org/show_bug.cgi?id=106421 5 6 Reviewed by Adam Barth. 7 8 * Scripts/webkitpy/common/config/committervalidator.py: 9 (CommitterValidator.reject_patch_from_commit_queue): 10 (CommitterValidator.reject_patch_from_review_queue): 11 * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: 12 (Bugzilla.set_flag_on_attachment): 13 * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: 14 (MockBugzilla.set_flag_on_attachment): 15 * Scripts/webkitpy/tool/bot/feeders_unittest.py: 16 * Scripts/webkitpy/tool/commands/earlywarningsystem.py: 17 (AbstractEarlyWarningSystem._post_reject_message_on_bug): 18 * Scripts/webkitpy/tool/commands/queues_unittest.py: 19 1 20 2013-01-09 Mario Sanchez Prada <mario.prada@samsung.com> 2 21 -
trunk/Tools/Scripts/webkitpy/common/config/committervalidator.py
r100697 r139224 79 79 additional_comment_text=None): 80 80 comment_text = "Rejecting attachment %s from commit-queue." % attachment_id 81 if additional_comment_text: 82 comment_text += "\n\n%s" % additional_comment_text 81 83 self.host.bugs.set_flag_on_attachment(attachment_id, 82 84 "commit-queue", 83 85 "-", 84 comment_text, 85 additional_comment_text) 86 comment_text) 86 87 87 88 def reject_patch_from_review_queue(self, … … 89 90 additional_comment_text=None): 90 91 comment_text = "Rejecting attachment %s from review queue." % attachment_id 92 if additional_comment_text: 93 comment_text += "\n\n%s" % additional_comment_text 91 94 self.host.bugs.set_flag_on_attachment(attachment_id, 92 95 'review', 93 96 '-', 94 comment_text, 95 additional_comment_text) 97 comment_text) -
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
r135912 r139224 730 730 flag_name, 731 731 flag_value, 732 comment_text=None, 733 additional_comment_text=None): 732 comment_text=None): 734 733 # FIXME: We need a way to test this function on a live bugzilla 735 734 # instance. 736 735 737 736 self.authenticate() 738 739 # FIXME: additional_comment_text seems useless and should be merged into comment-text.740 if additional_comment_text:741 comment_text += "\n\n%s" % additional_comment_text742 737 _log.info(comment_text) 743 744 738 self.browser.open(self.attachment_url_for_id(attachment_id, 'edit')) 745 739 self.browser.select_form(nr=1) -
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
r135912 r139224 386 386 flag_name, 387 387 flag_value, 388 comment_text=None, 389 additional_comment_text=None): 390 _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % ( 391 flag_name, flag_value, attachment_id, comment_text, additional_comment_text)) 388 comment_text=None): 389 _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s'" % ( 390 flag_name, flag_value, attachment_id, comment_text)) 392 391 393 392 def post_comment_to_bug(self, bug_id, comment_text, cc=None): -
trunk/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
r135912 r139224 41 41 expected_logs = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com) 42 42 Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com) 43 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue. ' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.43 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.\n\nnon-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. 44 44 45 45 - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. -
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
r138826 r139224 67 67 results_link = tool.status_server.results_url_for_status(status_id) 68 68 message = "Attachment %s did not pass %s (%s):\nOutput: %s" % (patch.id(), self.name, self.port_name, results_link) 69 if extra_message_text: 70 message += "\n\n%s" % extra_message_text 69 71 # FIXME: We might want to add some text about rejecting from the commit-queue in 70 72 # the case where patch.commit_queue() isn't already set to '-'. 71 73 if self.watchers: 72 74 tool.bugs.add_cc_to_bug(patch.bug_id(), self.watchers) 73 tool.bugs.set_flag_on_attachment(patch.id(), "commit-queue", "-", message , extra_message_text)75 tool.bugs.set_flag_on_attachment(patch.id(), "commit-queue", "-", message) 74 76 75 77 def review_patch(self, patch): -
trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
r138826 r139224 135 135 "process_work_item": """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com) 136 136 Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com) 137 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue. ' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.137 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.\n\nnon-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. 138 138 139 139 - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. … … 257 257 """, 258 258 "handle_script_error": "ScriptError error message\n\nMOCK output\n", 259 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'Mock error message'\n",259 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n", 260 260 } 261 261 self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs) … … 267 267 MOCK: update_status: commit-queue Updated working directory 268 268 MOCK: update_status: commit-queue Patch does not apply 269 MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'MOCK script error269 MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMOCK script error 270 270 Full output: http://dummy_url' 271 271 MOCK: update_status: commit-queue Fail … … 273 273 """, 274 274 "handle_script_error": "ScriptError error message\n\nMOCK output\n", 275 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'Mock error message'\n",275 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n", 276 276 } 277 277 queue = CommitQueue() … … 293 293 MOCK: update_status: commit-queue Updated working directory 294 294 MOCK: update_status: commit-queue Patch does not apply 295 MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'New failing tests:295 MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nNew failing tests: 296 296 mock_test_name.html 297 297 another_test_name.html … … 301 301 """, 302 302 "handle_script_error": "ScriptError error message\n\nMOCK output\n", 303 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'Mock error message'\n",303 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n", 304 304 } 305 305 queue = CommitQueue() … … 341 341 """ % {"port": CommitQueue.port_name}, 342 342 "handle_script_error": "ScriptError error message\n\nMOCK output\n", 343 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue. ' and additional comment 'Mock error message'\n",343 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n", 344 344 } 345 345 self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs) … … 366 366 """ % {"port": CommitQueue.port_name}, 367 367 "handle_script_error": "ScriptError error message\n\nMOCK output\n", 368 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue. ' and additional comment 'Mock error message'\n",368 "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.\n\nMock error message'\n", 369 369 } 370 370 self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_logs=expected_logs)
Note: See TracChangeset
for help on using the changeset viewer.