Changeset 50107 in webkit
- Timestamp:
- Oct 26, 2009 3:41:10 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r50105 r50107 1 2009-10-24 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 bugzilla-tool post-diff should know how to mark commit-queue=? 6 https://bugs.webkit.org/show_bug.cgi?id=29202 7 8 * Scripts/bugzilla-tool: 9 - Add --commit-queue option to post-diff, post-commits and create-bug. 10 * Scripts/modules/bugzilla.py: 11 - Added support for --commit-queue to add_patch_to_bug and create_bug_with_patch. 12 - Added _fill_attachment_form to share code between add_patch_to_bug and create_bug_with_patch. 13 1 14 2009-10-23 Eric Seidel <eric@webkit.org> 2 15 -
trunk/WebKitTools/Scripts/bugzilla-tool
r50105 r50107 426 426 make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one."), 427 427 make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."), 428 make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."), 428 429 ] 429 430 … … 449 450 450 451 description = options.description or "Patch v1" 451 tool.bugs.add_patch_to_bug(bug_id, diff_file, description, mark_for_review=options.review )452 tool.bugs.add_patch_to_bug(bug_id, diff_file, description, mark_for_review=options.review, mark_for_commit_queue=options.request_commit) 452 453 453 454 … … 499 500 description = options.description or commit_message.description(lstrip=True, strip_url=True) 500 501 comment_text = self._comment_text_for_commit(options, commit_message, tool, commit_id) 501 tool.bugs.add_patch_to_bug(bug_id, diff_file, description, comment_text, mark_for_review=options.review )502 tool.bugs.add_patch_to_bug(bug_id, diff_file, description, comment_text, mark_for_review=options.review, mark_for_commit_queue=options.request_commit) 502 503 503 504 … … 566 567 make_option("--no-prompt", action="store_false", dest="prompt", default=True, help="Do not prompt for bug title and comment; use commit log instead."), 567 568 make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."), 569 make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."), 568 570 ] 569 571 Command.__init__(self, 'Create a bug from local changes or local commits.', '[COMMITISH]', options=options) … … 589 591 diff = tool.scm().create_patch_from_local_commit(commit_id) 590 592 diff_file = StringIO.StringIO(diff) # create_bug_with_patch expects a file-like object 591 bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch v1", cc=options.cc, mark_for_review=options.review )593 bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch v1", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit) 592 594 593 595 if bug_id and len(commit_ids) > 1: … … 609 611 diff = tool.scm().create_patch() 610 612 diff_file = StringIO.StringIO(diff) # create_bug_with_patch expects a file-like object 611 bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch v1", cc=options.cc, mark_for_review=options.review )613 bug_id = tool.bugs.create_bug_with_patch(bug_title, comment_text, options.component, diff_file, "Patch v1", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit) 612 614 613 615 def prompt_for_bug_title_and_comment(self): -
trunk/WebKitTools/Scripts/modules/bugzilla.py
r48794 r50107 295 295 self.authenticated = True 296 296 297 def add_patch_to_bug(self, bug_id, patch_file_object, description, comment_text=None, mark_for_review=False): 297 def _fill_attachment_form(self, description, patch_file_object, comment_text=None, mark_for_review=False, mark_for_commit_queue=False, bug_id=None): 298 self.browser['description'] = description 299 self.browser['ispatch'] = ("1",) 300 self.browser['flag_type-1'] = ('?',) if mark_for_review else ('X',) 301 self.browser['flag_type-3'] = ('?',) if mark_for_commit_queue else ('X',) 302 if bug_id: 303 patch_name = "bug-%s-%s.patch" % (bug_id, timestamp()) 304 else: 305 patch_name ="%s.patch" % timestamp() 306 self.browser.add_file(patch_file_object, "text/plain", patch_name, 'data') 307 308 def add_patch_to_bug(self, bug_id, patch_file_object, description, comment_text=None, mark_for_review=False, mark_for_commit_queue=False): 298 309 self.authenticate() 299 310 … … 305 316 self.browser.open("%sattachment.cgi?action=enter&bugid=%s" % (self.bug_server_url, bug_id)) 306 317 self.browser.select_form(name="entryform") 307 self.browser['description'] = description 308 self.browser['ispatch'] = ("1",) 318 self._fill_attachment_form(description, patch_file_object, mark_for_review=mark_for_review, mark_for_commit_queue=mark_for_commit_queue, bug_id=bug_id) 309 319 if comment_text: 310 320 log(comment_text) 311 321 self.browser['comment'] = comment_text 312 self.browser['flag_type-1'] = ('?',) if mark_for_review else ('X',)313 self.browser.add_file(patch_file_object, "text/plain", "bug-%s-%s.patch" % (bug_id, timestamp()))314 322 self.browser.submit() 315 323 … … 335 343 raise BugzillaError("Bug not created: %s" % error_message) 336 344 337 def create_bug_with_patch(self, bug_title, bug_description, component, patch_file_object, patch_description, cc, mark_for_review=False ):345 def create_bug_with_patch(self, bug_title, bug_description, component, patch_file_object, patch_description, cc, mark_for_review=False, mark_for_commit_queue=False): 338 346 self.authenticate() 339 347 … … 356 364 log(bug_description) 357 365 self.browser['comment'] = bug_description 358 self.browser['description'] = patch_description 359 self.browser['ispatch'] = ("1",) 360 self.browser['flag_type-1'] = ('?',) if mark_for_review else ('X',) 361 self.browser.add_file(patch_file_object, "text/plain", "%s.patch" % timestamp(), 'data') 366 367 self._fill_attachment_form(patch_description, patch_file_object, mark_for_review=mark_for_review, mark_for_commit_queue=mark_for_commit_queue) 362 368 response = self.browser.submit() 363 369
Note: See TracChangeset
for help on using the changeset viewer.