From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit, gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command
---
src/com/gitblit/SyndicationServlet.java | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java
index 39e37ca..f9ae4e6 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.SyndicatedEntryModel;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
@@ -169,7 +169,7 @@
offset, length);
}
Map<ObjectId, List<RefModel>> allRefs = JGitUtils.getAllRefs(repository);
- List<SyndicatedEntryModel> entries = new ArrayList<SyndicatedEntryModel>();
+ List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();
boolean mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true);
String urlPattern;
@@ -183,24 +183,33 @@
String gitblitUrl = HttpUtils.getGitblitURL(request);
// convert RevCommit to SyndicatedEntryModel
for (RevCommit commit : commits) {
- SyndicatedEntryModel entry = new SyndicatedEntryModel();
+ 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());
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