summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-12-24 10:25:23 -0500
committerJames Moger <james.moger@gitblit.com>2011-12-24 10:25:23 -0500
commit367505e9d8ae0f83edff1dc2392c4af1f518b4d5 (patch)
tree41af488a062400c8f60f2566739156b0bc6c9dee
parentf7a5d76762da907e8ee78a778d3f7dcbfda910ea (diff)
downloadgitblit-367505e9d8ae0f83edff1dc2392c4af1f518b4d5.tar.gz
gitblit-367505e9d8ae0f83edff1dc2392c4af1f518b4d5.zip
Preliminary update to JGit 1.2.0. This will be refined.
-rw-r--r--.classpath20
-rw-r--r--docs/04_releases.mkd1
-rw-r--r--src/com/gitblit/Constants.java2
-rw-r--r--src/com/gitblit/GitServlet.java60
-rw-r--r--src/com/gitblit/build/Build.java16
5 files changed, 65 insertions, 34 deletions
diff --git a/.classpath b/.classpath
index e6b336c6..d503ab26 100644
--- a/.classpath
+++ b/.classpath
@@ -66,16 +66,6 @@
<attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/googlecharts-1.4.17-javadoc.jar!/"/>
</attributes>
</classpathentry>
- <classpathentry kind="lib" path="ext/org.eclipse.jgit-1.1.0.201109151100-r.jar" sourcepath="ext/org.eclipse.jgit-1.1.0.201109151100-r-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit-1.1.0.201109151100-r-javadoc.jar!/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-1.1.0.201109151100-r.jar" sourcepath="ext/org.eclipse.jgit.http.server-1.1.0.201109151100-r-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit-1.1.0.201109151100-r-javadoc.jar!/"/>
- </attributes>
- </classpathentry>
<classpathentry kind="lib" path="ext/javax.servlet-3.0.1.jar" sourcepath="ext/javax.servlet-3.0.1-sources.jar"/>
<classpathentry kind="lib" path="ext/markdownpapers-core-1.2.5.jar" sourcepath="ext/markdownpapers-core-1.2.5-sources.jar">
<attributes>
@@ -102,5 +92,15 @@
<attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/groovy-all-1.8.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
+ <classpathentry kind="lib" path="ext/org.eclipse.jgit-1.2.0.201112221803-r.jar" sourcepath="ext/org.eclipse.jgit-1.1.0.201109151100-r-sources.jar">
+ <attributes>
+ <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit-1.2.0.201112221803-r-javadoc.jar!/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-1.2.0.201112221803-r.jar" sourcepath="ext/org.eclipse.jgit.http.server-1.2.0.201112221803-r-sources.jar">
+ <attributes>
+ <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit.http.server-1.2.0.201112221803-r-javadoc.jar!/"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index 0ce8621e..ae2821da 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -34,6 +34,7 @@ The original `users.properties` file and it's corresponding implementation are *
**New:** *web.allowFlashCopyToClipboard = true*
- improved: empty repositories now link to a new *empty repository* page which gives some direction to the user for the next step in using Gitblit. This page displays the primary push/clone url of the repository and gives sample syntax for the git command-line client. (issue 31)
- improved: unit testing framework has been migrated to JUnit4 syntax and the test suite has been redesigned to run all unit tests, including rpc, federation, and git push/clone tests
+- updated: JGit 1.2.0
### Older Releases
diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java
index c2d5eb26..8171d667 100644
--- a/src/com/gitblit/Constants.java
+++ b/src/com/gitblit/Constants.java
@@ -37,7 +37,7 @@ public class Constants {
// The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
- public static final String JGIT_VERSION = "JGit 1.1.0 (201109151100-r)";
+ public static final String JGIT_VERSION = "JGit 1.2.0 (201112221803-r)";
public static final String ADMIN_ROLE = "#admin";
diff --git a/src/com/gitblit/GitServlet.java b/src/com/gitblit/GitServlet.java
index 23fb32a6..36e1c3ed 100644
--- a/src/com/gitblit/GitServlet.java
+++ b/src/com/gitblit/GitServlet.java
@@ -26,10 +26,12 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.text.MessageFormat;
import java.util.Collection;
+import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -71,22 +73,9 @@ public class GitServlet extends org.eclipse.jgit.http.server.GitServlet {
private File groovyDir;
- /**
- * Configure the servlet from Gitblit's configuration.
- */
- @Override
- public String getInitParameter(String name) {
- if (name.equals("base-path")) {
- return GitBlit.getRepositoriesFolder().getAbsolutePath();
- } else if (name.equals("export-all")) {
- return "1";
- }
- return super.getInitParameter(name);
- }
-
@Override
public void init(ServletConfig config) throws ServletException {
- groovyDir = GitBlit.getGroovyScriptsFolder();
+ groovyDir = GitBlit.getGroovyScriptsFolder();
try {
gse = new GroovyScriptEngine(groovyDir.getAbsolutePath());
} catch (IOException e) {
@@ -106,7 +95,48 @@ public class GitServlet extends org.eclipse.jgit.http.server.GitServlet {
return rp;
}
});
- super.init(config);
+ super.init(new GitblitServletConfig(config));
+ }
+
+ /**
+ * Transitional wrapper class to configure the JGit 1.2 GitFilter.
+ * This GitServlet will probably be replaced by a GitFilter so that Gitblit
+ * can serve Git repositories on the root URL and not a /git sub-url.
+ *
+ * @author James Moger
+ *
+ */
+ private class GitblitServletConfig implements ServletConfig {
+ final ServletConfig config;
+
+ GitblitServletConfig(ServletConfig config) {
+ this.config = config;
+ }
+
+ @Override
+ public String getServletName() {
+ return config.getServletName();
+ }
+
+ @Override
+ public ServletContext getServletContext() {
+ return config.getServletContext();
+ }
+
+ @Override
+ public String getInitParameter(String name) {
+ if (name.equals("base-path")) {
+ return GitBlit.getRepositoriesFolder().getAbsolutePath();
+ } else if (name.equals("export-all")) {
+ return "1";
+ }
+ return config.getInitParameter(name);
+ }
+
+ @Override
+ public Enumeration<String> getInitParameterNames() {
+ return config.getInitParameterNames();
+ }
}
/**
diff --git a/src/com/gitblit/build/Build.java b/src/com/gitblit/build/Build.java
index 8ca52c32..1f8554c0 100644
--- a/src/com/gitblit/build/Build.java
+++ b/src/com/gitblit/build/Build.java
@@ -457,16 +457,16 @@ public class Build {
"3b7c5f3938f202311bdca0bf7ed46bc0118af081");
public static final MavenObject JGIT = new MavenObject("JGit", "org/eclipse/jgit",
- "org.eclipse.jgit", "1.1.0.201109151100-r", 1318000, 1354000, 3300000,
- "bacc988346c839f79513d7bc7f5c88b22ea6e7a5",
- "90abf988d98ce0d4b162f94f63fc99c435eba6b4",
- "a46540a2857a0fdbf43debf3383295a897946c79");
+ "org.eclipse.jgit", "1.2.0.201112221803-r", 1318000, 1354000, 3300000,
+ "f3bbea50b64c2c8e20176f412d2f063bd132878f",
+ "f6c616413540e226a6b72bc573a40410412e234f",
+ "a77e5ee65ba284d12ae444ac42e12948a9314c20");
public static final MavenObject JGIT_HTTP = new MavenObject("JGit", "org/eclipse/jgit",
- "org.eclipse.jgit.http.server", "1.1.0.201109151100-r", 68000, 62000, 110000,
- "3070161a89756aac2dfc2e26d89faf31fe894ab4",
- "9cecb8e4351e616688cafbcca906f542d9b1f525",
- "20aaab759acd8eb6cb6acbb1b2934a689fb3774d");
+ "org.eclipse.jgit.http.server", "1.2.0.201112221803-r", 68000, 62000, 110000,
+ "0d0004423b71bf7c29cd4ad85010c293c4fab95f",
+ "89be774b6db17bbc47b4757ae9e5178750064880",
+ "4cde29a085200ccf46ac677aeb1abb39352a3a6a");
public static final MavenObject JSCH = new MavenObject("JSch", "com/jcraft", "jsch",
"0.1.44-1", 214000, 211000, 413000, "2e9ae08de5a71bd0e0d3ba2558598181bfa71d4e",