Reviewed by Adam Barth.
commit-queue fails to run with "permissions error" due to bad bugzilla-tool path
https://bugs.webkit.org/show_bug.cgi?id=31767
What we really want to test is BugzillaTool.path() instead of TrivialTool.path().
Since we don't have a good way to test BugzillaTool pieces, I've
left out a test for now.
* Scripts/bugzilla-tool:
- Add a path() implementation to expose bugzilla-tool's __file__ path to commit-queue.
* Scripts/modules/commands/queues.py:
- Use tool.path() instead of __file__.
* Scripts/modules/multicommandtool.py:
- Add a new path() method to MultiComandTool.
* Scripts/modules/multicommandtool_unittest.py:
- Provide a path() method. Little point in testing this mock implementation.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51283
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-11-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ commit-queue fails to run with "permissions error" due to bad bugzilla-tool path
+ https://bugs.webkit.org/show_bug.cgi?id=31767
+
+ What we really want to test is BugzillaTool.path() instead of TrivialTool.path().
+ Since we don't have a good way to test BugzillaTool pieces, I've
+ left out a test for now.
+
+ * Scripts/bugzilla-tool:
+ - Add a path() implementation to expose bugzilla-tool's __file__ path to commit-queue.
+ * Scripts/modules/commands/queues.py:
+ - Use tool.path() instead of __file__.
+ * Scripts/modules/multicommandtool.py:
+ - Add a new path() method to MultiComandTool.
+ * Scripts/modules/multicommandtool_unittest.py:
+ - Provide a path() method. Little point in testing this mock implementation.
+
2009-11-21 Adam Barth <abarth@webkit.org>
Unreviewed "build" fix. Turns out I was testing the wrong copy of
return self.cached_scm
+ def path(self):
+ return __file__
+
def should_show_command_help(self, command):
if command.requires_local_commits:
return self.scm().supports_local_commits()
def handle_unexpected_error(self, work_item, message):
raise NotImplementedError, "subclasses must implement"
- @staticmethod
- def run_bugzilla_tool(args):
- bugzilla_tool_path = __file__ # re-execute this script
- bugzilla_tool_args = [bugzilla_tool_path] + args
+ def run_bugzilla_tool(self, args):
+ bugzilla_tool_args = [tool.path()] + args
WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)
def log_progress(self, patch_ids):
return command
return None
+ def path(self):
+ raise NotImplementedError, "subclasses must implement"
+
def should_show_command_help(self, command):
raise NotImplementedError, "subclasses must implement"
def should_execute_command(self, command):
raise NotImplementedError, "subclasses must implement"
-
def main(self, argv=sys.argv):
(global_args, command_name, args_after_command_name) = self._split_args(argv[1:])
def __init__(self, commands=None):
MultiCommandTool.__init__(self, commands)
+ def path():
+ return __file__
+
def should_show_command_help(self, command):
return True