Commit ca529ecf authored by ossy@webkit.org's avatar ossy@webkit.org

[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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9c8071f4
2013-06-27 Csaba Osztrogonác <ossy@webkit.org>
[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.
2013-06-27 Brendan Long <b.long@cablelabs.com>
[Qt] Build overrides -j when given --makeargs="-sj40"
......
......@@ -189,12 +189,22 @@ class AbstractPatchSequencingCommand(AbstractPatchProcessingCommand):
AbstractPatchProcessingCommand.__init__(self, options)
def _prepare_to_process(self, options, args, tool):
self._prepare_sequence.run_and_handle_errors(tool, options)
try:
self.state = self._prepare_state(options, args, tool)
except ScriptError, e:
_log.error(e.message_with_output())
self._exit(e.exit_code or 2)
self._prepare_sequence.run_and_handle_errors(tool, options, self.state)
def _process_patch(self, patch, options, args, tool):
state = { "patch" : patch }
state = {}
state.update(self.state or {})
state["patch"] = patch
self._main_sequence.run_and_handle_errors(tool, options, state)
def _prepare_state(self, options, args, tool):
return None
class ProcessAttachmentsMixin(object):
def _fetch_list_of_patches_to_process(self, options, args, tool):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment