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

Unified Diff: gclient.py

Issue 500015: gclient: implement a less hacky relative URL implementation (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 | gclient_scm.py » ('j') | gclient_utils.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 8090d202f20c897306bebe06942cd8b1d8587556..56924dca4a880fc7ee102208862ab7e57f3694e4 100755
--- a/gclient.py
+++ b/gclient.py
@@ -518,6 +518,11 @@ class GClient(object):
solution_deps_content[solution["name"]],
custom_vars)
+ local_scope = {}
M-A Ruel 2009/12/15 18:49:42 I would have preferred to have this code moved int
Mandeep Singh Baines 2009/12/15 20:54:30 Good idea. I'll send out a CL to do this.
+ var = self._VarImpl(custom_vars, local_scope)
+ global_scope = {"From": self.FromImpl, "Var": var.Lookup, "deps_os": {}}
+ exec(solution_deps_content[solution["name"]], global_scope, local_scope)
+
# If a line is in custom_deps, but not in the solution, we want to append
# this line to the solution.
if "custom_deps" in solution:
@@ -555,10 +560,10 @@ class GClient(object):
if path[0] != "/":
raise gclient_utils.Error(
"relative DEPS entry \"%s\" must begin with a slash" % d)
- # Create a scm just to query the full url.
- scm = gclient_scm.CreateSCM(solution["url"], self._root_dir,
- None)
- url = scm.FullUrlForRelativeUrl(url)
+ if local_scope.get('use_relative_urls2'):
+ url = gclient_utils.FullUrlFromRelative2(solution["url"], url)
+ else:
+ url = gclient_utils.FullUrlFromRelative(solution["url"], url)
if d in deps and deps[d] != url:
raise gclient_utils.Error(
"Solutions have conflicting versions of dependency \"%s\"" % d)
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | gclient_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698