| OLD | NEW |
| 1 # Copyright (c) 2010 Google Inc. All rights reserved. | 1 # Copyright (c) 2010 Google Inc. All rights reserved. |
| 2 # Copyright (c) 2009 Apple Inc. All rights reserved. | 2 # Copyright (c) 2009 Apple Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 import optparse | 39 import optparse |
| 40 import sys | 40 import sys |
| 41 | 41 |
| 42 from webkitpy.common.host import Host | 42 from webkitpy.common.host import Host |
| 43 from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines | 43 from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines |
| 44 from webkitpy.tool.commands.command import HelpPrintingOptionParser | 44 from webkitpy.tool.commands.command import HelpPrintingOptionParser |
| 45 from webkitpy.tool.commands.commit_announcer import CommitAnnouncerCommand | 45 from webkitpy.tool.commands.commit_announcer import CommitAnnouncerCommand |
| 46 from webkitpy.tool.commands.flaky_tests import FlakyTests | 46 from webkitpy.tool.commands.flaky_tests import FlakyTests |
| 47 from webkitpy.tool.commands.help_command import HelpCommand | 47 from webkitpy.tool.commands.help_command import HelpCommand |
| 48 from webkitpy.tool.commands.layout_tests_server import LayoutTestsServer | 48 from webkitpy.tool.commands.layout_tests_server import LayoutTestsServer |
| 49 from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines |
| 49 from webkitpy.tool.commands.pretty_diff import PrettyDiff | 50 from webkitpy.tool.commands.pretty_diff import PrettyDiff |
| 50 from webkitpy.tool.commands.queries import CrashLog | 51 from webkitpy.tool.commands.queries import CrashLog |
| 51 from webkitpy.tool.commands.queries import PrintBaselines | 52 from webkitpy.tool.commands.queries import PrintBaselines |
| 52 from webkitpy.tool.commands.queries import PrintExpectations | 53 from webkitpy.tool.commands.queries import PrintExpectations |
| 53 from webkitpy.tool.commands.rebaseline_from_try_jobs import RebaselineFromTryJob
s | |
| 54 from webkitpy.tool.commands.rebaseline import AutoRebaseline | 54 from webkitpy.tool.commands.rebaseline import AutoRebaseline |
| 55 from webkitpy.tool.commands.rebaseline import CopyExistingBaselinesInternal | 55 from webkitpy.tool.commands.rebaseline import CopyExistingBaselinesInternal |
| 56 from webkitpy.tool.commands.rebaseline import OptimizeBaselines | |
| 57 from webkitpy.tool.commands.rebaseline import Rebaseline | 56 from webkitpy.tool.commands.rebaseline import Rebaseline |
| 58 from webkitpy.tool.commands.rebaseline import RebaselineExpectations | 57 from webkitpy.tool.commands.rebaseline import RebaselineExpectations |
| 59 from webkitpy.tool.commands.rebaseline import RebaselineJson | 58 from webkitpy.tool.commands.rebaseline import RebaselineJson |
| 60 from webkitpy.tool.commands.rebaseline import RebaselineTest | 59 from webkitpy.tool.commands.rebaseline import RebaselineTest |
| 60 from webkitpy.tool.commands.rebaseline_from_try_jobs import RebaselineFromTryJob
s |
| 61 from webkitpy.tool.commands.rebaseline_server import RebaselineServer | 61 from webkitpy.tool.commands.rebaseline_server import RebaselineServer |
| 62 | 62 |
| 63 | 63 |
| 64 _log = logging.getLogger(__name__) | 64 _log = logging.getLogger(__name__) |
| 65 | 65 |
| 66 | 66 |
| 67 class WebKitPatch(Host): | 67 class WebKitPatch(Host): |
| 68 global_options = [ | 68 global_options = [ |
| 69 optparse.make_option( | 69 optparse.make_option( |
| 70 "-v", "--verbose", action="store_true", dest="verbose", default=Fals
e, | 70 "-v", "--verbose", action="store_true", dest="verbose", default=Fals
e, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 return False | 168 return False |
| 169 if command.requires_local_commits: | 169 if command.requires_local_commits: |
| 170 return self.scm().supports_local_commits() | 170 return self.scm().supports_local_commits() |
| 171 return True | 171 return True |
| 172 | 172 |
| 173 def command_by_name(self, command_name): | 173 def command_by_name(self, command_name): |
| 174 for command in self.commands: | 174 for command in self.commands: |
| 175 if command_name == command.name: | 175 if command_name == command.name: |
| 176 return command | 176 return command |
| 177 return None | 177 return None |
| OLD | NEW |