Changeset 70171 in webkit


Ignore:
Timestamp:
Oct 20, 2010 1:44:56 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-10-20 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

webkit-patch doesn't get along with git rm
https://bugs.webkit.org/show_bug.cgi?id=47940

Turns out we need to pass "--" to tell git this is a path.

  • Scripts/webkitpy/common/checkout/scm.py:
Location:
trunk/WebKitTools
Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70169 r70171  
    7474        needs to be done. Removed code that tracked the modified timestamp of
    7575        the library, as it is no longer needed.
     76
     772010-10-19  Eric Seidel  <eric@webkit.org>
     78
     79        Reviewed by Adam Barth.
     80
     81        EWS should test patches with r+
     82        https://bugs.webkit.org/show_bug.cgi?id=35460
     83
     84        * QueueStatusServer/handlers/submittoews.py:
     85        * QueueStatusServer/model/queues.py:
     86        * Scripts/webkitpy/tool/bot/patchcollection.py: Removed.
     87        * Scripts/webkitpy/tool/bot/patchcollection_unittest.py: Removed.
     88        * Scripts/webkitpy/tool/commands/queues.py:
    7689
    77902010-10-19  Eric Seidel  <eric@webkit.org>
  • trunk/WebKitTools/QueueStatusServer/handlers/submittoews.py

    r70019 r70171  
    4040
    4141    def _should_add_to_ews_queue(self, queue, attachment):
     42        # This assert() is here to make sure we're not submitting to the commit-queue.
     43        # The commit-queue clients check each patch anyway, but there is not sense
     44        # in adding things to the commit-queue when they won't be processed by it.
    4245        assert(queue.is_ews())
    4346        latest_status = attachment.status_for_queue(queue)
     
    5255
    5356    def _add_attachment_to_ews_queues(self, attachment):
    54         for queue in Queue.all_ews():
     57        for queue in Queue.all_ews():  # all_ews() currently includes the style-queue
    5558            if self._should_add_to_ews_queue(queue, attachment):
    5659                queue.work_items().add_work_item(attachment.id)
  • trunk/WebKitTools/QueueStatusServer/model/queues.py

    r70079 r70171  
    106106
    107107    def is_ews(self):
    108         return self._name.endswith("-ews")
     108        # Note: The style-queue is just like an EWS in that it has an EWS
     109        # bubble, and it works off of the r? patches.  If at some later
     110        # point code wants to not treat the style-queue as an EWS
     111        # (e.g. expecting is_ews() queues to have build results?)
     112        # then we should fix all callers and change this check.
     113        return self._name.endswith("-ews") or self._name == "style-queue"
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/feeders.py

    r70117 r70171  
    4848
    4949    def _update_work_items(self, item_ids):
     50        # FIXME: This is the last use of update_work_items, the commit-queue
     51        # should move to feeding patches one at a time like the EWS does.
    5052        self._tool.status_server.update_work_items(self.queue_name, item_ids)
    5153        log("Feeding %s items %s" % (self.queue_name, item_ids))
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py

    r70022 r70171  
    4949            "begin_work_queue": self._default_begin_work_queue_stderr(ews.name, os.getcwd()),  # FIXME: Use of os.getcwd() is wrong, should be scm.checkout_root
    5050            "handle_unexpected_error": "Mock error message\n",
    51             "next_work_item": "MOCK: update_work_items: %(name)s [103]\n" % string_replacemnts,
    52             "process_work_item": "MOCK: update_status: %(name)s Pass\n" % string_replacemnts,
     51            "next_work_item": "",
     52            "process_work_item": "MOCK: update_status: %(name)s Pass\nMOCK: release_work_item: %(name)s 197\n" % string_replacemnts,
    5353            "handle_script_error": "MOCK: update_status: %(name)s ScriptError error message\nMOCK bug comment: bug_id=142, cc=%(watchers)s\n--- Begin comment ---\nAttachment 197 did not build on %(port)s:\nBuild output: http://dummy_url\n--- End comment ---\n\n" % string_replacemnts,
    5454        }
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r70117 r70171  
    4747from webkitpy.tool.bot.commitqueuetask import CommitQueueTask, CommitQueueTaskDelegate
    4848from webkitpy.tool.bot.feeders import CommitQueueFeeder, EWSFeeder
    49 from webkitpy.tool.bot.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate
    5049from webkitpy.tool.bot.queueengine import QueueEngine, QueueEngineDelegate
    5150from webkitpy.tool.grammar import pluralize
    5251from webkitpy.tool.multicommandtool import Command, TryAgain
     52
    5353
    5454class AbstractQueue(Command, QueueEngineDelegate):
     
    328328
    329329
     330# FIXME: All the Rietveld code is no longer used and should be deleted.
    330331class RietveldUploadQueue(AbstractPatchQueue, StepSequenceErrorHandler):
    331332    name = "rietveld-upload-queue"
     
    373374
    374375
    375 class AbstractReviewQueue(AbstractPatchQueue, PersistentPatchCollectionDelegate, StepSequenceErrorHandler):
     376class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler):
    376377    """This is the base-class for the EWS queues and the style-queue."""
    377378    def __init__(self, options=None):
     
    379380
    380381    def review_patch(self, patch):
    381         raise NotImplementedError, "subclasses must implement"
    382 
    383     # PersistentPatchCollectionDelegate methods
    384 
    385     def collection_name(self):
    386         return self.name
    387 
    388     def fetch_potential_patch_ids(self):
    389         return self._tool.bugs.queries.fetch_attachment_ids_from_review_queue()
    390 
    391     def status_server(self):
    392         return self._tool.status_server
    393 
    394     def is_terminal_status(self, status):
    395         return status == "Pass" or status == "Fail" or status.startswith("Error:")
     382        raise NotImplementedError("subclasses must implement")
    396383
    397384    # AbstractPatchQueue methods
     
    399386    def begin_work_queue(self):
    400387        AbstractPatchQueue.begin_work_queue(self)
    401         self._patches = PersistentPatchCollection(self)
    402388
    403389    def next_work_item(self):
    404         patch_id = self._patches.next()
    405         if patch_id:
    406             return self._tool.bugs.fetch_attachment(patch_id)
     390        patch_id = self._fetch_next_work_item()
     391        if not patch_id:
     392            return None
     393        return self._tool.bugs.fetch_attachment(patch_id)
    407394
    408395    def should_proceed_with_work_item(self, patch):
    409         raise NotImplementedError, "subclasses must implement"
     396        raise NotImplementedError("subclasses must implement")
    410397
    411398    def process_work_item(self, patch):
     
    419406                self._did_fail(patch)
    420407            raise e
     408        finally:
     409            self._release_work_item(patch)
    421410
    422411    def handle_unexpected_error(self, patch, message):
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r70117 r70171  
    156156
    157157
    158 class AbstractReviewQueueTest(CommandsTest):
    159     def test_patch_collection_delegate_methods(self):
    160         queue = TestReviewQueue()
    161         tool = MockTool()
    162         queue.bind_to_tool(tool)
    163         queue._options = Mock()
    164         queue._options.port = None
    165         self.assertEquals(queue.collection_name(), "test-review-queue")
    166         self.assertEquals(queue.fetch_potential_patch_ids(), [103])
    167         queue.status_server()
    168         self.assertTrue(queue.is_terminal_status("Pass"))
    169         self.assertTrue(queue.is_terminal_status("Fail"))
    170         self.assertTrue(queue.is_terminal_status("Error: Your patch exploded"))
    171         self.assertFalse(queue.is_terminal_status("Foo"))
    172 
    173 
    174158class NeedsUpdateSequence(StepSequence):
    175159    def _run(self, tool, options, state):
     
    366350        expected_stderr = {
    367351            "begin_work_queue": self._default_begin_work_queue_stderr("style-queue", MockSCM.fake_checkout_root),
    368             "next_work_item": "MOCK: update_work_items: style-queue [103]\n",
     352            "next_work_item": "",
    369353            "should_proceed_with_work_item": "MOCK: update_status: style-queue Checking style\n",
    370             "process_work_item": "MOCK: update_status: style-queue Pass\n",
     354            "process_work_item": "MOCK: update_status: style-queue Pass\nMOCK: release_work_item: style-queue 197\n",
    371355            "handle_unexpected_error": "Mock error message\n",
    372356            "handle_script_error": "MOCK: update_status: style-queue ScriptError error message\nMOCK bug comment: bug_id=142, cc=[]\n--- Begin comment ---\nAttachment 197 did not pass style-queue:\n\nScriptError error message\n\nIf any of these errors are false positives, please file a bug against check-webkit-style.\n--- End comment ---\n\n",
Note: See TracChangeset for help on using the changeset viewer.