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

Unified Diff: tools/auto_bisect/bisect_utils.py

Issue 503283002: Update bisect script to handle deleted .DEPS.git from chromium source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | 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_utils.py
diff --git a/tools/auto_bisect/bisect_utils.py b/tools/auto_bisect/bisect_utils.py
index 56a4cd8519c53766fb4aeaa09fab04dc3b948b1d..a0017012d352a94ad7ea971ac5d85c8255021335 100644
--- a/tools/auto_bisect/bisect_utils.py
+++ b/tools/auto_bisect/bisect_utils.py
@@ -285,18 +285,34 @@ def RunGClientAndCreateConfig(opts, custom_deps=None, cwd=None):
return return_code
-def IsDepsFileBlink():
+def IsDepsFileBlink(git_revision=''):
"""Reads .DEPS.git and returns whether or not we're using blink.
+ Args:
+ git_revision: A git hash revision of chromium.
Returns:
True if blink, false if webkit.
"""
- locals = {
+ git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, FILE_DEPS_GIT)]
+ search_str = 'blink.git'
+ search_key = 'webkit_url'
+ (out_put, ret_val) = RunGit(git_cmd)
+ if ret_val:
+ search_str = 'blink'
+ search_key = 'webkit_trunk'
+ git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, 'FILE_DEPS')]
+ (out_put, ret_val) = RunGit(git_cmd)
+ if ret_val:
+ print 'Error processing DEPS or .DEPS.git'
+ return False
+ locals = {
'Var': lambda _: locals["vars"][_],
'From': lambda *args: None
}
- execfile(FILE_DEPS_GIT, {}, locals)
- return 'blink.git' in locals['vars']['webkit_url']
+
+ exec out_put in {}, locals
+
+ return search_str in locals['vars'][search_key]
def OnAccessError(func, path, _):
« no previous file with comments | « no previous file | tools/auto_bisect/source_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698