From 4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 10 Nov 2011 16:57:53 -0500 Subject: [PATCH] Prefix RSS tags with type information. Include commit id and parents. --- src/com/gitblit/SyndicationServlet.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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; -- 2.39.5