Title: [152113] trunk/Tools
- Revision
- 152113
- Author
- o...@webkit.org
- Date
- 2013-06-27 10:49:51 -0700 (Thu, 27 Jun 2013)
Log 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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (152112 => 152113)
--- trunk/Tools/ChangeLog 2013-06-27 17:47:44 UTC (rev 152112)
+++ trunk/Tools/ChangeLog 2013-06-27 17:49:51 UTC (rev 152113)
@@ -1,3 +1,19 @@
+2013-06-27 Csaba Osztrogonác <o...@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.l...@cablelabs.com>
[Qt] Build overrides -j when given --makeargs="-sj40"
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (152112 => 152113)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2013-06-27 17:47:44 UTC (rev 152112)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2013-06-27 17:49:51 UTC (rev 152113)
@@ -189,13 +189,23 @@
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):
return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes