Add more info for debugging
Change-Id: I623a3c63eafb3583e5f6a1ae9bcefee68db10ad9
diff --git a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
index 08c6a24..9cc0a7b 100644
--- a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
+++ b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/ManifestSubscription.java
@@ -92,6 +92,12 @@
return ImmutableSet.copyOf(subscribedRepos.rowKeySet());
}
+ public ImmutableTable<ProjectBranchKey, String, Map<String, Set<
+ com.amd.gerrit.plugins.manifestsubscription.manifest.Project>>> getSubscribedRepos() {
+ return new ImmutableTable.Builder<ProjectBranchKey, String, Map<String, Set<
+ com.amd.gerrit.plugins.manifestsubscription.manifest.Project>>>().putAll(subscribedRepos).build();
+ }
+
@Override
public void start() {
ProjectConfig config;
diff --git a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java
index caaafc0..850507b 100644
--- a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java
+++ b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java
@@ -15,6 +15,9 @@
package com.amd.gerrit.plugins.manifestsubscription;
import com.google.common.base.Throwables;
+import com.google.common.collect.ImmutableCollection;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Maps;
import com.google.gerrit.common.ChangeHooks;
import com.google.gerrit.reviewdb.client.Branch;
@@ -375,7 +378,10 @@
Set<String> repos = manifestSubscription.getEnabledManifestSource();
Set<ProjectBranchKey> projects = manifestSubscription.getSubscribedProjects();
-
+
+ ImmutableTable<ProjectBranchKey, String, Map<String, Set<
+ com.amd.gerrit.plugins.manifestsubscription.manifest.Project>>> subscriptions =
+ manifestSubscription.getSubscribedRepos();
if (inJSON) {
@@ -403,8 +409,19 @@
writer.println("");
writer.println("Monitoring projects:");
- for (ProjectBranchKey project : projects) {
- writer.println(project.getProject() + " | " + project.getBranch());
+ for (ProjectBranchKey pbKey : subscriptions.rowKeySet()) {
+ writer.println(pbKey.getProject() + " | " + pbKey.getBranch());
+ ImmutableCollection<Map<String, Set<com.amd.gerrit.plugins.manifestsubscription.manifest.Project>>> m =
+ subscriptions.row(pbKey).values();
+
+ for (Map<String,
+ Set<com.amd.gerrit.plugins.manifestsubscription.manifest.Project>> i : m) {
+ for (String s : i.keySet()) {
+ writer.println(" - " + s);
+ }
+ }
+
+
}
}