Index: git_cache.py |
diff --git a/git_cache.py b/git_cache.py |
index 21252535f491146eea20efa32179144b8d469827..5d1af238ede978de79aeef8a8df52999a46e9e05 100755 |
--- a/git_cache.py |
+++ b/git_cache.py |
@@ -14,7 +14,6 @@ import re |
import tempfile |
import threading |
import time |
-import shutil |
import subprocess |
import sys |
import urlparse |
@@ -344,14 +343,7 @@ class Mirror(object): |
bootstrapped = not depth and bootstrap and self.bootstrap_repo(tempdir) |
if bootstrapped: |
# Bootstrap succeeded; delete previous cache, if any. |
- try: |
- # Try to move folder to tempdir if possible. |
- defunct_dir = tempfile.mkdtemp() |
- shutil.move(self.mirror_path, defunct_dir) |
- self.print('Moved defunct directory for repository %s from %s to %s' |
- % (self.url, self.mirror_path, defunct_dir)) |
- except Exception: |
- gclient_utils.rmtree(self.mirror_path) |
+ gclient_utils.rmtree(self.mirror_path) |
elif not os.path.exists(config_file): |
# Bootstrap failed, no previous cache; start with a bare git dir. |
self.RunGit(['init', '--bare'], cwd=tempdir) |