gclient flatten: only print DEPS info referenced by recursedeps

Bug: 756474, 570091
Change-Id: I8777b611f2b77b71cf75ec64ec1f0afca2104235
Reviewed-on: https://chromium-review.googlesource.com/629082
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
changes/82/629082/2
Paweł Hajdan, Jr 8 years ago committed by Commit Bot
parent c1a82cb1a9
commit 0870df2817

@ -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())

Loading…
Cancel
Save