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

Unified Diff: gclient_scm.py

Issue 7080063: Workaround a git clone bug on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
===================================================================
--- gclient_scm.py (revision 87503)
+++ gclient_scm.py (working copy)
@@ -493,6 +493,12 @@
clone_cmd.append('--verbose')
clone_cmd.extend([url, self.checkout_path])
+ # If the parent directory does not exist, Git clone on Windows will not
+ # 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)
+
for _ in range(3):
try:
self._Run(clone_cmd, options, cwd=self._root_dir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698