Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 2181533002: Refactoring: Merge TryJob and Build class and move Build class to buildbot module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 51613655e5364bb977fc03316a3b8485a3797e73..d74524dd3619e9dfe0abbb16ecda962695709de6 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -39,6 +39,7 @@ import urllib2
from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
from webkitpy.common.memoized import memoized
+from webkitpy.common.net.buildbot import Build
from webkitpy.common.system.executive import ScriptError
from webkitpy.layout_tests.controllers.test_result_writer import baseline_name
from webkitpy.layout_tests.models.test_expectations import TestExpectations, BASELINE_SUFFIX_LIST, SKIP
@@ -49,33 +50,6 @@ from webkitpy.tool.commands.command import Command
_log = logging.getLogger(__name__)
-class Build(object):
- """Represents a combination of builder and build number.
-
- If build number is None, this represents the latest build
- for a given builder.
-
- TODO(qyearsley): Move this somewhere else; note it's very similar to TryJob,
- and it seems like it might belong in the buildbot module.
- TODO(qyearsley): Make this a subclass of namedtuple so that __hash__,
- __eq__ and __cmp__ don't need to be explicitly added.
- """
- def __init__(self, builder_name, build_number=None):
- self.builder_name = builder_name
- self.build_number = build_number
-
- # Having __hash__ and __eq__ allow instances of this class to be used
- # as keys in dictionaries.
- def __hash__(self):
- return hash((self.builder_name, self.build_number))
-
- def __eq__(self, other):
- return (self.builder_name, self.build_number) == (other.builder_name, other.build_number)
-
- def __cmp__(self, other):
- return cmp((self.builder_name, self.build_number), (other.builder_name, other.build_number))
-
-
class AbstractRebaseliningCommand(Command):
"""Base class for rebaseline-related commands."""
# Not overriding execute() - pylint: disable=abstract-method
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698