gclient on bots: don't cleanup lock files.
bot_update & gclient on bots instruct git cache locks
to be ignored, so there is no need to clean them up.
R=hinoka@chromium.org
Change-Id: I81c52cfcd44a42d13b641847439ac92053a7bc98
Reviewed-on: https://chromium-review.googlesource.com/791652
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/gclient.py b/gclient.py
index 4a5ccb0..cc072e8 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1330,10 +1330,7 @@
if cache_dir:
cache_dir = os.path.join(self.root_dir, cache_dir)
cache_dir = os.path.abspath(cache_dir)
- # If running on a bot, force break any stale git cache locks.
- if os.path.exists(cache_dir) and os.environ.get('CHROME_HEADLESS'):
- subprocess2.check_call(['git', 'cache', 'unlock', '--cache-dir',
- cache_dir, '--force', '--all'])
+
gclient_scm.GitWrapper.cache_dir = cache_dir
git_cache.Mirror.SetCachePath(cache_dir)