summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-11-10 16:57:53 -0500
committerJames Moger <james.moger@gitblit.com>2011-11-10 16:57:53 -0500
commit4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562 (patch)
tree26aae4fd327d076475a919ab87ae917181cff9da /src
parenta568f2ac97f4c7b73ee0cdf2007f553bb8c81c2c (diff)
downloadgitblit-4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562.tar.gz
gitblit-4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562.zip
Prefix RSS tags with type information. Include commit id and parents.
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/SyndicationServlet.java20
1 files 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<String>();
+
+ // 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<RefModel> refs = allRefs.get(commit.getId());
if (refs != null && refs.size() > 0) {
- List<String> tags = new ArrayList<String>();
for (RefModel ref : refs) {
- tags.add(ref.getName());
+ entry.tags.add("ref:" + ref.getName());
}
- entry.tags = tags;
- }
+ }
entries.add(entry);
}
String feedLink;