Commit bd60d884 authored by prasadv's avatar prasadv Committed by Commit bot

Remove codes related deleting Blink or WebKit repository while processing revisions.

If the script is switching between Blink and WebKit during bisect, over a year it's been only blink
for chromium and we don't need these codes.

BUG=
NOTRY=true

Review URL: https://codereview.chromium.org/513253003

Cr-Commit-Position: refs/heads/master@{#292476}
parent cfdede2f
...@@ -285,35 +285,6 @@ def RunGClientAndCreateConfig(opts, custom_deps=None, cwd=None): ...@@ -285,35 +285,6 @@ def RunGClientAndCreateConfig(opts, custom_deps=None, cwd=None):
return return_code return return_code
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.
"""
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
}
exec out_put in {}, locals
return search_str in locals['vars'][search_key]
def OnAccessError(func, path, _): def OnAccessError(func, path, _):
"""Error handler for shutil.rmtree. """Error handler for shutil.rmtree.
...@@ -408,10 +379,7 @@ def SetupGitDepot(opts, custom_deps): ...@@ -408,10 +379,7 @@ def SetupGitDepot(opts, custom_deps):
if os.path.isfile(os.path.join('src', FILE_DEPS_GIT)): if os.path.isfile(os.path.join('src', FILE_DEPS_GIT)):
cwd = os.getcwd() cwd = os.getcwd()
os.chdir('src') os.chdir('src')
if not IsDepsFileBlink(): passed_deps_check = True
passed_deps_check = RemoveThirdPartyDirectory('Webkit')
else:
passed_deps_check = True
if passed_deps_check: if passed_deps_check:
passed_deps_check = RemoveThirdPartyDirectory('libjingle') passed_deps_check = RemoveThirdPartyDirectory('libjingle')
if passed_deps_check: if passed_deps_check:
......
...@@ -921,9 +921,6 @@ class BisectPerformanceMetrics(object): ...@@ -921,9 +921,6 @@ class BisectPerformanceMetrics(object):
self.warnings = [] self.warnings = []
self.builder = builder.Builder.FromOpts(opts) self.builder = builder.Builder.FromOpts(opts)
# This always starts true since the script grabs latest first.
self.was_blink = True
for d in DEPOT_NAMES: for d in DEPOT_NAMES:
# The working directory of each depot is just the path to the depot, but # The working directory of each depot is just the path to the depot, but
# since we're already in 'src', we can skip that part. # since we're already in 'src', we can skip that part.
...@@ -1776,29 +1773,6 @@ class BisectPerformanceMetrics(object): ...@@ -1776,29 +1773,6 @@ class BisectPerformanceMetrics(object):
path_to_file = os.path.join(path, cur_file) path_to_file = os.path.join(path, cur_file)
os.remove(path_to_file) os.remove(path_to_file)
def PerformWebkitDirectoryCleanup(self, revision):
"""Cleans up the Webkit directory before syncing another revision.
If the script is switching between Blink and WebKit during bisect,
its faster to just delete the directory rather than leave it up to git
to sync.
Returns:
True if successful.
"""
cwd = os.getcwd()
os.chdir(self.src_cwd)
is_blink = bisect_utils.IsDepsFileBlink(revision)
os.chdir(cwd)
if self.was_blink != is_blink:
self.was_blink = is_blink
# Removes third_party/Webkit directory.
return bisect_utils.RemoveThirdPartyDirectory('Webkit')
return True
def PerformCrosChrootCleanup(self): def PerformCrosChrootCleanup(self):
"""Deletes the chroot. """Deletes the chroot.
...@@ -1841,11 +1815,6 @@ class BisectPerformanceMetrics(object): ...@@ -1841,11 +1815,6 @@ class BisectPerformanceMetrics(object):
# issues syncing when using the git workflow (crbug.com/377951). # issues syncing when using the git workflow (crbug.com/377951).
if not bisect_utils.RemoveThirdPartyDirectory('skia'): if not bisect_utils.RemoveThirdPartyDirectory('skia'):
return False return False
if depot == 'chromium':
# The fast webkit cleanup doesn't work for android_chrome
# The switch from Webkit to Blink that this deals with now happened
# quite a long time ago so this is unlikely to be a problem.
return self.PerformWebkitDirectoryCleanup(revision)
elif depot == 'cros': elif depot == 'cros':
return self.PerformCrosChrootCleanup() return self.PerformCrosChrootCleanup()
return True return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment