| Differences between
and this patch
- a/WebKitTools/ChangeLog +18 lines
Lines 2-7 a/WebKitTools/ChangeLog_sec1
2
2
3
        Reviewed by NOBODY (OOPS!).
3
        Reviewed by NOBODY (OOPS!).
4
4
5
        Move update-webkit into BuildSteps
6
        https://bugs.webkit.org/show_bug.cgi?id=32181
7
8
        We need to move update-webkit out of SCM.py because SCM isn't supposed to know
9
        that WebKit exists.  The proper place for the knowledge of the existence of
10
        update-webkit is in WebKitPort because some ports have specialized update
11
        scripts (analogous to build-webkit).
12
13
        * Scripts/modules/buildsteps.py:
14
        * Scripts/modules/commands/download.py:
15
        * Scripts/modules/landingsequence.py:
16
        * Scripts/modules/scm.py:
17
        * Scripts/modules/webkitport.py:
18
19
2009-12-04  Adam Barth  <abarth@webkit.org>
20
21
        Reviewed by NOBODY (OOPS!).
22
5
        update-webkit should call git svn rebase and resolve-ChangeLogs -f
23
        update-webkit should call git svn rebase and resolve-ChangeLogs -f
6
        https://bugs.webkit.org/show_bug.cgi?id=27162
24
        https://bugs.webkit.org/show_bug.cgi?id=27162
7
25
- a/WebKitTools/Scripts/modules/buildsteps.py +4 lines
Lines 76-81 class BuildSteps: a/WebKitTools/Scripts/modules/buildsteps.py_sec1
76
        if options.clean:
76
        if options.clean:
77
            scm.ensure_clean_working_directory(force_clean=options.force_clean)
77
            scm.ensure_clean_working_directory(force_clean=options.force_clean)
78
78
79
    def update(self, port=WebKitPort):
80
        log("Updating working directory")
81
        run_and_throw_if_fail(port.update_webkit_command())
82
79
    def run_tests(self, launch_safari, fail_fast=False, quiet=False, port=WebKitPort):
83
    def run_tests(self, launch_safari, fail_fast=False, quiet=False, port=WebKitPort):
80
        args = port.run_webkit_tests_command()
84
        args = port.run_webkit_tests_command()
81
        if not launch_safari:
85
        if not launch_safari:
- a/WebKitTools/Scripts/modules/commands/download.py -2 / +2 lines
Lines 109-115 class WebKitApplyingScripts: a/WebKitTools/Scripts/modules/commands/download.py_sec1
109
    def setup_for_patch_apply(tool, options):
109
    def setup_for_patch_apply(tool, options):
110
        tool.steps.clean_working_directory(tool.scm(), options, allow_local_commits=True)
110
        tool.steps.clean_working_directory(tool.scm(), options, allow_local_commits=True)
111
        if options.update:
111
        if options.update:
112
            tool.scm().update_webkit()
112
            tool.steps.update()
113
113
114
    @staticmethod
114
    @staticmethod
115
    def apply_patches_with_options(scm, patches, options):
115
    def apply_patches_with_options(scm, patches, options):
Lines 386-392 class Rollout(Command): a/WebKitTools/Scripts/modules/commands/download.py_sec2
386
                log("Failed to parse bug number from diff.  No bugs will be updated/reopened after the rollout.")
386
                log("Failed to parse bug number from diff.  No bugs will be updated/reopened after the rollout.")
387
387
388
        tool.steps.clean_working_directory(tool.scm(), options)
388
        tool.steps.clean_working_directory(tool.scm(), options)
389
        tool.scm().update_webkit()
389
        tool.steps.update()
390
        tool.scm().apply_reverse_diff(revision)
390
        tool.scm().apply_reverse_diff(revision)
391
        self._create_changelogs_for_revert(tool, revision)
391
        self._create_changelogs_for_revert(tool, revision)
392
392
- a/WebKitTools/Scripts/modules/landingsequence.py -1 / +1 lines
Lines 77-83 class LandingSequence: a/WebKitTools/Scripts/modules/landingsequence.py_sec1
77
        self._tool.steps.clean_working_directory(self._tool.scm(), self._options)
77
        self._tool.steps.clean_working_directory(self._tool.scm(), self._options)
78
78
79
    def update(self):
79
    def update(self):
80
        self._tool.scm().update_webkit()
80
        self._tool.steps.update()
81
81
82
    def apply_patch(self):
82
    def apply_patch(self):
83
        log("Processing patch %s from bug %s." % (self._patch["id"], self._patch["bug_id"]))
83
        log("Processing patch %s from bug %s." % (self._patch["id"], self._patch["bug_id"]))
- a/WebKitTools/Scripts/modules/scm.py -11 lines
Lines 251-259 class SCM: a/WebKitTools/Scripts/modules/scm.py_sec1
251
    def clean_working_directory(self):
251
    def clean_working_directory(self):
252
        raise NotImplementedError, "subclasses must implement"
252
        raise NotImplementedError, "subclasses must implement"
253
253
254
    def update_webkit(self):
255
        raise NotImplementedError, "subclasses must implement"
256
257
    def status_command(self):
254
    def status_command(self):
258
        raise NotImplementedError, "subclasses must implement"
255
        raise NotImplementedError, "subclasses must implement"
259
256
Lines 362-370 class SVN(SCM): a/WebKitTools/Scripts/modules/scm.py_sec2
362
    def clean_working_directory(self):
359
    def clean_working_directory(self):
363
        self.run_command(['svn', 'revert', '-R', '.'])
360
        self.run_command(['svn', 'revert', '-R', '.'])
364
361
365
    def update_webkit(self):
366
        self.run_command(self.script_path("update-webkit"))
367
368
    def status_command(self):
362
    def status_command(self):
369
        return ['svn', 'status']
363
        return ['svn', 'status']
370
364
Lines 458-468 class Git(SCM): a/WebKitTools/Scripts/modules/scm.py_sec3
458
        if self.rebase_in_progress():
452
        if self.rebase_in_progress():
459
            self.run_command(['git', 'rebase', '--abort'])
453
            self.run_command(['git', 'rebase', '--abort'])
460
454
461
    def update_webkit(self):
462
        # FIXME: Call update-webkit once https://bugs.webkit.org/show_bug.cgi?id=27162 is fixed.
463
        log("Updating working directory")
464
        self.run_command(['git', 'svn', 'rebase'])
465
466
    def status_command(self):
455
    def status_command(self):
467
        return ['git', 'status']
456
        return ['git', 'status']
468
457
- a/WebKitTools/Scripts/modules/webkitport.py -2 / +6 lines
Lines 62-74 class WebKitPort(): a/WebKitTools/Scripts/modules/webkitport.py_sec1
62
        raise NotImplementedError, "subclasses must implement"
62
        raise NotImplementedError, "subclasses must implement"
63
63
64
    @classmethod
64
    @classmethod
65
    def run_webkit_tests_command(cls):
65
    def update_webkit_command(cls):
66
        return [cls.script_path("run-webkit-tests")]
66
        return [cls.script_path("update-webkit")]
67
67
68
    @classmethod
68
    @classmethod
69
    def build_webkit_command(cls):
69
    def build_webkit_command(cls):
70
        return [cls.script_path("build-webkit")]
70
        return [cls.script_path("build-webkit")]
71
71
72
    @classmethod
73
    def run_webkit_tests_command(cls):
74
        return [cls.script_path("run-webkit-tests")]
75
72
76
73
class MacPort(WebKitPort):
77
class MacPort(WebKitPort):
74
    @classmethod
78
    @classmethod

Return to Bug 32181