From 9ccea7116a74e07b5a05f9250ca10a94d04d61a2 Mon Sep 17 00:00:00 2001 From: Mikael Karlsson <mikael.karlsson@jayway.com> Date: Sun, 26 Aug 2012 07:59:40 -0400 Subject: [PATCH] Add 2 missing '=' in the English language file. --- src/com/gitblit/SyndicationServlet.java | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java index 66415d1..81cfb76 100644 --- a/src/com/gitblit/SyndicationServlet.java +++ b/src/com/gitblit/SyndicationServlet.java @@ -28,9 +28,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.gitblit.models.FeedEntryModel; import com.gitblit.models.RefModel; import com.gitblit.models.RepositoryModel; -import com.gitblit.models.FeedEntryModel; import com.gitblit.utils.HttpUtils; import com.gitblit.utils.JGitUtils; import com.gitblit.utils.StringUtils; @@ -181,26 +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/plain"; - entry.content = commit.getFullMessage(); + entry.contentType = "text/html"; + 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