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

Unified Diff: gclient_scm.py

Issue 9692022: If a subdir exists and is empty, go ahead and clone into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 9 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 126269)
+++ gclient_scm.py (working copy)
@@ -219,7 +219,9 @@
# hash is also a tag, only make a distinction at checkout
rev_type = "hash"
- if not os.path.exists(self.checkout_path):
+ if not os.path.exists(self.checkout_path) or (
+ os.path.isdir(self.checkout_path) and
+ not os.listdir(self.checkout_path)):
gclient_utils.safe_makedirs(os.path.dirname(self.checkout_path))
self._Clone(revision, url, options)
files = self._Capture(['ls-files']).splitlines()
« 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