eclipse-iplog: Require at least one project section

We need at least one project definition to dump out a reasonably
sane IP log file in XML format.

Change-Id: I5cfcd70cd98e29159014cf3dbf0433dd9c49d49c
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-03-11 11:58:09 -08:00
parent c94c631eda
commit 8e2c17ca2a
1 changed files with 6 additions and 0 deletions

View File

@ -211,6 +211,12 @@ private void loadEclipseIpLog(String version, RevCommit commit)
+ " is invalid", e);
}
if (meta.getProjects().isEmpty()) {
throw new ConfigInvalidException("Configuration file "
+ log.getPathString() + " in commit " + commit.name()
+ " has no projects declared.");
}
for (Project p : meta.getProjects()) {
p.setVersion(version);
projects.put(p.getName(), p);