Commit 0870df28 authored by Paweł Hajdan, Jr's avatar Paweł Hajdan, Jr Committed by Commit Bot

gclient flatten: only print DEPS info referenced by recursedeps

Bug: 756474, 570091
Change-Id: I8777b611f2b77b71cf75ec64ec1f0afca2104235
Reviewed-on: https://chromium-review.googlesource.com/629082Reviewed-by: 's avatarMichael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
parent c1a82cb1
......@@ -1768,6 +1768,10 @@ class Flattener(object):
deps_files = set()
def add_deps_file(dep):
# Only include DEPS files referenced by recursedeps.
if not (dep.parent is None or
(dep.name in (dep.parent.recursedeps or {}))):
return
deps_path = os.path.join(self._client.root_dir, dep.name, dep.deps_file)
if not os.path.exists(deps_path):
return
......
......@@ -719,8 +719,6 @@ class GClientSmokeGIT(GClientSmokeBase):
'',
'# git://127.0.0.1:20000/git/repo_2@%s, DEPS' % (
self.githash('repo_2', 1)[:7]),
'# git://127.0.0.1:20000/git/repo_5, DEPS',
'# git://127.0.0.1:20000/git/repo_6, DEPS',
'# git://127.0.0.1:20000/git/repo_8, DEPS'
], deps_contents.splitlines())
......@@ -876,10 +874,6 @@ class GClientSmokeGIT(GClientSmokeBase):
'',
'# git://127.0.0.1:20000/git/repo_2@%s, DEPS' % (
self.githash('repo_2', 1)),
'# git://127.0.0.1:20000/git/repo_5@%s, DEPS' % (
self.githash('repo_5', 3)),
'# git://127.0.0.1:20000/git/repo_6@%s, DEPS' % (
self.githash('repo_6', 1)),
'# git://127.0.0.1:20000/git/repo_8@%s, DEPS' % (
self.githash('repo_8', 1)),
], deps_contents.splitlines())
......@@ -977,11 +971,7 @@ class GClientSmokeGIT(GClientSmokeBase):
'',
'}',
'',
'# git://127.0.0.1:20000/git/repo_10, DEPS',
'# git://127.0.0.1:20000/git/repo_11, DEPS',
'# git://127.0.0.1:20000/git/repo_5, DEPS',
'# git://127.0.0.1:20000/git/repo_6, DEPS',
'# git://127.0.0.1:20000/git/repo_7, DEPS',
'# git://127.0.0.1:20000/git/repo_8, DEPS',
'# git://127.0.0.1:20000/git/repo_9, DEPS',
], deps_contents.splitlines())
......
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