From: James Moger Date: Thu, 10 Nov 2011 21:57:53 +0000 (-0500) Subject: Prefix RSS tags with type information. Include commit id and parents. X-Git-Tag: v0.7.0~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562;p=gitblit.git Prefix RSS tags with type information. Include commit id and parents. --- diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java index 1de3d790..f9ae4e6d 100644 --- a/src/com/gitblit/SyndicationServlet.java +++ b/src/com/gitblit/SyndicationServlet.java @@ -190,18 +190,26 @@ public class SyndicationServlet extends HttpServlet { StringUtils.encodeURL(model.name), commit.getName()); entry.published = commit.getCommitterIdent().getWhen(); entry.contentType = "text/html"; - String message = GitBlit.self().processCommitMessage(model.name, commit.getFullMessage()); + String message = GitBlit.self().processCommitMessage(model.name, + commit.getFullMessage()); entry.content = message; entry.repository = model.name; - entry.branch = objectId; + entry.branch = objectId; + entry.tags = new ArrayList(); + + // add commit id and parent commit ids + entry.tags.add("commit:" + commit.getName()); + for (RevCommit parent : commit.getParents()) { + entry.tags.add("parent:" + parent.getName()); + } + + // add refs to tabs list List refs = allRefs.get(commit.getId()); if (refs != null && refs.size() > 0) { - List tags = new ArrayList(); for (RefModel ref : refs) { - tags.add(ref.getName()); + entry.tags.add("ref:" + ref.getName()); } - entry.tags = tags; - } + } entries.add(entry); } String feedLink;