From f4c326e2b6167b2eda1135b6d332ebce7a583dd9 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 07 Sep 2012 22:00:24 -0400
Subject: [PATCH] Updated classpath for Jetty 7.6.5
---
src/com/gitblit/SyndicationServlet.java | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java
index 1de3d79..81cfb76 100644
--- a/src/com/gitblit/SyndicationServlet.java
+++ b/src/com/gitblit/SyndicationServlet.java
@@ -181,27 +181,36 @@
urlPattern = "{0}/commit/?r={1}&h={2}";
}
String gitblitUrl = HttpUtils.getGitblitURL(request);
+ char fsc = GitBlit.getChar(Keys.web.forwardSlashCharacter, '/');
// convert RevCommit to SyndicatedEntryModel
for (RevCommit commit : commits) {
FeedEntryModel entry = new FeedEntryModel();
entry.title = commit.getShortMessage();
entry.author = commit.getAuthorIdent().getName();
entry.link = MessageFormat.format(urlPattern, gitblitUrl,
- StringUtils.encodeURL(model.name), commit.getName());
+ StringUtils.encodeURL(model.name.replace('/', fsc)), 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;
--
Gitblit v1.9.1