Пример #1
0
    def _prepare_state(self, options, args, tool):
        state = AbstractRolloutPrepCommand._prepare_state(self, options, args, tool)
        # Currently, state["bug_id"] points to the bug that caused the
        # regression.  We want to create a new bug that blocks the old bug
        # so we move state["bug_id"] to state["bug_blocked"] and delete the
        # old state["bug_id"] so that steps.CreateBug will actually create
        # the new bug that we want (and subsequently store its bug id into
        # state["bug_id"])
        state["bug_blocked"] = state["bug_id"]
        del state["bug_id"]
        state["bug_title"] = "REGRESSION(r%s): %s" % (state["revision"], state["reason"])
        state["bug_description"] = "%s broke the build:\n%s" % (view_source_url(state["revision"]), state["reason"])
        # FIXME: If we had more context here, we could link to other open bugs
        #        that mention the test that regressed.
        if options.parent_command == "sheriff-bot":
            state["bug_description"] += """

This is an automatic bug report generated by the sheriff-bot. If this bug
report was created because of a flaky test, please file a bug for the flaky
test (if we don't already have one on file) and dup this bug against that bug
so that we can track how often these flaky tests case pain.

"Only you can prevent forest fires." -- Smokey the Bear
"""
        return state
Пример #2
0
    def _prepare_state(self, options, args, tool):
        state = AbstractRolloutPrepCommand._prepare_state(
            self, options, args, tool)
        # Currently, state["bug_id"] points to the bug that caused the
        # regression.  We want to create a new bug that blocks the old bug
        # so we move state["bug_id"] to state["bug_blocked"] and delete the
        # old state["bug_id"] so that steps.CreateBug will actually create
        # the new bug that we want (and subsequently store its bug id into
        # state["bug_id"])
        state["bug_blocked"] = state["bug_id"]
        del state["bug_id"]
        state["bug_title"] = "REGRESSION(r%s): %s" % (state["revision"],
                                                      state["reason"])
        state["bug_description"] = "%s broke the build:\n%s" % (
            view_source_url(state["revision"]), state["reason"])
        # FIXME: If we had more context here, we could link to other open bugs
        #        that mention the test that regressed.
        if options.parent_command == "sheriff-bot":
            state["bug_description"] += """

This is an automatic bug report generated by the sheriff-bot. If this bug
report was created because of a flaky test, please file a bug for the flaky
test (if we don't already have one on file) and dup this bug against that bug
so that we can track how often these flaky tests case pain.

"Only you can prevent forest fires." -- Smokey the Bear
"""
        return state
Пример #3
0
 def _print_blame_information_for_commit(self, commit_info):
     print "r%s:" % commit_info.revision()
     print "  %s" % view_source_url(commit_info.revision())
     print "  Bug: %s (%s)" % (commit_info.bug_id(), self.tool.bugs.bug_url_for_bug_id(commit_info.bug_id()))
     author_line = "\"%s\" <%s>" % (commit_info.author_name(), commit_info.author_email())
     print "  Author: %s" % (commit_info.author() or author_line)
     print "  Reviewer: %s" % (commit_info.reviewer() or commit_info.reviewer_text())
     print "  Committer: %s" % commit_info.committer()
Пример #4
0
 def _print_blame_information_for_commit(self, commit_info):
     print "r%s:" % commit_info.revision()
     print "  %s" % view_source_url(commit_info.revision())
     print "  Bug: %s (%s)" % (commit_info.bug_id(),
                               self.tool.bugs.bug_url_for_bug_id(
                                   commit_info.bug_id()))
     author_line = "\"%s\" <%s>" % (commit_info.author_name(),
                                    commit_info.author_email())
     print "  Author: %s" % (commit_info.author() or author_line)
     print "  Reviewer: %s" % (commit_info.reviewer()
                               or commit_info.reviewer_text())
     print "  Committer: %s" % commit_info.committer()
Пример #5
0
def bug_comment_from_svn_revision(svn_revision):
    return "Committed r%s: <%s>" % (svn_revision,
                                    view_source_url(svn_revision))