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

Unified Diff: gclient_scm.py

Issue 23875041: Added SafeRename to better handle problems with git processes locking directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fixing comment formatting. Created 7 years, 3 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 | gclient_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index bb719ebf7086de0a0f0721d7bb9948939a1eedef..acb31ef15b1d00fdddc381cd1183ed468705a362 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -873,8 +873,8 @@ class GitWrapper(SCMWrapper):
print(str(e))
print('Retrying...')
gclient_utils.safe_makedirs(self.checkout_path)
- os.rename(os.path.join(tmp_dir, '.git'),
- os.path.join(self.checkout_path, '.git'))
+ gclient_utils.safe_rename(os.path.join(tmp_dir, '.git'),
+ os.path.join(self.checkout_path, '.git'))
finally:
if os.listdir(tmp_dir):
print('\n_____ removing non-empty tmp dir %s' % tmp_dir)
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698