]> source.dussan.org Git - gitblit.git/commitdiff
Update to JGit 2.0.0
authorJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:17:00 +0000 (17:17 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:17:00 +0000 (17:17 -0400)
.classpath
src/com/gitblit/Constants.java
src/com/gitblit/GitBlit.java
src/com/gitblit/build/Build.java
src/com/gitblit/build/BuildGhPages.java
src/com/gitblit/utils/IssueUtils.java
src/com/gitblit/utils/JGitUtils.java

index 37eb634d90a878a30634d53ed886caabfd2efb11..1c3065cf7d489aeb60106f1e5dd9d2b3b6008025 100644 (file)
@@ -26,8 +26,8 @@
        <classpathentry kind="lib" path="ext/jetty-ajp-7.4.3.v20110701.jar" sourcepath="ext/jetty-ajp-7.4.3.v20110701-sources.jar"/>
        <classpathentry kind="lib" path="ext/lucene-core-3.5.0.jar" sourcepath="ext/lucene-core-3.5.0-sources.jar"/>
        <classpathentry kind="lib" path="ext/markdownpapers-core-1.2.7.jar" sourcepath="ext/markdownpapers-core-1.2.7-sources.jar"/>
-       <classpathentry kind="lib" path="ext/org.eclipse.jgit-1.3.0.201202151440-r.jar" sourcepath="ext/org.eclipse.jgit-1.3.0.201202151440-r-sources.jar"/>
-       <classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-1.3.0.201202151440-r.jar" sourcepath="ext/org.eclipse.jgit.http.server-1.3.0.201202151440-r-sources.jar"/>
+       <classpathentry kind="lib" path="ext/org.eclipse.jgit-2.0.0.201206130900-r.jar" sourcepath="ext/org.eclipse.jgit-2.0.0.201206130900-r-sources.jar"/>
+       <classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-2.0.0.201206130900-r.jar" sourcepath="ext/org.eclipse.jgit.http.server-2.0.0.201206130900-r-sources.jar"/>
        <classpathentry kind="lib" path="ext/lucene-highlighter-3.5.0.jar" sourcepath="ext/lucene-highlighter-3.5.0-sources.jar"/>
        <classpathentry kind="lib" path="ext/lucene-memory-3.5.0.jar" sourcepath="ext/lucene-memory-3.5.0-sources.jar"/>
        <classpathentry kind="lib" path="ext/unboundid-ldapsdk-2.3.0.jar" sourcepath="ext/unboundid-ldapsdk-2.3.0-sources.jar"/>
index 772c768d89d9bb6ef7cc28801f6e96454715622c..8153b444f408ac8d150c5fc1585283be732815cb 100644 (file)
@@ -38,7 +38,7 @@ public class Constants {
 \r
        // The build script extracts this exact line so be careful editing it\r
        // and only use A-Z a-z 0-9 .-_ in the string.\r
-       public static final String JGIT_VERSION = "JGit 1.3.0 (201202151440-r)";\r
+       public static final String JGIT_VERSION = "JGit 2.0.0 (201206130900-r)";\r
 \r
        public static final String ADMIN_ROLE = "#admin";\r
 \r
index 27d43c8ec4a50aff6d2eb738bd75e92eb7be39ed..10b1253451385eda8097a7104ec63b8da1c4d67e 100644 (file)
@@ -58,6 +58,7 @@ import org.eclipse.jgit.lib.RepositoryCache.FileKey;
 import org.eclipse.jgit.lib.StoredConfig;\r
 import org.eclipse.jgit.storage.file.WindowCache;\r
 import org.eclipse.jgit.storage.file.WindowCacheConfig;\r
+import org.eclipse.jgit.transport.ServiceMayNotContinueException;\r
 import org.eclipse.jgit.transport.resolver.FileResolver;\r
 import org.eclipse.jgit.transport.resolver.RepositoryResolver;\r
 import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;\r
@@ -783,6 +784,12 @@ public class GitBlit implements ServletContextListener {
                                logger.error("GitBlit.getRepository(String) failed to find "\r
                                                + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
                        }\r
+               } catch (ServiceMayNotContinueException e) {\r
+                       r = null;\r
+                       if (logError) {\r
+                               logger.error("GitBlit.getRepository(String) failed to find "\r
+                                               + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
+                       }\r
                }\r
                return r;\r
        }\r
@@ -1087,6 +1094,8 @@ public class GitBlit implements ServletContextListener {
                                logger.error("Service not authorized", e);\r
                        } catch (ServiceNotEnabledException e) {\r
                                logger.error("Service not enabled", e);\r
+                       } catch (ServiceMayNotContinueException e) {\r
+                               logger.error("Service may not continue", e);\r
                        }\r
                }\r
 \r
index e75c4c4d971bccd6f2ef1ff17f24d241cc9ca7c8..ed54f9ee37df279f87162255aea7bbae4f3473de 100644 (file)
@@ -544,15 +544,15 @@ public class Build {
                                "3b7c5f3938f202311bdca0bf7ed46bc0118af081");\r
 \r
                public static final MavenObject JGIT = new MavenObject("JGit", "org/eclipse/jgit",\r
-                               "org.eclipse.jgit", "1.3.0.201202151440-r", 1532000, 1565000, 3460000,\r
-                               "a00dc524b1d1db1abbf95407aa3e6009c3d2c157",\r
-                               "68864beaa0856f539deafecf9e1fe105a7e996c3",\r
+                               "org.eclipse.jgit", "2.0.0.201206130900-r", 1600000, 1565000, 3460000,\r
+                               "c8934e903ef26ec9aa1d0d3b604979c77eda4137",\r
+                               "7e2c1486bf13e7bbdf39b68554e9010abe385c32",\r
                                "");\r
 \r
                public static final MavenObject JGIT_HTTP = new MavenObject("JGit", "org/eclipse/jgit",\r
-                               "org.eclipse.jgit.http.server", "1.3.0.201202151440-r", 68000, 62000, 110000,\r
-                               "099468bdd59d6f4919d54d5b66022d3ec8077b29",\r
-                               "721ef2b857a7e92989a8f1ee688e361510303bb1",\r
+                               "org.eclipse.jgit.http.server", "2.0.0.201206130900-r", 68000, 62000, 110000,\r
+                               "d42535d996ccfc487092a8850e6e78d368de72d6",\r
+                               "85d5ba16db13144815634aeff31ad6c7d92107e6",\r
                                "");\r
 \r
                public static final MavenObject JSCH = new MavenObject("JSch", "com/jcraft", "jsch",\r
index efeb43c4907089f689133faeea42659691b8487f..5982ac30b94e4c69545f03a4891db52b4fef6826 100644 (file)
@@ -25,12 +25,12 @@ import java.util.List;
 import java.util.Set;\r
 import java.util.TreeSet;\r
 \r
-import org.eclipse.jgit.JGitText;\r
 import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;\r
 import org.eclipse.jgit.api.errors.JGitInternalException;\r
 import org.eclipse.jgit.dircache.DirCache;\r
 import org.eclipse.jgit.dircache.DirCacheBuilder;\r
 import org.eclipse.jgit.dircache.DirCacheEntry;\r
+import org.eclipse.jgit.internal.JGitText;\r
 import org.eclipse.jgit.lib.CommitBuilder;\r
 import org.eclipse.jgit.lib.Constants;\r
 import org.eclipse.jgit.lib.FileMode;\r
index cfd6200df07c6ad17b5ce7ff9b57321bb83040b3..7b24ccf7dcb06fb82ce557e8d076f5ab44c4c845 100644 (file)
@@ -28,12 +28,12 @@ import java.util.Map;
 import java.util.Set;\r
 import java.util.TreeSet;\r
 \r
-import org.eclipse.jgit.JGitText;\r
 import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;\r
 import org.eclipse.jgit.api.errors.JGitInternalException;\r
 import org.eclipse.jgit.dircache.DirCache;\r
 import org.eclipse.jgit.dircache.DirCacheBuilder;\r
 import org.eclipse.jgit.dircache.DirCacheEntry;\r
+import org.eclipse.jgit.internal.JGitText;\r
 import org.eclipse.jgit.lib.CommitBuilder;\r
 import org.eclipse.jgit.lib.Constants;\r
 import org.eclipse.jgit.lib.FileMode;\r
index ab5b655b494f772fa7aa25ff43a272dab5bd5624..62d27da83faad1d63e7dc79639016115162e73c7 100644 (file)
@@ -35,6 +35,7 @@ import java.util.zip.ZipOutputStream;
 import org.eclipse.jgit.api.CloneCommand;\r
 import org.eclipse.jgit.api.FetchCommand;\r
 import org.eclipse.jgit.api.Git;\r
+import org.eclipse.jgit.api.errors.GitAPIException;\r
 import org.eclipse.jgit.diff.DiffEntry;\r
 import org.eclipse.jgit.diff.DiffEntry.ChangeType;\r
 import org.eclipse.jgit.diff.DiffFormatter;\r
@@ -257,8 +258,12 @@ public class JGitUtils {
         * @return Repository\r
         */\r
        public static Repository createRepository(File repositoriesFolder, String name) {\r
-               Git git = Git.init().setDirectory(new File(repositoriesFolder, name)).setBare(true).call();\r
-               return git.getRepository();\r
+               try {\r
+                       Git git = Git.init().setDirectory(new File(repositoriesFolder, name)).setBare(true).call();\r
+                       return git.getRepository();\r
+               } catch (GitAPIException e) {\r
+                       throw new RuntimeException(e);\r
+               }\r
        }\r
 \r
        /**\r