Index: tools/bisect-perf-regression.py |
diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py |
index 17805f4c752301bb4712ce3177906658395748ff..2f126ec3a7e598e4d143dd1985c49aa7834ea2fc 100755 |
--- a/tools/bisect-perf-regression.py |
+++ b/tools/bisect-perf-regression.py |
@@ -1427,8 +1427,8 @@ class BisectPerformanceMetrics(object): |
# e.g. for webkit the format is "webkit_revision": "12345". |
deps_revision = re.compile(r'(?<="%s": ")([0-9]+)(?=")' % deps_var, |
re.MULTILINE) |
- match = re.search(deps_revision, deps_contents) |
- if match: |
+ new_data = None |
+ if re.search(deps_revision, deps_contents): |
svn_revision = self.source_control.SVNFindRev( |
revision, self._GetDepotDirectory(depot)) |
if not svn_revision: |
@@ -1436,7 +1436,17 @@ class BisectPerformanceMetrics(object): |
return False |
# Update the revision information for the given depot |
new_data = re.sub(deps_revision, str(svn_revision), deps_contents) |
- |
+ else: |
+ # Check whether the depot and revision pattern in DEPS file vars |
+ # e.g. for webkit the format is "webkit_revision": "559a6d4ab7a84c539..". |
+ deps_revision = re.compile( |
+ r'(?<=[",\']%s[",\']: [",\'])([a-fA-F0-9]{40})(?=[",\'])' % |
qyearsley
2014/09/03 01:40:36
1. The character class [",\'] in this regex matche
prasadv
2014/09/03 22:10:14
Done.
|
+ deps_var, |
+ re.MULTILINE) |
+ if re.search(deps_revision, deps_contents): |
+ new_data = re.sub(deps_revision, revision, deps_contents) |
+ |
+ if new_data: |
# For v8_bleeding_edge revisions change V8 branch in order |
# to fetch bleeding edge revision. |
if depot == 'v8_bleeding_edge': |
@@ -2468,7 +2478,6 @@ class BisectPerformanceMetrics(object): |
# should bisect the changes there as well. |
external_depot = self._FindNextDepotToBisect( |
current_depot, min_revision_data, max_revision_data) |
- |
# If there was no change in any of the external depots, the search |
# is over. |
if not external_depot: |