Commit d915ccad authored by dyen@chromium.org's avatar dyen@chromium.org

Added support for relative paths for the .gclient cache_dir field.

R=iannucci@chromium.org
BUG=None
TEST=gclient sync with a relative and absolute "cache_dir"

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@288146 0039d316-1c4b-4281-b951-d872f2087c98
parent f3145116
......@@ -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 '
......
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