summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.iplog
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-03-11 11:58:09 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-03-11 15:15:03 -0800
commit8e2c17ca2addd984f1ba239aca27f19698606ed9 (patch)
tree0c73320be6a74362e111edb1b8970fbc2976227b /org.eclipse.jgit.iplog
parentc94c631eda9e85b419fa41fa891b07b947ad6242 (diff)
downloadjgit-8e2c17ca2addd984f1ba239aca27f19698606ed9.tar.gz
jgit-8e2c17ca2addd984f1ba239aca27f19698606ed9.zip
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>
Diffstat (limited to 'org.eclipse.jgit.iplog')
-rw-r--r--org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java
index 040887ece4..417c506550 100644
--- a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java
+++ b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java
@@ -211,6 +211,12 @@ public class IpLogGenerator {
+ " 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);