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

Unified Diff: gcl.py

Issue 502085: Factor out gcl.GetRepositoryRoot() into scm.SVN.GetCheckoutRoot() (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 | « no previous file | scm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 5d147937844b7adacdfe1c1d3a115d760b641688..4258f400eb05b8b439d62b381f6c0ffe816af618 100755
--- a/gcl.py
+++ b/gcl.py
@@ -65,18 +65,9 @@ def GetRepositoryRoot():
"""
global REPOSITORY_ROOT
if not REPOSITORY_ROOT:
- infos = SVN.CaptureInfo(os.getcwd(), print_error=False)
- cur_dir_repo_root = infos.get("Repository Root")
- if not cur_dir_repo_root:
+ REPOSITORY_ROOT = SVN.GetCheckoutRoot(os.getcwd())
+ if not REPOSITORY_ROOT:
raise gclient_utils.Error("gcl run outside of repository")
-
- REPOSITORY_ROOT = os.getcwd()
- while True:
- parent = os.path.dirname(REPOSITORY_ROOT)
- if (SVN.CaptureInfo(parent, print_error=False).get(
- "Repository Root") != cur_dir_repo_root):
- break
- REPOSITORY_ROOT = parent
return REPOSITORY_ROOT
« no previous file with comments | « no previous file | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698