Changeset 148354 in webkit


Ignore:
Timestamp:
Apr 13, 2013 2:47:21 AM (11 years ago)
Author:
rniwa@webkit.org
Message:

Merge watchlistloader into host since it's an unnecessary indirection
https://bugs.webkit.org/show_bug.cgi?id=114555

Reviewed by Antti Koivisto.

We don't need a class to load a file.

  • Scripts/webkitpy/common/host.py:

(Host.watch_list):

  • Scripts/webkitpy/common/watchlist/watchlistloader.py: Removed.
  • Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py: Removed.
Location:
trunk/Tools
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r148353 r148354  
     12013-04-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Merge watchlistloader into host since it's an unnecessary indirection
     4        https://bugs.webkit.org/show_bug.cgi?id=114555
     5
     6        Reviewed by Antti Koivisto.
     7
     8        We don't need a class to load a file.
     9
     10        * Scripts/webkitpy/common/host.py:
     11        (Host.watch_list):
     12        * Scripts/webkitpy/common/watchlist/watchlistloader.py: Removed.
     13        * Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py: Removed.
     14
    1152013-04-13  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Tools/Scripts/webkitpy/common/host.py

    r148352 r148354  
    3737from webkitpy.common.net import bugzilla, buildbot, web
    3838from webkitpy.common.system.systemhost import SystemHost
    39 from webkitpy.common.watchlist.watchlistloader import WatchListLoader
     39from webkitpy.common.watchlist.watchlistparser import WatchListParser
    4040from webkitpy.layout_tests.port.factory import PortFactory
    4141
     
    9292    @memoized
    9393    def watch_list(self):
    94         return WatchListLoader(self.filesystem).load()
     94        config_path = self.filesystem.dirname(self.filesystem.path_to_module('webkitpy.common.config'))
     95        watch_list_full_path = self.filesystem.join(config_path, 'watchlist')
     96        if not self.filesystem.exists(watch_list_full_path):
     97            raise Exception('Watch list file (%s) not found.' % watch_list_full_path)
     98
     99        watch_list_contents = self.filesystem.read_text_file(watch_list_full_path)
     100        return WatchListParser().parse(watch_list_contents)
Note: See TracChangeset for help on using the changeset viewer.