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

Unified Diff: gclient_scm.py

Issue 226613011: gclient: fix deletion warning for checkouts created with "gclient config --name ." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 8 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
diff --git a/gclient_scm.py b/gclient_scm.py
index ab07b830dad4d296bf295af53a3b061a37d57d5a..e0a90912e7488082dd324fed7e4d8b50fc8ec8e2 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -353,7 +353,10 @@ class GitWrapper(SCMWrapper):
not os.path.exists(os.path.join(self.checkout_path, '.git')))):
if (os.path.isdir(self.checkout_path) and
not os.path.exists(os.path.join(self.checkout_path, '.git'))):
- self._DeleteOrMove(options.force)
+ # This is a little hack to work around checkouts which are created
+ # using "gclient config --name ."
+ if not self.relpath == '.':
+ self._DeleteOrMove(options.force)
self._Clone(revision, url, options)
self._UpdateBranchHeads(options, fetch=True)
if file_list is not None:
« 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