2009-12-05 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Dec 2009 21:54:39 +0000 (21:54 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Dec 2009 21:54:39 +0000 (21:54 +0000)
        Reviewed by Eric Seidel.

        Move update-webkit into BuildSteps
        https://bugs.webkit.org/show_bug.cgi?id=32181

        We need to move update-webkit out of SCM.py because SCM isn't supposed to know
        that WebKit exists.  The proper place for the knowledge of the existence of
        update-webkit is in WebKitPort because some ports have specialized update
        scripts (analogous to build-webkit).

        * Scripts/modules/buildsteps.py:
        * Scripts/modules/commands/download.py:
        * Scripts/modules/landingsequence.py:
        * Scripts/modules/scm.py:
        * Scripts/modules/webkitport.py:

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

WebKitTools/ChangeLog
WebKitTools/Scripts/modules/buildsteps.py
WebKitTools/Scripts/modules/commands/download.py
WebKitTools/Scripts/modules/landingsequence.py
WebKitTools/Scripts/modules/scm.py
WebKitTools/Scripts/modules/webkitport.py

index 3d6151afdd490414d61e2aa9ca591e12d183abd4..1fba09bc519b4d300eab5ed41f5bf0b3eec59a28 100644 (file)
@@ -1,3 +1,21 @@
+2009-12-05  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Move update-webkit into BuildSteps
+        https://bugs.webkit.org/show_bug.cgi?id=32181
+
+        We need to move update-webkit out of SCM.py because SCM isn't supposed to know
+        that WebKit exists.  The proper place for the knowledge of the existence of
+        update-webkit is in WebKitPort because some ports have specialized update
+        scripts (analogous to build-webkit).
+
+        * Scripts/modules/buildsteps.py:
+        * Scripts/modules/commands/download.py:
+        * Scripts/modules/landingsequence.py:
+        * Scripts/modules/scm.py:
+        * Scripts/modules/webkitport.py:
+
 2009-12-05  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index d796b3afc0c63b703724f664cdc1a13e70bebe92..c56640118031d24aea524526f869c7519211a81d 100644 (file)
@@ -76,6 +76,10 @@ class BuildSteps:
         if options.clean:
             scm.ensure_clean_working_directory(force_clean=options.force_clean)
 
+    def update(self, port=WebKitPort):
+        log("Updating working directory")
+        run_and_throw_if_fail(port.update_webkit_command())
+
     def run_tests(self, launch_safari, fail_fast=False, quiet=False, port=WebKitPort):
         args = port.run_webkit_tests_command()
         if not launch_safari:
index a45632cf24a47987e4a9bf10eebcf07268f4f671..483219a3f6d93b0647c998fb14bfc64f15b7deec 100644 (file)
@@ -109,7 +109,7 @@ class WebKitApplyingScripts:
     def setup_for_patch_apply(tool, options):
         tool.steps.clean_working_directory(tool.scm(), options, allow_local_commits=True)
         if options.update:
-            tool.scm().update_webkit()
+            tool.steps.update()
 
     @staticmethod
     def apply_patches_with_options(scm, patches, options):
@@ -386,7 +386,7 @@ class Rollout(Command):
                 log("Failed to parse bug number from diff.  No bugs will be updated/reopened after the rollout.")
 
         tool.steps.clean_working_directory(tool.scm(), options)
-        tool.scm().update_webkit()
+        tool.steps.update()
         tool.scm().apply_reverse_diff(revision)
         self._create_changelogs_for_revert(tool, revision)
 
index ecb231e226cccb699fa793311fdf79c980607932..b7bed2b0f6229c4159dccdd6e88e9e68f6afe87a 100644 (file)
@@ -77,7 +77,7 @@ class LandingSequence:
         self._tool.steps.clean_working_directory(self._tool.scm(), self._options)
 
     def update(self):
-        self._tool.scm().update_webkit()
+        self._tool.steps.update()
 
     def apply_patch(self):
         log("Processing patch %s from bug %s." % (self._patch["id"], self._patch["bug_id"]))
index beb32dfc94d55b9a4a973a8f3f86146f138c66d9..d0db9848348b92c34cf6b0f90c2a17d4bd5818fe 100644 (file)
@@ -251,9 +251,6 @@ class SCM:
     def clean_working_directory(self):
         raise NotImplementedError, "subclasses must implement"
 
-    def update_webkit(self):
-        raise NotImplementedError, "subclasses must implement"
-
     def status_command(self):
         raise NotImplementedError, "subclasses must implement"
 
@@ -362,9 +359,6 @@ class SVN(SCM):
     def clean_working_directory(self):
         self.run_command(['svn', 'revert', '-R', '.'])
 
-    def update_webkit(self):
-        self.run_command(self.script_path("update-webkit"))
-
     def status_command(self):
         return ['svn', 'status']
 
@@ -458,11 +452,6 @@ class Git(SCM):
         if self.rebase_in_progress():
             self.run_command(['git', 'rebase', '--abort'])
 
-    def update_webkit(self):
-        # FIXME: Call update-webkit once https://bugs.webkit.org/show_bug.cgi?id=27162 is fixed.
-        log("Updating working directory")
-        self.run_command(['git', 'svn', 'rebase'])
-
     def status_command(self):
         return ['git', 'status']
 
index a524bc6b08b9f47c92f94e94285cb33ca7bb2acd..022088c5e10cfb6a4b55bdb5082fb1aafb9e6c55 100644 (file)
@@ -62,13 +62,17 @@ class WebKitPort():
         raise NotImplementedError, "subclasses must implement"
 
     @classmethod
-    def run_webkit_tests_command(cls):
-        return [cls.script_path("run-webkit-tests")]
+    def update_webkit_command(cls):
+        return [cls.script_path("update-webkit")]
 
     @classmethod
     def build_webkit_command(cls):
         return [cls.script_path("build-webkit")]
 
+    @classmethod
+    def run_webkit_tests_command(cls):
+        return [cls.script_path("run-webkit-tests")]
+
 
 class MacPort(WebKitPort):
     @classmethod