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

Unified Diff: git_cache.py

Issue 180243006: Make gclient_scm.py use cache_dir (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Remove cache_locks, also more membership tests. Created 6 years, 10 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 | « gclient_utils.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index 77463a6013780b98e6e63b91bb082a1b6947a7a3..2df8c3c08877a51fbddd09cea02a8ab230742802 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -237,8 +237,9 @@ def CMDunlock(parser, args):
url = args[0]
repo_dirs = [os.path.join(options.cache_dir, UrlToCacheDir(url))]
else:
- repo_dirs = [path for path in os.listdir(options.cache_dir)
- if os.path.isdir(path)]
+ repo_dirs = [os.path.join(options.cache_dir, path)
+ for path in os.listdir(options.cache_dir)
+ if os.path.isdir(os.path.join(options.cache_dir, path))]
lockfiles = [repo_dir + '.lock' for repo_dir in repo_dirs
if os.path.exists(repo_dir + '.lock')]
@@ -252,6 +253,9 @@ def CMDunlock(parser, args):
for repo_dir in repo_dirs:
lf = Lockfile(repo_dir)
if lf.break_lock():
+ config_lock = os.path.join(repo_dir, 'config.lock')
+ if os.path.exists(config_lock):
+ os.remove(config_lock)
unlocked.append(repo_dir)
else:
untouched.append(repo_dir)
« no previous file with comments | « gclient_utils.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698