Changeset 70570 in webkit


Ignore:
Timestamp:
Oct 26, 2010 1:47:53 PM (13 years ago)
Author:
eric@webkit.org
Message:

2010-10-26 Eric Seidel <eric@webkit.org>

Reviewed by Ojan Vafai.

Remove rietveld code now that it's unused
https://bugs.webkit.org/show_bug.cgi?id=48359

Was cool that we added this support, but now that it's
not used it makes little sense to keep it around.
We can always restore this code from SVN if we need it.

  • Scripts/webkitpy/common/config/init.py:
  • Scripts/webkitpy/common/net/bugzilla.py:
  • Scripts/webkitpy/common/net/bugzilla_unittest.py:
  • Scripts/webkitpy/common/net/rietveld.py: Removed.
  • Scripts/webkitpy/common/net/rietveld_unittest.py: Removed.
  • Scripts/webkitpy/thirdparty/init.py:
  • Scripts/webkitpy/tool/commands/download.py:
  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/queues.py:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
  • Scripts/webkitpy/tool/main.py:
  • Scripts/webkitpy/tool/mocktool.py:
  • Scripts/webkitpy/tool/steps/init.py:
  • Scripts/webkitpy/tool/steps/postcodereview.py: Removed.
Location:
trunk/WebKitTools
Files:
3 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70564 r70570  
     12010-10-26  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Remove rietveld code now that it's unused
     6        https://bugs.webkit.org/show_bug.cgi?id=48359
     7
     8        Was cool that we added this support, but now that it's
     9        not used it makes little sense to keep it around.
     10        We can always restore this code from SVN if we need it.
     11
     12        * Scripts/webkitpy/common/config/__init__.py:
     13        * Scripts/webkitpy/common/net/bugzilla.py:
     14        * Scripts/webkitpy/common/net/bugzilla_unittest.py:
     15        * Scripts/webkitpy/common/net/rietveld.py: Removed.
     16        * Scripts/webkitpy/common/net/rietveld_unittest.py: Removed.
     17        * Scripts/webkitpy/thirdparty/__init__.py:
     18        * Scripts/webkitpy/tool/commands/download.py:
     19        * Scripts/webkitpy/tool/commands/download_unittest.py:
     20        * Scripts/webkitpy/tool/commands/queues.py:
     21        * Scripts/webkitpy/tool/commands/queues_unittest.py:
     22        * Scripts/webkitpy/tool/main.py:
     23        * Scripts/webkitpy/tool/mocktool.py:
     24        * Scripts/webkitpy/tool/steps/__init__.py:
     25        * Scripts/webkitpy/tool/steps/postcodereview.py: Removed.
     26
    1272010-10-26  Anders Carlsson  <andersca@apple.com>
    228
  • trunk/WebKitTools/Scripts/webkitpy/common/config/__init__.py

    r59284 r70570  
    11# Required for Python to search this directory for module files
    2 
    3 import re
    4 
    5 codereview_server_host = "wkrietveld.appspot.com"
    6 codereview_server_url = "https://%s/" % codereview_server_host
  • trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py

    r70562 r70570  
    114114        return self._attachment_dictionary.get("commit-queue")
    115115
    116     def in_rietveld(self):
    117         return self._attachment_dictionary.get("in-rietveld")
    118 
    119116    def url(self):
    120117        # FIXME: This should just return
     
    222219        return filter(lambda patch: patch.committer(), patches)
    223220
    224     def in_rietveld_queue_patches(self):
    225         return [patch for patch in self.patches() if patch.in_rietveld() == None]
    226 
    227221
    228222# A container for all of the logic for making and parsing buzilla queries.
     
    287281        return sum([self._fetch_bug(bug_id).commit_queued_patches()
    288282                    for bug_id in self.fetch_bug_ids_from_commit_queue()], [])
    289 
    290     def fetch_first_patch_from_rietveld_queue(self):
    291         # rietveld-queue processes all patches that don't have in-rietveld set.
    292         query_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=notsubstring&value0-0-0=in-rietveld&field0-1-0=attachments.ispatch&type0-1-0=equals&value0-1-0=1&order=Last+Changed&field0-2-0=attachments.isobsolete&type0-2-0=equals&value0-2-0=0"
    293         bugs = self._fetch_bug_ids_advanced_query(query_url)
    294         if not len(bugs):
    295             return None
    296 
    297         patches = self._fetch_bug(bugs[0]).in_rietveld_queue_patches()
    298         return patches[0] if len(patches) else None
    299283
    300284    def _fetch_bug_ids_from_review_queue(self):
     
    503487                element, 'review', attachment, 'reviewer_email')
    504488        self._parse_attachment_flag(
    505                 element, 'in-rietveld', attachment, 'rietveld_uploader_email')
    506         self._parse_attachment_flag(
    507489                element, 'commit-queue', attachment, 'committer_email')
    508490        return attachment
     
    768750        elif flag_name == "commit-queue":
    769751            return self.browser.find_control(type='select', nr=1)
    770         elif flag_name == "in-rietveld":
    771             return self.browser.find_control(type='select', nr=2)
    772752        raise Exception("Don't know how to find flag named \"%s\"" % flag_name)
    773753
  • trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py

    r68673 r70570  
    8484                setter="two@test.com"
    8585           />
    86           <flag name="in-rietveld"
    87                 id="17933"
    88                 status="+"
    89                 setter="three@test.com"
    90            />
    9186        </attachment>
    9287'''
     
    10499        'commit-queue' : '+',
    105100        'committer_email' : 'two@test.com',
    106         'in-rietveld': '+',
    107         'rietveld_uploader_email': 'three@test.com',
    108101        'attacher_email' : 'christian.plesner.hansen@gmail.com',
    109102    }
  • trunk/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py

    r65696 r70570  
    7878                  target_name="eliza.py")
    7979
    80 rietveld_dir = os.path.join(autoinstalled_dir, "rietveld")
    81 installer = AutoInstaller(target_dir=rietveld_dir)
    82 installer.install(url="http://webkit-rietveld.googlecode.com/svn/trunk/upload_v26/upload.py",
    83                   target_name="upload.py")
    84 
    85 
    8680# Since irclib and ircbot are two top-level packages, we need to import
    8781# them separately.  We group them into an irc package for better
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/download.py

    r69685 r70570  
    222222
    223223
    224 class PostAttachmentToRietveld(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
    225     name = "post-attachment-to-rietveld"
    226     help_text = "Uploads a bugzilla attachment to rietveld"
    227     arguments_names = "ATTACHMENTID"
    228     main_steps = [
    229         steps.CleanWorkingDirectory,
    230         steps.Update,
    231         steps.ApplyPatch,
    232         steps.PostCodeReview,
    233     ]
    234 
    235 
    236224class AbstractPatchApplyingCommand(AbstractPatchSequencingCommand):
    237225    prepare_steps = [
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/download_unittest.py

    r70274 r70570  
    119119        self.assert_execute_outputs(BuildAttachment(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    120120
    121     def test_post_attachment_to_rietveld(self):
    122         expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nMOCK: Uploading patch to rietveld\nMOCK setting flag 'in-rietveld' to '+' on attachment '197' with comment 'None' and additional comment 'None'\n"
    123         self.assert_execute_outputs(PostAttachmentToRietveld(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    124 
    125121    def test_land_attachment(self):
    126122        # FIXME: This expected result is imperfect, notice how it's seeing the same patch as still there after it thought it would have cleared the flags.
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r70541 r70570  
    349349
    350350
    351 # FIXME: All the Rietveld code is no longer used and should be deleted.
    352 class RietveldUploadQueue(AbstractPatchQueue, StepSequenceErrorHandler):
    353     name = "rietveld-upload-queue"
    354 
    355     def __init__(self):
    356         AbstractPatchQueue.__init__(self)
    357 
    358     # AbstractPatchQueue methods
    359 
    360     def next_work_item(self):
    361         patch_id = self._tool.bugs.queries.fetch_first_patch_from_rietveld_queue()
    362         if patch_id:
    363             return patch_id
    364         self._update_status("Empty queue")
    365 
    366     def should_proceed_with_work_item(self, patch):
    367         self._update_status("Uploading patch", patch)
    368         return True
    369 
    370     def process_work_item(self, patch):
    371         try:
    372             self.run_webkit_patch(["post-attachment-to-rietveld", "--force-clean", "--non-interactive", "--parent-command=rietveld-upload-queue", patch.id()])
    373             self._did_pass(patch)
    374             return True
    375         except ScriptError, e:
    376             if e.exit_code != QueueEngine.handled_error_code:
    377                 self._did_fail(patch)
    378             raise e
    379 
    380     @classmethod
    381     def _reject_patch(cls, tool, patch_id):
    382         tool.bugs.set_flag_on_attachment(patch_id, "in-rietveld", "-")
    383 
    384     def handle_unexpected_error(self, patch, message):
    385         log(message)
    386         self._reject_patch(self._tool, patch.id())
    387 
    388     # StepSequenceErrorHandler methods
    389 
    390     @classmethod
    391     def handle_script_error(cls, tool, state, script_error):
    392         log(script_error.message_with_output())
    393         cls._update_status_for_script_error(tool, state, script_error)
    394         cls._reject_patch(tool, state["patch"].id())
    395 
    396 
    397351class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler):
    398352    """This is the base-class for the EWS queues and the style-queue."""
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r70541 r70570  
    362362        self.assertEquals(queue.layout_test_results(), None)
    363363
    364 class RietveldUploadQueueTest(QueuesTest):
    365     def test_rietveld_upload_queue(self):
    366         expected_stderr = {
    367             "begin_work_queue": self._default_begin_work_queue_stderr("rietveld-upload-queue", MockSCM.fake_checkout_root),
    368             "should_proceed_with_work_item": "MOCK: update_status: rietveld-upload-queue Uploading patch\n",
    369             "process_work_item": "MOCK: update_status: rietveld-upload-queue Pass\nMOCK: release_work_item: rietveld-upload-queue 197\n",
    370             "handle_unexpected_error": "Mock error message\nMOCK setting flag 'in-rietveld' to '-' on attachment '197' with comment 'None' and additional comment 'None'\n",
    371             "handle_script_error": "ScriptError error message\nMOCK: update_status: rietveld-upload-queue ScriptError error message\nMOCK setting flag 'in-rietveld' to '-' on attachment '197' with comment 'None' and additional comment 'None'\n",
    372         }
    373         self.assert_queue_outputs(RietveldUploadQueue(), expected_stderr=expected_stderr)
    374 
    375364
    376365class StyleQueueTest(QueuesTest):
  • trunk/WebKitTools/Scripts/webkitpy/tool/main.py

    r69829 r70570  
    3838from webkitpy.common.net.bugzilla import Bugzilla
    3939from webkitpy.common.net.buildbot import BuildBot
    40 from webkitpy.common.net.rietveld import Rietveld
    4140from webkitpy.common.net.irc.ircproxy import IRCProxy
    4241from webkitpy.common.system.executive import Executive
     
    8079        self._checkout = None
    8180        self.status_server = StatusServer()
    82         self.codereview = Rietveld(self.executive)
    8381        self.port_factory = port.factory
    8482
     
    127125            self.scm().dryrun = True
    128126            self.bugs.dryrun = True
    129             self.codereview.dryrun = True
    130127        if options.status_host:
    131128            self.status_server.set_host(options.status_host)
  • trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py

    r70541 r70570  
    3434from webkitpy.common.checkout.scm import CommitMessage
    3535from webkitpy.common.net.bugzilla import Bug, Attachment
    36 from webkitpy.common.net.rietveld import Rietveld
    3736from webkitpy.thirdparty.mock import Mock
    3837from webkitpy.common.system.deprecated_logging import log
     
    8786    "is_obsolete": False,
    8887    "is_patch": True,
    89     "in-rietveld": "?",
    9088    "review": "?",
    9189    "attacher_email": "eric@webkit.org",
     
    114112    "is_obsolete": False,
    115113    "is_patch": True,
    116     "in-rietveld": "?",
    117114    "review": "+",
    118115    "reviewer_email": "foo@bar.com",
     
    128125    "is_obsolete": False,
    129126    "is_patch": True,
    130     "in-rietveld": "-",
    131127    "commit-queue": "+",
    132128    "committer_email": "foo@bar.com",
     
    142138    "is_obsolete": True,
    143139    "is_patch": True,
    144     "in-rietveld": "+",
    145140    "review": "+",
    146141    "reviewer_email": "foo@bar.com",
     
    230225    def fetch_patches_from_pending_commit_list(self):
    231226        return sum([bug.reviewed_patches() for bug in self._all_bugs()], [])
    232 
    233     def fetch_first_patch_from_rietveld_queue(self):
    234         for bug in self._all_bugs():
    235             patches = bug.in_rietveld_queue_patches()
    236             if len(patches):
    237                 return patches[0]
    238         raise Exception('No patches in the rietveld queue')
    239227
    240228
     
    616604
    617605
    618 class MockRietveld(object):
    619 
    620     def __init__(self, executive, dryrun=False):
    621         pass
    622 
    623     def post(self, diff, patch_id, codereview_issue, message=None, cc=None):
    624         log("MOCK: Uploading patch to rietveld")
    625 
    626 
    627606class MockTestPort1(object):
    628607
     
    656635        self.status_server = MockStatusServer()
    657636        self.irc_password = "MOCK irc password"
    658         self.codereview = MockRietveld(self.executive)
    659637        self.port_factory = MockPortFactory()
    660638
  • trunk/WebKitTools/Scripts/webkitpy/tool/steps/__init__.py

    r70274 r70570  
    4545from webkitpy.tool.steps.obsoletepatches import ObsoletePatches
    4646from webkitpy.tool.steps.options import Options
    47 from webkitpy.tool.steps.postcodereview import PostCodeReview
    4847from webkitpy.tool.steps.postdiff import PostDiff
    4948from webkitpy.tool.steps.postdiffforcommit import PostDiffForCommit
Note: See TracChangeset for help on using the changeset viewer.