]> source.dussan.org Git - jgit.git/commitdiff
In iplog list approved CQs as "active" 26/2426/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 6 Feb 2011 00:19:52 +0000 (01:19 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 6 Feb 2011 00:21:30 +0000 (01:21 +0100)
Change-Id: I69c60576ae648fea2a730c9e9f042004bccecc90
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java

index 66345bb7dca049251f26921a9e0f0cb3b2b8bf7c..06d5393ca7e36bd8296516bf94de12b65bc2a2db 100644 (file)
@@ -552,11 +552,18 @@ public class IpLogGenerator {
                required(r, "description", cq.getDescription());
                optional(r, "license", cq.getLicense());
                optional(r, "use", cq.getUse());
-               optional(r, "state", cq.getState());
+               optional(r, "state", mapCQState(cq.getState()));
                optional(r, "comments", cq.getComments());
                return r;
        }
 
+       private String mapCQState(String state) {
+               // "approved" CQs shall be listed as "active" in the iplog
+               if (state.equals("approved"))
+                       return "active";
+               return state;
+       }
+
        private Element createCommitter(Committer who) {
                Element r = createElement("committer");
                required(r, "id", who.getID());