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

Unified Diff: gclient_scm.py

Issue 8359018: Fix a concurrency issue happening with deep dependencies when the intermediary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 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 8519fa9d04a5b627fb2f331cc340a311a1d32a68..546aa08cd7b06ec4cf43933ad7a1b8b5fbfb7c02 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -213,6 +213,7 @@ class GitWrapper(SCMWrapper):
rev_type = "hash"
if not os.path.exists(self.checkout_path):
+ gclient_utils.safe_makedirs(os.path.dirname(self.checkout_path))
self._Clone(revision, url, options)
files = self._Capture(['ls-files']).splitlines()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
@@ -508,7 +509,7 @@ class GitWrapper(SCMWrapper):
# create it, so we need to do it manually.
parent_dir = os.path.dirname(self.checkout_path)
if not os.path.exists(parent_dir):
- os.makedirs(parent_dir)
+ gclient_utils.safe_makedirs(parent_dir)
percent_re = re.compile('.* ([0-9]{1,2})% .*')
def _GitFilter(line):
@@ -775,6 +776,7 @@ class SVNWrapper(SCMWrapper):
rev_str = ''
if not os.path.exists(self.checkout_path):
+ gclient_utils.safe_makedirs(os.path.dirname(self.checkout_path))
# We need to checkout.
command = ['checkout', url, self.checkout_path]
command = self._AddAdditionalUpdateFlags(command, options, revision)
@@ -906,7 +908,7 @@ class SVNWrapper(SCMWrapper):
# information is not stored next to the file, so we will have to
# re-export the file every time we sync.
if not os.path.exists(self.checkout_path):
- os.makedirs(self.checkout_path)
+ gclient_utils.safe_makedirs(self.checkout_path)
command = ["export", os.path.join(self.url, filename),
os.path.join(self.checkout_path, filename)]
command = self._AddAdditionalUpdateFlags(command, options,
« 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