Changeset 152113 in webkit


Ignore:
Timestamp:
Jun 27, 2013 10:49:51 AM (11 years ago)
Author:
Csaba Osztrogonác
Message:

[webkitpy] AbstractPatchSequencingCommand should have _prepare_state
https://bugs.webkit.org/show_bug.cgi?id=118128

Reviewed by Ryosuke Niwa.

It is a preparation for a new webkit-patch command: run-tests-touched-by-attachment
https://bugs.webkit.org/show_bug.cgi?id=117831

  • Scripts/webkitpy/tool/commands/download.py:

(AbstractPatchSequencingCommand):
(AbstractPatchSequencingCommand._prepare_to_process): Call _prepare_state before prepare_steps.
(AbstractPatchSequencingCommand._process_patch): Use the same initial state for each patch.
(AbstractPatchSequencingCommand._prepare_state): Added.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r152104 r152113  
     12013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
     2
     3        [webkitpy] AbstractPatchSequencingCommand should have _prepare_state
     4        https://bugs.webkit.org/show_bug.cgi?id=118128
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        It is a preparation for a new webkit-patch command: run-tests-touched-by-attachment
     9        https://bugs.webkit.org/show_bug.cgi?id=117831
     10
     11        * Scripts/webkitpy/tool/commands/download.py:
     12        (AbstractPatchSequencingCommand):
     13        (AbstractPatchSequencingCommand._prepare_to_process): Call _prepare_state before prepare_steps.
     14        (AbstractPatchSequencingCommand._process_patch): Use the same initial state for each patch.
     15        (AbstractPatchSequencingCommand._prepare_state): Added.
     16
    1172013-06-27  Brendan Long  <b.long@cablelabs.com>
    218
  • trunk/Tools/Scripts/webkitpy/tool/commands/download.py

    r148441 r152113  
    190190
    191191    def _prepare_to_process(self, options, args, tool):
    192         self._prepare_sequence.run_and_handle_errors(tool, options)
     192        try:
     193            self.state = self._prepare_state(options, args, tool)
     194        except ScriptError, e:
     195            _log.error(e.message_with_output())
     196            self._exit(e.exit_code or 2)
     197        self._prepare_sequence.run_and_handle_errors(tool, options, self.state)
    193198
    194199    def _process_patch(self, patch, options, args, tool):
    195         state = { "patch" : patch }
     200        state = {}
     201        state.update(self.state or {})
     202        state["patch"] = patch
    196203        self._main_sequence.run_and_handle_errors(tool, options, state)
     204
     205    def _prepare_state(self, options, args, tool):
     206        return None
    197207
    198208
Note: See TracChangeset for help on using the changeset viewer.