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

Unified Diff: gclient.py

Issue 415713002: Added support for relative paths for the .gclient cache_dir field. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Have relative path be relative to root directory Created 6 years, 5 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 b60884a0c2742bd55b43f01ddc5e5380af216bff..8a24a9f0f7a75b92002e3d882e11cc44ef410007 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1162,8 +1162,12 @@ want to set 'managed': False in .gclient.
else:
self._enforced_os = tuple(set(self._enforced_os).union(target_os))
- gclient_scm.GitWrapper.cache_dir = config_dict.get('cache_dir')
- git_cache.Mirror.SetCachePath(config_dict.get('cache_dir'))
+ cache_dir = config_dict.get('cache_dir')
+ if cache_dir:
+ cache_dir = os.path.join(self.root_dir, cache_dir)
+ cache_dir = os.path.abspath(cache_dir)
+ gclient_scm.GitWrapper.cache_dir = cache_dir
+ git_cache.Mirror.SetCachePath(cache_dir)
if not target_os and config_dict.get('target_os_only', False):
raise gclient_utils.Error('Can\'t use target_os_only if target_os is '
« 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