2009-11-26 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Nov 2009 07:56:24 +0000 (07:56 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Nov 2009 07:56:24 +0000 (07:56 +0000)
        Reviewed by Eric Seidel.

        [bzt] Kill WebKitLandingScripts
        https://bugs.webkit.org/show_bug.cgi?id=31904

        Step 4: Kill run_webkit_script.

        * Scripts/modules/buildsteps.py:
        * Scripts/modules/commands/download.py:
        * Scripts/modules/webkitlandingscripts.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/modules/buildsteps.py
WebKitTools/Scripts/modules/commands/download.py
WebKitTools/Scripts/modules/webkitlandingscripts.py

index 8d4a9a8baa6acdd9731e469b7cdcd90db4bf45f1..dc007189d302817388cbebfc0834b9b871471981 100644 (file)
@@ -1,3 +1,16 @@
+2009-11-26  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        [bzt] Kill WebKitLandingScripts
+        https://bugs.webkit.org/show_bug.cgi?id=31904
+
+        Step 4: Kill run_webkit_script.
+
+        * Scripts/modules/buildsteps.py:
+        * Scripts/modules/commands/download.py:
+        * Scripts/modules/webkitlandingscripts.py:
+
 2009-11-26  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 9d5052e4d6f70400d85cc3d521698ef10df07470..13a5777317b4a47454cf9367b3de6b6020a7b702 100644 (file)
 
 import os
 
-from modules.logging import error
+from modules.logging import log, error
 from modules.webkitlandingscripts import WebKitLandingScripts
 from modules.webkitport import WebKitPort
 
 class BuildSteps:
+    def _run_script(cls, script_name, quiet=False, port=WebKitPort):
+        log("Running %s" % script_name)
+        WebKitLandingScripts.run_and_throw_if_fail(port.script_path(script_name), quiet)
+
+    def prepare_changelog(self):
+        self.run_script("prepare-ChangeLog")
+
     def clean_working_directory(self, scm, options, allow_local_commits=False):
         os.chdir(scm.checkout_root)
         if not allow_local_commits:
@@ -58,3 +65,7 @@ class BuildSteps:
     def build_webkit(self, quiet=False, port=WebKitPort):
         log("Building WebKit")
         WebKitLandingScripts.run_and_throw_if_fail(port.build_webkit_command(), quiet)
+
+    def check_style(self):
+        self._run_script("check-webkit-style")
+
index 9c152f0476b58d351a67eec5297d1a4dbf5b0c5a..d986e2881dd37e9e35d432d22253341fd5188cf7 100644 (file)
@@ -254,7 +254,7 @@ class CheckStyleSequence(LandingSequence):
 
     def build(self):
         # Instead of building, we check style.
-        WebKitLandingScripts.run_webkit_script("check-webkit-style")
+        self._tool.steps.check_style()
 
 
 class CheckStyle(AbstractPatchProcessingCommand):
@@ -359,14 +359,14 @@ class Rollout(Command):
         Command.__init__(self, "Revert the given revision in the working copy and optionally commit the revert and re-open the original bug", "REVISION [BUGID]", options=options)
 
     @staticmethod
-    def _create_changelogs_for_revert(scm, revision):
+    def _create_changelogs_for_revert(tool, revision):
         # First, discard the ChangeLog changes from the rollout.
-        changelog_paths = scm.modified_changelogs()
-        scm.revert_files(changelog_paths)
+        changelog_paths = tool.scm().modified_changelogs()
+        tool.scm().revert_files(changelog_paths)
 
         # Second, make new ChangeLog entries for this rollout.
         # This could move to prepare-ChangeLog by adding a --revert= option.
-        WebKitLandingScripts.run_webkit_script("prepare-ChangeLog")
+        tool.steps.prepare_changelog()
         for changelog_path in changelog_paths:
             ChangeLog(changelog_path).update_for_revert(revision)
 
@@ -395,7 +395,7 @@ class Rollout(Command):
         tool.steps.clean_working_directory(tool.scm(), options)
         tool.scm().update_webkit()
         tool.scm().apply_reverse_diff(revision)
-        self._create_changelogs_for_revert(tool.scm(), revision)
+        self._create_changelogs_for_revert(tool, revision)
 
         # FIXME: Fully automated rollout is not 100% idiot-proof yet, so for now just log with instructions on how to complete the rollout.
         # Once we trust rollout we will remove this option.
index e0f3a125558a6fbe40aa8f83d1679d1e58cedb24..24935932d06cb3b20383b49aab1fe325e441ba68 100644 (file)
@@ -113,11 +113,5 @@ class WebKitLandingScripts:
         if exit_code:
             raise ScriptError(script_args=args, exit_code=exit_code, output=child_output)
 
-    @classmethod
-    def run_webkit_script(cls, script_name, quiet=False, port=WebKitPort):
-        log("Running %s" % script_name)
-        cls.run_and_throw_if_fail(port.script_path(script_name), quiet)
-
-