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_utils.py

Issue 2786013: Incremental changes towards more efficient refactoring of gclient.py (Closed)
Patch Set: Created 10 years, 6 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 | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 327dfe435d9f245ea754e7fec0fcbef97d3d482a..3297e63872c20363d4810660c23160b95f55806c 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -301,10 +301,10 @@ def IsUsingGit(root, paths):
return True
return False
-def FindGclientRoot(from_dir):
+def FindGclientRoot(from_dir, filename='.gclient'):
"""Tries to find the gclient root."""
path = os.path.realpath(from_dir)
- while not os.path.exists(os.path.join(path, '.gclient')):
+ while not os.path.exists(os.path.join(path, filename)):
next = os.path.split(path)
if not next[1]:
return None
@@ -312,6 +312,7 @@ def FindGclientRoot(from_dir):
logging.info('Found gclient root at ' + path)
return path
+
def PathDifference(root, subpath):
"""Returns the difference subpath minus root."""
root = os.path.realpath(root)
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698