예제 #1
0
    def run(self, state):
        commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
        comment_text = "Reverted r%s for reason:\n\n%s\n\n%s" % (state["revision"], state["reason"], commit_comment)

        bug_id = state["bug_id"]
        if not bug_id:
            _log.info(comment_text)
            _log.info("No bugs were updated.")
            return
        self._tool.bugs.reopen_bug(bug_id, comment_text)
예제 #2
0
    def run(self, state):
        commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
        comment_text = "Reverted r%s for reason:\n\n%s\n\n%s" % (state["revision"], state["reason"], commit_comment)

        bug_id = state["bug_id"]
        if not bug_id:
            _log.info(comment_text)
            _log.info("No bugs were updated.")
            return
        self._tool.bugs.reopen_bug(bug_id, comment_text)
예제 #3
0
 def run(self, state):
     commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
     revision_list = string_utils.join(['r' + str(revision) for revision in state["revision_list"]])
     comment_text = "Reverted %s for reason:\n\n%s\n\n%s" % (revision_list, state["reason"], commit_comment)
     bug_ids = state["bug_id_list"]
     if not bug_ids:
         _log.info(comment_text)
         _log.info("No bugs were updated.")
         return
     for bug_id in bug_ids:
         if bug_id:
             self._tool.bugs.reopen_bug(bug_id, comment_text)
 def run(self, state):
     commit_comment = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
     revision_list = join_with_separators(['r' + str(revision) for revision in state["revision_list"]])
     comment_text = "Reverted %s for reason:\n\n%s\n\n%s" % (revision_list, state["reason"], commit_comment)
     bug_ids = state["bug_id_list"]
     if not bug_ids:
         _log.info(comment_text)
         _log.info("No bugs were updated.")
         return
     for bug_id in bug_ids:
         if bug_id:
             self._tool.bugs.reopen_bug(bug_id, comment_text)
    def run(self, state):
        comment_text = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
        bug_id = state.get("bug_id")
        if not bug_id and state.get("patch"):
            bug_id = state.get("patch").bug_id()

        if bug_id:
            log("Updating bug %s" % bug_id)
            if self._options.close_bug:
                self._tool.bugs.close_bug_as_fixed(bug_id, comment_text)
            else:
                # FIXME: We should a smart way to figure out if the patch is attached
                # to the bug, and if so obsolete it.
                self._tool.bugs.post_comment_to_bug(bug_id, comment_text)
        else:
            log(comment_text)
            log("No bug id provided.")
    def run(self, state):
        comment_text = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
        bug_id = state.get("bug_id")
        if not bug_id and state.get("patch"):
            bug_id = state.get("patch").bug_id()

        if bug_id:
            log("Updating bug %s" % bug_id)
            if self._options.close_bug:
                self._tool.bugs.close_bug_as_fixed(bug_id, comment_text)
            else:
                # FIXME: We should a smart way to figure out if the patch is attached
                # to the bug, and if so obsolete it.
                self._tool.bugs.post_comment_to_bug(bug_id, comment_text)
        else:
            log(comment_text)
            log("No bug id provided.")
예제 #7
0
    def run(self, state):
        comment_text = bug_comment_from_commit_text(self._tool.scm(),
                                                    state["commit_text"])
        bug_id = state.get("bug_id")
        if not bug_id and state.get("patch"):
            bug_id = state.get("patch").bug_id()

        if bug_id:
            if self._options.comment_bug:
                if self._options.close_bug:
                    _log.info("Adding comment and closing bug %s" % bug_id)
                    self._tool.bugs.close_bug_as_fixed(bug_id, comment_text)
                else:
                    _log.info("Commenting without closing bug %s" % bug_id)
                    self._tool.bugs.post_comment_to_bug(bug_id, comment_text)
            else:
                _log.info("Not updating bug %s" % bug_id)
        else:
            _log.info(comment_text)
            _log.info("No bug id provided.")
예제 #8
0
 def run(self, state):
     comment_text = bug_comment_from_commit_text(self._tool.scm(), state["commit_text"])
     self._tool.bugs.clear_attachment_flags(state["patch"].id(), comment_text)
예제 #9
0
 def run(self, state):
     comment_text = bug_comment_from_commit_text(self._tool.scm(),
                                                 state["commit_text"])
     self._tool.bugs.clear_attachment_flags(state["patch"].id(),
                                            comment_text)