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/wicket/pages/PatchPage.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/com/gitblit/wicket/pages/PatchPage.java b/src/com/gitblit/wicket/pages/PatchPage.java
index 02e4d38..878cfb4 100644
--- a/src/com/gitblit/wicket/pages/PatchPage.java
+++ b/src/com/gitblit/wicket/pages/PatchPage.java
@@ -22,6 +22,7 @@
import org.eclipse.jgit.revwalk.RevCommit;
import com.gitblit.GitBlit;
+import com.gitblit.utils.DiffUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
@@ -33,7 +34,7 @@
super(params);
if (!params.containsKey("r")) {
- GitBlitWebSession.get().cacheErrorMessage("Repository not specified!");
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.repositoryNotSpecified"));
redirectToInterceptPage(new RepositoriesPage());
return;
}
@@ -45,14 +46,14 @@
Repository r = GitBlit.self().getRepository(repositoryName);
if (r == null) {
- GitBlitWebSession.get().cacheErrorMessage("Can not load repository " + repositoryName);
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.canNotLoadRepository") + " " + repositoryName);
redirectToInterceptPage(new RepositoriesPage());
return;
}
RevCommit commit = JGitUtils.getCommit(r, objectId);
if (commit == null) {
- GitBlitWebSession.get().cacheErrorMessage("Commit is null");
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.commitIsNull"));
redirectToInterceptPage(new RepositoriesPage());
return;
}
@@ -61,7 +62,7 @@
if (!StringUtils.isEmpty(baseObjectId)) {
baseCommit = JGitUtils.getCommit(r, baseObjectId);
}
- String patch = JGitUtils.getCommitPatch(r, baseCommit, commit, blobPath);
+ String patch = DiffUtils.getCommitPatch(r, baseCommit, commit, blobPath);
add(new Label("patchText", patch));
r.close();
}
--
Gitblit v1.9.1