Home | History | Annotate | Download | only in commands

Lines Matching refs:tool

54     def execute(self, options, args, tool):
55 os.chdir(tool.scm().checkout_root)
56 print "%s" % tool.scm().commit_message_for_this_commit().message()
74 def execute(self, options, args, tool):
76 for bug_id in tool.bugs.queries.fetch_bug_ids_from_pending_commit_list():
77 bug = self.tool.bugs.fetch_bug(bug_id)
84 self.tool.bugs.obsolete_attachment(patch.id(), message)
99 bug = self.tool.bugs.fetch_bug(bug_id)
101 if assigned_to_email != self.tool.bugs.unassigned_email:
123 self.tool.bugs.reassign_bug(bug_id, committer.bugzilla_email(), reassign_message)
125 def execute(self, options, args, tool):
126 for bug_id in tool.bugs.queries.fetch_bug_ids_from_pending_commit_list():
138 def _prepare_state(self, options, args, tool):
143 def _bug_id(self, args, tool, state):
147 state["diff"] = tool.scm().create_patch()
151 def _prepare_state(self, options, args, tool):
153 state["bug_id"] = self._bug_id(args, tool, state)
194 def _prepare_state(self, options, args, tool):
222 def _prepare_state(self, options, args, tool):
224 state["bug_id"] = self._bug_id(args, tool, state)
253 def _comment_text_for_commit(self, options, commit_message, tool, commit_id):
258 comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
261 def _diff_file_for_commit(self, tool, commit_id):
262 diff = tool.scm().create_patch_from_local_commit(commit_id)
265 def execute(self, options, args, tool):
266 commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
272 commit_message = tool.scm().commit_message_for_local_commit(commit_id)
275 bug_id = options.bug_id or parse_bug_id(commit_message.message()) or parse_bug_id(tool.scm().create_patch_from_local_commit(commit_id))
282 steps.ObsoletePatches(tool, options).run(state)
285 diff_file = self._diff_file_for_commit(tool, commit_id)
287 comment_text = self._comment_text_for_commit(options, commit_message, tool, commit_id)
288 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)
304 def _fetch_commit_log(self, tool, svn_revision):
306 return tool.scm().last_svn_commit_log()
307 return tool.scm().svn_commit_log(svn_revision)
309 def _determine_bug_id_and_svn_revision(self, tool, bug_id, svn_revision):
310 commit_log = self._fetch_commit_log(tool, svn_revision)
331 def execute(self, options, args, tool):
344 (bug_id, svn_revision) = self._determine_bug_id_and_svn_revision(tool, bug_id, svn_revision)
346 log("Bug: <%s> %s" % (tool.bugs.bug_url_for_bug_id(bug_id), tool.bugs.fetch_bug_dictionary(bug_id)["title"]))
350 tool.user.open_url(tool.bugs.bug_url_for_bug_id(bug_id))
353 if not tool.user.confirm("Is this correct?"):
362 tool.bugs.post_comment_to_bug(bug_id, bug_comment)
365 tool.bugs.close_bug_as_fixed(bug_id, bug_comment)
384 def create_bug_from_commit(self, options, args, tool):
385 commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
396 commit_message = tool.scm().commit_message_for_local_commit(commit_id)
400 comment_text += tool.scm().files_changed_summary_for_commit(commit_id)
402 diff = tool.scm().create_patch_from_local_commit(commit_id)
404 bug_id = tool.bugs.create_bug(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
410 PostCommits.execute(self, options, commit_ids[1:], tool)
412 def create_bug_from_patch(self, options, args, tool):
418 commit_message = tool.scm().commit_message_for_this_commit()
422 diff = tool.scm().create_patch()
424 bug_id = tool.bugs.create_bug(bug_title, comment_text, options.component, diff_file, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
441 def execute(self, options, args, tool):
443 if (not tool.scm().supports_local_commits()):
445 self.create_bug_from_commit(options, args, tool)
447 self.create_bug_from_patch(options, args, tool)