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

Unified Diff: tools/auto_bisect/bisect_results.py

Issue 650223005: Refactor source_control.py and add a test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 2 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 | « tools/auto_bisect/bisect_perf_regression_test.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/bisect_results.py
diff --git a/tools/auto_bisect/bisect_results.py b/tools/auto_bisect/bisect_results.py
index 144962fd7038fa516f57b955830031fc8b5aeedb..59cb94d7db07fa024ab389f283bf9f5eb8779f46 100644
--- a/tools/auto_bisect/bisect_results.py
+++ b/tools/auto_bisect/bisect_results.py
@@ -7,6 +7,7 @@ import os
import bisect_utils
import math_utils
+import source_control
import ttest
@@ -48,11 +49,10 @@ def ConfidenceScore(good_results_lists, bad_results_lists):
class BisectResults(object):
- def __init__(self, depot_registry, source_control):
+ def __init__(self, depot_registry):
self._depot_registry = depot_registry
self.revision_data = {}
self.error = None
- self._source_control = source_control
@staticmethod
def _FindOtherRegressions(revision_data_sorted, bad_greater_than_good):
@@ -232,7 +232,7 @@ class BisectResults(object):
changes.append([last_depot, contents[0]])
for c in changes:
os.chdir(c[0])
- info = self._source_control.QueryRevisionInfo(c[1])
+ info = source_control.QueryRevisionInfo(c[1])
culprit_revisions.append((c[1], info, None))
else:
for i in xrange(last_broken_revision_index, len(revision_data_sorted)):
@@ -240,7 +240,7 @@ class BisectResults(object):
if k == first_working_revision:
break
self._depot_registry.ChangeToDepotDir(v['depot'])
- info = self._source_control.QueryRevisionInfo(k)
+ info = source_control.QueryRevisionInfo(k)
culprit_revisions.append((k, info, v['depot']))
os.chdir(cwd)
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression_test.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698