Changeset 52540 in webkit


Ignore:
Timestamp:
Dec 23, 2009 6:31:27 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-23 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

commit-queue should mention bug 30084 when rejecting patches until it can be fixed
https://bugs.webkit.org/show_bug.cgi?id=32911

  • Scripts/modules/bugzilla.py: Make the message even more fancy.
  • Scripts/modules/bugzilla_unittest.py: Test our new fancy message.
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52531 r52540  
     12009-12-23  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        commit-queue should mention bug 30084 when rejecting patches until it can be fixed
     6        https://bugs.webkit.org/show_bug.cgi?id=32911
     7
     8        * Scripts/modules/bugzilla.py: Make the message even more fancy.
     9        * Scripts/modules/bugzilla_unittest.py: Test our new fancy message.
     10
    1112009-12-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    212
  • trunk/WebKitTools/Scripts/modules/bugzilla.py

    r52528 r52540  
    174174
    175175    def _flag_permission_rejection_message(self, setter_email, flag_name):
    176         committer_list = "WebKitTools/Scripts/modules/committers.py"
    177         contribution_guidlines_url = "http://webkit.org/coding/contributing.html"
     176        committer_list = "WebKitTools/Scripts/modules/committers.py" # This could be computed from CommitterList.__file__
     177        contribution_guidlines_url = "http://webkit.org/coding/contributing.html" # Should come from some webkit_config.py
     178        queue_administrator = "eseidel@chromium.org" # This could be queried from the status_bot.
     179        queue_name = "commit-queue" # This could be queried from the tool.
    178180        rejection_message = "%s does not have %s permissions according to %s." % (setter_email, flag_name, self._view_source_link(committer_list))
    179         rejection_message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed) and then set the %s flag again." % (flag_name, committer_list, flag_name)
    180181        rejection_message += "\n\n- If you do not have %s rights please read %s for instructions on how to use bugzilla flags." % (flag_name, contribution_guidlines_url)
     182        rejection_message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed)." % (flag_name, committer_list)
     183        rejection_message += "  Due to bug 30084 the %s will require a restart after your change." % queue_name
     184        rejection_message += "  Please contact %s to request a %s restart." % (queue_administrator, queue_name)
     185        rejection_message += "  After restart the %s will correctly respect your %s rights." % (queue_name, flag_name)
    181186        return rejection_message
    182187
  • trunk/WebKitTools/Scripts/modules/bugzilla_unittest.py

    r52435 r52540  
    193193        OutputCapture().assert_outputs(self, bugzilla.add_cc_to_bug, [42, ["adam@example.com"]], expected_stderr=expected_stderr)
    194194
     195    def test_flag_permission_rejection_message(self):
     196        bugzilla = Bugzilla()
     197        expected_messsage="""foo@foo.com does not have review permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/modules/committers.py.
     198
     199- If you do not have review rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
     200
     201- If you have review rights please correct the error in WebKitTools/Scripts/modules/committers.py by adding yourself to the file (no review needed).  Due to bug 30084 the commit-queue will require a restart after your change.  Please contact eseidel@chromium.org to request a commit-queue restart.  After restart the commit-queue will correctly respect your review rights."""
     202        self.assertEqual(bugzilla._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
     203
    195204
    196205if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.