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

Unified Diff: gclient.py

Issue 500903002: Force break git cache locks when CHROME_HEADLESS is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index fb9775945bc53aacc13eaf89d35bf0c31e6271f1..bb62b2ba5dc171d39b04d3026aa539323cbd74f9 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1221,6 +1221,9 @@ want to set 'managed': False in .gclient.
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.environ.get('CHROME_HEADLESS'):
+ subprocess2.check_call(['git', 'cache', 'unlock', '--force', '--all'])
gclient_scm.GitWrapper.cache_dir = cache_dir
git_cache.Mirror.SetCachePath(cache_dir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698