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

Unified Diff: gclient.py

Issue 3357005: Revert "Do not blindly assume that a .gclient file in a parent directory belongsto the cu..." (Closed)
Patch Set: Created 10 years, 4 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 | tests/gclient_smoketest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 3cabc14ae8c27eaa63e13e8713a33636f7766466..5ca7036357d05d77fa594638cfda2a0491f285b2 100644
--- a/gclient.py
+++ b/gclient.py
@@ -621,24 +621,13 @@ solutions = [
def LoadCurrentConfig(options):
"""Searches for and loads a .gclient file relative to the current working
dir. Returns a GClient object."""
- cwd = os.getcwd()
- path = gclient_utils.FindGclientRoot(cwd, options.config_filename)
+ path = gclient_utils.FindGclientRoot(os.getcwd(), options.config_filename)
if not path:
return None
client = GClient(path, options)
client.SetConfig(gclient_utils.FileRead(
os.path.join(path, options.config_filename)))
- if path == cwd:
- return client
- # Validate the current directory we are in belongs to the .gclient file we
- # found.
- cwd = cwd[len(path)+1:]
- all_solutions = [d.name for d in client.tree(False)]
- while len(cwd):
- if cwd in all_solutions:
- return client
- cwd = os.path.dirname(cwd)
- return None
+ return client
def SetDefaultConfig(self, solution_name, solution_url, safesync_url):
self.SetConfig(self.DEFAULT_CLIENT_FILE_TEXT % {
« no previous file with comments | « no previous file | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698