Commit 767024c6 authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

Revert "[gclient] Make getdep and setdep to provide builtin vars"

This reverts commit 5705acab.

Reason for revert: breaks internal bots, e.g. see http://shortn/_KDb4blyDVz

Original change's description:
> [gclient] Make getdep and setdep to provide builtin vars
> 
> Bug: 906114
> Change-Id: I069cc21343911f7fdb3c91ecbd8fcba53fc8099f
> Reviewed-on: https://chromium-review.googlesource.com/c/1340461
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Eric Boren <borenet@chromium.org>

TBR=borenet@chromium.org,ehmaldonado@chromium.org

Change-Id: I233ae7feae296fb4cd04b9b36d7f53d1114df5ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 906114
Reviewed-on: https://chromium-review.googlesource.com/c/1340506Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
parent 801b5ddb
......@@ -2831,9 +2831,7 @@ def CMDgetdep(parser, args):
'DEPS file %s does not exist.' % options.deps_file)
with open(options.deps_file) as f:
contents = f.read()
client = GClient.LoadCurrentConfig(options)
local_scope = gclient_eval.Exec(contents, options.deps_file,
builtin_vars=client.get_builtin_vars())
local_scope = gclient_eval.Exec(contents, options.deps_file)
for var in options.vars:
print(gclient_eval.GetVar(local_scope, var))
......@@ -2883,9 +2881,7 @@ def CMDsetdep(parser, args):
'DEPS file %s does not exist.' % options.deps_file)
with open(options.deps_file) as f:
contents = f.read()
client = GClient.LoadCurrentConfig(options)
local_scope = gclient_eval.Exec(contents, options.deps_file,
builtin_vars=client.get_builtin_vars())
local_scope = gclient_eval.Exec(contents, options.deps_file)
for var in options.vars:
name, _, value = var.partition('=')
......
......@@ -881,7 +881,6 @@ class GClientSmokeGIT(GClientSmokeBase):
self.assertEqual(out, output_json)
def testSetDep(self):
self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
fake_deps = os.path.join(self.root_dir, 'DEPS.fake')
with open(fake_deps, 'w') as f:
f.write('\n'.join([
......@@ -895,12 +894,6 @@ class GClientSmokeGIT(GClientSmokeBase):
' },',
' "bar": "url@bar_rev",',
'}',
'hooks = [{',
' "name": "uses_builtin_var",',
' "pattern": ".",',
' "action": ["python", "fake.py",',
' "--with-android={checkout_android}"],',
'}]',
]))
results = self.gclient([
......@@ -923,16 +916,9 @@ class GClientSmokeGIT(GClientSmokeBase):
' },',
' "bar": "url@new_bar",',
'}',
'hooks = [{',
' "name": "uses_builtin_var",',
' "pattern": ".",',
' "action": ["python", "fake.py",',
' "--with-android={checkout_android}"],',
'}]',
], contents)
def testGetDep(self):
self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
fake_deps = os.path.join(self.root_dir, 'DEPS.fake')
with open(fake_deps, 'w') as f:
f.write('\n'.join([
......@@ -946,12 +932,6 @@ class GClientSmokeGIT(GClientSmokeBase):
' },',
' "bar": "url@bar_rev",',
'}',
'hooks = [{',
' "name": "uses_builtin_var",',
' "pattern": ".",',
' "action": ["python", "fake.py",',
' "--with-android={checkout_android}"],',
'}]',
]))
results = self.gclient([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment