Changeset 139224 in webkit


Ignore:
Timestamp:
Jan 9, 2013 12:33:51 PM (11 years ago)
Author:
Csaba Osztrogonác
Message:

webkitpy cleanup: Merge additional_comment_text into comment_text
https://bugs.webkit.org/show_bug.cgi?id=106421

Reviewed by Adam Barth.

  • Scripts/webkitpy/common/config/committervalidator.py:

(CommitterValidator.reject_patch_from_commit_queue):
(CommitterValidator.reject_patch_from_review_queue):

  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py:

(Bugzilla.set_flag_on_attachment):

  • Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:

(MockBugzilla.set_flag_on_attachment):

  • Scripts/webkitpy/tool/bot/feeders_unittest.py:
  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:

(AbstractEarlyWarningSystem._post_reject_message_on_bug):

  • Scripts/webkitpy/tool/commands/queues_unittest.py:
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r139207 r139224  
     12013-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
    1202013-01-09  Mario Sanchez Prada  <mario.prada@samsung.com>
    221
  • trunk/Tools/Scripts/webkitpy/common/config/committervalidator.py

    r100697 r139224  
    7979                                       additional_comment_text=None):
    8080        comment_text = "Rejecting attachment %s from commit-queue." % attachment_id
     81        if additional_comment_text:
     82            comment_text += "\n\n%s" % additional_comment_text
    8183        self.host.bugs.set_flag_on_attachment(attachment_id,
    8284                                              "commit-queue",
    8385                                              "-",
    84                                               comment_text,
    85                                               additional_comment_text)
     86                                              comment_text)
    8687
    8788    def reject_patch_from_review_queue(self,
     
    8990                                       additional_comment_text=None):
    9091        comment_text = "Rejecting attachment %s from review queue." % attachment_id
     92        if additional_comment_text:
     93            comment_text += "\n\n%s" % additional_comment_text
    9194        self.host.bugs.set_flag_on_attachment(attachment_id,
    9295                                              'review',
    9396                                              '-',
    94                                               comment_text,
    95                                               additional_comment_text)
     97                                              comment_text)
  • trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py

    r135912 r139224  
    730730                               flag_name,
    731731                               flag_value,
    732                                comment_text=None,
    733                                additional_comment_text=None):
     732                               comment_text=None):
    734733        # FIXME: We need a way to test this function on a live bugzilla
    735734        # instance.
    736735
    737736        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_text
    742737        _log.info(comment_text)
    743 
    744738        self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
    745739        self.browser.select_form(nr=1)
  • trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py

    r135912 r139224  
    386386                               flag_name,
    387387                               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))
    392391
    393392    def post_comment_to_bug(self, bug_id, comment_text, cc=None):
  • trunk/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py

    r135912 r139224  
    4141        expected_logs = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
    4242Warning, 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.
     43MOCK 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.
    4444
    4545- 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  
    6767        results_link = tool.status_server.results_url_for_status(status_id)
    6868        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
    6971        # FIXME: We might want to add some text about rejecting from the commit-queue in
    7072        # the case where patch.commit_queue() isn't already set to '-'.
    7173        if self.watchers:
    7274            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)
    7476
    7577    def review_patch(self, patch):
  • trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r138826 r139224  
    135135            "process_work_item": """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
    136136Warning, 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.
     137MOCK 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.
    138138
    139139- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
     
    257257""",
    258258            "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",
    260260        }
    261261        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
     
    267267MOCK: update_status: commit-queue Updated working directory
    268268MOCK: 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 error
     269MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMOCK script error
    270270Full output: http://dummy_url'
    271271MOCK: update_status: commit-queue Fail
     
    273273""",
    274274            "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",
    276276        }
    277277        queue = CommitQueue()
     
    293293MOCK: update_status: commit-queue Updated working directory
    294294MOCK: 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:
     295MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nNew failing tests:
    296296mock_test_name.html
    297297another_test_name.html
     
    301301""",
    302302            "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",
    304304        }
    305305        queue = CommitQueue()
     
    341341""" % {"port": CommitQueue.port_name},
    342342            "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",
    344344        }
    345345        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
     
    366366""" % {"port": CommitQueue.port_name},
    367367            "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",
    369369        }
    370370        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.