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

Unified Diff: gclient_utils.py

Issue 501171: Add full_move flag to GIT.GenerateDiff and Factor out FindGclientRootDir into gclient_utils. (Closed)
Patch Set: Created 11 years 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 | « gcl.py ('k') | scm.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 4944cf96744b4771402fd9c8ad33cbccbc879af5..97d05edd12893eef56e7b4543cbae3db94b30411 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -307,3 +307,13 @@ def IsUsingGit(root, paths):
if os.path.exists(os.path.join(root, path, '.git')):
return True
return False
+
+def FindGclientRoot(from_dir):
+ """Tries to find the gclient root."""
+ path = os.path.realpath(from_dir)
+ while not os.path.exists(os.path.join(path, '.gclient')):
+ next = os.path.split(path)
+ if not next[1]:
+ return None
+ path = next[0]
+ return path
« no previous file with comments | « gcl.py ('k') | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698