optionally do not collapse pre-releases

Add an option to avoid collapsing pre-releases to allow the command line
query interface to have full access to all of the data.

Change-Id: I526b55924ba4b5749d8293b211a004517e760fd2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann
2016-11-21 12:19:20 -05:00
parent 5cedf7f6ae
commit 93311929e6

View File

@@ -95,8 +95,9 @@ def _collapse_deliverable_history(name, info):
class Deliverables(object):
def __init__(self, root_dir):
def __init__(self, root_dir, collapse_history=True):
self._root_dir = root_dir
self._collapse_history = collapse_history
# Map team names to a list of all of their deliverables.
self._team_deliverables = collections.defaultdict(set)
@@ -119,7 +120,8 @@ class Deliverables(object):
deliverable = self._deliverable_from_filename(filename)
with open(filename, 'r') as f:
d_info = yaml.load(f.read())
_collapse_deliverable_history(deliverable, d_info)
if self._collapse_history:
_collapse_deliverable_history(deliverable, d_info)
team = d_info['team']
self._add_deliverable_file(
filename, series, team, deliverable, d_info,