From 77ce4bdc7d9cffd415e9c5b01db1ce1e8717addd Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Mon, 27 Nov 2017 12:38:18 -0800 Subject: [PATCH] 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 Commit-Queue: Andrii Shyshkalov --- gclient.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gclient.py b/gclient.py index 4a5ccb0026..cc072e85c7 100755 --- a/gclient.py +++ b/gclient.py @@ -1330,10 +1330,7 @@ it or fix the checkout. 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)