| 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 23 matching lines...) Expand all Loading... |
| 34 expectations, fetching new test baselines, starting a commit-announcer IRC bot, | 34 expectations, fetching new test baselines, starting a commit-announcer IRC bot, |
| 35 etc. These commands don't necessarily have anything to do with each other. | 35 etc. These commands don't necessarily have anything to do with each other. |
| 36 """ | 36 """ |
| 37 | 37 |
| 38 import logging | 38 import logging |
| 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.auto_rebaseline import AutoRebaseline |
| 44 from webkitpy.tool.commands.command import HelpPrintingOptionParser | 45 from webkitpy.tool.commands.command import HelpPrintingOptionParser |
| 45 from webkitpy.tool.commands.commit_announcer import CommitAnnouncerCommand | 46 from webkitpy.tool.commands.commit_announcer import CommitAnnouncerCommand |
| 46 from webkitpy.tool.commands.flaky_tests import FlakyTests | 47 from webkitpy.tool.commands.flaky_tests import FlakyTests |
| 47 from webkitpy.tool.commands.help_command import HelpCommand | 48 from webkitpy.tool.commands.help_command import HelpCommand |
| 48 from webkitpy.tool.commands.layout_tests_server import LayoutTestsServer | 49 from webkitpy.tool.commands.layout_tests_server import LayoutTestsServer |
| 49 from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines | 50 from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines |
| 50 from webkitpy.tool.commands.pretty_diff import PrettyDiff | 51 from webkitpy.tool.commands.pretty_diff import PrettyDiff |
| 51 from webkitpy.tool.commands.queries import CrashLog | 52 from webkitpy.tool.commands.queries import CrashLog |
| 52 from webkitpy.tool.commands.queries import PrintBaselines | 53 from webkitpy.tool.commands.queries import PrintBaselines |
| 53 from webkitpy.tool.commands.queries import PrintExpectations | 54 from webkitpy.tool.commands.queries import PrintExpectations |
| 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 Rebaseline | 56 from webkitpy.tool.commands.rebaseline import Rebaseline |
| 57 from webkitpy.tool.commands.rebaseline import RebaselineExpectations | 57 from webkitpy.tool.commands.rebaseline import RebaselineExpectations |
| 58 from webkitpy.tool.commands.rebaseline import RebaselineJson | 58 from webkitpy.tool.commands.rebaseline import RebaselineJson |
| 59 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 | 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__) |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return False | 172 return False |
| 173 if command.requires_local_commits: | 173 if command.requires_local_commits: |
| 174 return self.scm().supports_local_commits() | 174 return self.scm().supports_local_commits() |
| 175 return True | 175 return True |
| 176 | 176 |
| 177 def command_by_name(self, command_name): | 177 def command_by_name(self, command_name): |
| 178 for command in self.commands: | 178 for command in self.commands: |
| 179 if command_name == command.name: | 179 if command_name == command.name: |
| 180 return command | 180 return command |
| 181 return None | 181 return None |
| OLD | NEW |