diff options
70 files changed, 830 insertions, 299 deletions
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index 54ac37ce0a..d8caa8bae5 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -3,14 +3,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ant.test -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.ant.tasks;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", + org.eclipse.jgit.ant.tasks;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", org.hamcrest;version="[1.1.0,2.0.0)", org.junit;version="[4.0.0,5.0.0)" diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index f961d55c48..656c6453f8 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant.test</artifactId> diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index 3cfb48fb25..cac99f04d8 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -2,11 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)" + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)" Bundle-Localization: plugin Bundle-Vendor: %Provider-Name -Export-Package: org.eclipse.jgit.ant.tasks;version="3.3.0"; +Export-Package: org.eclipse.jgit.ant.tasks;version="3.3.1"; uses:="org.apache.tools.ant.types,org.apache.tools.ant" diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index f31a45770d..c65c6cbef5 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -48,7 +48,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant</artifactId> diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF index 34b43c29a0..ee4ebc78f8 100644 --- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.archive -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 @@ -12,13 +12,13 @@ Import-Package: org.apache.commons.compress.archivers;version="[1.4,2.0)", org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)", org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)", org.apache.commons.compress.compressors.xz;version="[1.4,2.0)", - org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", + org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", org.osgi.framework;version="[1.3.0,2.0.0)" Bundle-ActivationPolicy: lazy Bundle-Activator: org.eclipse.jgit.archive.FormatActivator -Export-Package: org.eclipse.jgit.archive;version="3.3.0"; +Export-Package: org.eclipse.jgit.archive;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.api, org.apache.commons.compress.archivers, diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF index a88916dc54..fdd8cba5d4 100644 --- a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.archive - Sources Bundle-SymbolicName: org.eclipse.jgit.archive.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.3.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.archive;version="3.3.0";roots="." +Bundle-Version: 3.3.1.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.archive;version="3.3.1";roots="." diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml index 1308478c3c..5bb74a9afd 100644 --- a/org.eclipse.jgit.archive/pom.xml +++ b/org.eclipse.jgit.archive/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.archive</artifactId> diff --git a/org.eclipse.jgit.console/META-INF/MANIFEST.MF b/org.eclipse.jgit.console/META-INF/MANIFEST.MF index 7253f97767..24431ebbc7 100644 --- a/org.eclipse.jgit.console/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.console/META-INF/MANIFEST.MF @@ -3,11 +3,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.console -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.eclipse.jgit.console;version="3.3.0" -Import-Package: org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)" +Export-Package: org.eclipse.jgit.console;version="3.3.1" +Import-Package: org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)" diff --git a/org.eclipse.jgit.console/pom.xml b/org.eclipse.jgit.console/pom.xml index 8a9cf734c0..474bbf2934 100644 --- a/org.eclipse.jgit.console/pom.xml +++ b/org.eclipse.jgit.console/pom.xml @@ -52,7 +52,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.console</artifactId> diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF index a7f22cfcac..a550011715 100644 --- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.http.apache -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-Localization: plugin Bundle-Vendor: %Provider-Name @@ -18,10 +18,10 @@ Import-Package: org.apache.http;version="[4.1.0,5.0.0)", org.apache.http.impl.client;version="[4.1.0,5.0.0)", org.apache.http.impl.client.cache;version="[4.1.0,5.0.0)", org.apache.http.params;version="[4.1.0,5.0.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.http;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)" -Export-Package: org.eclipse.jgit.transport.http.apache;version="3.3.0"; + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.http;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)" +Export-Package: org.eclipse.jgit.transport.http.apache;version="3.3.1"; uses:="org.eclipse.jgit.transport.http, javax.net.ssl, org.apache.http.client, diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml index c184da7466..5fc66f68ab 100644 --- a/org.eclipse.jgit.http.apache/pom.xml +++ b/org.eclipse.jgit.http.apache/pom.xml @@ -48,7 +48,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.apache</artifactId> diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index a9b1fbb865..5b0e370804 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Export-Package: - org.eclipse.jgit.http.server;version="3.3.0", - org.eclipse.jgit.http.server.glue;version="3.3.0"; + org.eclipse.jgit.http.server;version="3.3.1", + org.eclipse.jgit.http.server.glue;version="3.3.1"; uses:="javax.servlet,javax.servlet.http", - org.eclipse.jgit.http.server.resolver;version="3.3.0"; + org.eclipse.jgit.http.server.resolver;version="3.3.1"; uses:="org.eclipse.jgit.transport.resolver, org.eclipse.jgit.lib, org.eclipse.jgit.transport, @@ -18,11 +18,11 @@ Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: javax.servlet;version="[2.5.0,3.0.0)", javax.servlet.http;version="[2.5.0,3.0.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.resolver;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)" + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.resolver;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)" diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index 8e14ce5cfb..24d79bc4dd 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -52,7 +52,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.server</artifactId> diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 4bc2e74593..a12c971892 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 @@ -22,23 +22,23 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)", org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.thread;version="[7.6.0,8.0.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.http.server;version="[3.3.0,3.4.0)", - org.eclipse.jgit.http.server.glue;version="[3.3.0,3.4.0)", - org.eclipse.jgit.http.server.resolver;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit.http;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.http;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.http.apache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.resolver;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.http.server;version="[3.3.1,3.4.0)", + org.eclipse.jgit.http.server.glue;version="[3.3.1,3.4.0)", + org.eclipse.jgit.http.server.resolver;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit.http;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.http;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.http.apache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.resolver;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.0.0,5.0.0)", org.junit.runner;version="[4.0.0,5.0.0)", diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 3ceac222fe..5328dbe9da 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -51,7 +51,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.test</artifactId> diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java new file mode 100644 index 0000000000..108e7bb728 --- /dev/null +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2014, Matthias Sohn <matthias.sohn@sap.com> + * and other copyright owners as documented in the project's IP log. + * + * This program and the accompanying materials are made available + * under the terms of the Eclipse Distribution License v1.0 which + * accompanies this distribution, is reproduced below, and is + * available at http://www.eclipse.org/org/documents/edl-v10.php + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * - Neither the name of the Eclipse Foundation, Inc. nor the + * names of its contributors may be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.eclipse.jgit.http.test; + +import static org.junit.Assert.assertEquals; + +import java.util.Collection; +import java.util.Collections; + +import javax.servlet.http.HttpServletRequest; + +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jgit.errors.RepositoryNotFoundException; +import org.eclipse.jgit.http.server.GitServlet; +import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.junit.http.HttpTestCase; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.NullProgressMonitor; +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.StoredConfig; +import org.eclipse.jgit.revwalk.RevBlob; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.transport.PostReceiveHook; +import org.eclipse.jgit.transport.PushResult; +import org.eclipse.jgit.transport.ReceiveCommand; +import org.eclipse.jgit.transport.ReceivePack; +import org.eclipse.jgit.transport.RemoteRefUpdate; +import org.eclipse.jgit.transport.Transport; +import org.eclipse.jgit.transport.URIish; +import org.eclipse.jgit.transport.resolver.RepositoryResolver; +import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException; +import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException; +import org.junit.Before; +import org.junit.Test; + +public class MeasurePackSizeTest extends HttpTestCase { + private Repository remoteRepository; + + private URIish remoteURI; + + long packSize = -1; + + @Before + public void setUp() throws Exception { + super.setUp(); + + final TestRepository<Repository> src = createTestRepository(); + final String srcName = src.getRepository().getDirectory().getName(); + + ServletContextHandler app = server.addContext("/git"); + GitServlet gs = new GitServlet(); + gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() { + public Repository open(HttpServletRequest req, String name) + throws RepositoryNotFoundException, + ServiceNotEnabledException { + if (!name.equals(srcName)) + throw new RepositoryNotFoundException(name); + + final Repository db = src.getRepository(); + db.incrementOpen(); + return db; + } + }); + gs.setReceivePackFactory(new DefaultReceivePackFactory() { + public ReceivePack create(HttpServletRequest req, Repository db) + throws ServiceNotEnabledException, + ServiceNotAuthorizedException { + ReceivePack recv = super.create(req, db); + recv.setPostReceiveHook(new PostReceiveHook() { + + public void onPostReceive(ReceivePack rp, + Collection<ReceiveCommand> commands) { + packSize = rp.getPackSize(); + } + }); + return recv; + } + + }); + app.addServlet(new ServletHolder(gs), "/*"); + + server.setUp(); + + remoteRepository = src.getRepository(); + remoteURI = toURIish(app, srcName); + + StoredConfig cfg = remoteRepository.getConfig(); + cfg.setBoolean("http", null, "receivepack", true); + cfg.save(); + } + + @Test + public void testPush_packSize() throws Exception { + final TestRepository src = createTestRepository(); + final RevBlob Q_txt = src + .blob("some blob content to measure pack size"); + final RevCommit Q = src.commit().add("Q", Q_txt).create(); + final Repository db = src.getRepository(); + final String dstName = Constants.R_HEADS + "new.branch"; + Transport t; + PushResult result; + + t = Transport.open(db, remoteURI); + try { + final String srcExpr = Q.name(); + final boolean forceUpdate = false; + final String localName = null; + final ObjectId oldId = null; + + RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(), + srcExpr, dstName, forceUpdate, localName, oldId); + result = t.push(NullProgressMonitor.INSTANCE, + Collections.singleton(update)); + } finally { + t.close(); + } + assertEquals("expected 1 RemoteUpdate", 1, result.getRemoteUpdates() + .size()); + assertEquals("unexpected pack size", 1398, packSize); + } + +} diff --git a/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF index 7c4a127a9e..eeabe10b6b 100644 --- a/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF @@ -2,17 +2,17 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.java7.test -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Import-Package: org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.diff;version="[3.3.0,3.4.0)", - org.eclipse.jgit.dircache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="3.3.0", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", +Import-Package: org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.diff;version="[3.3.1,3.4.0)", + org.eclipse.jgit.dircache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="3.3.1", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", org.junit;version="[4.11.0,5.0.0)" diff --git a/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch b/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch new file mode 100644 index 0000000000..d65d045d99 --- /dev/null +++ b/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.jgit.java7.test"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="4"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> +<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.java7.test"/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> +<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.java7.test"/> +</launchConfiguration> diff --git a/org.eclipse.jgit.java7.test/pom.xml b/org.eclipse.jgit.java7.test/pom.xml index c7a045b523..a3da38f277 100644 --- a/org.eclipse.jgit.java7.test/pom.xml +++ b/org.eclipse.jgit.java7.test/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.java7.test</artifactId> diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java index 484467b24c..2b2d65e9b1 100644 --- a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java +++ b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java @@ -114,7 +114,8 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase { assertEquals("link", dci.getEntryPathString()); // test - assertFalse(fti.isModified(dci.getDirCacheEntry(), true)); + assertFalse(fti.isModified(dci.getDirCacheEntry(), true, + db.newObjectReader())); } /** @@ -195,6 +196,7 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase { assertEquals("link", dci.getEntryPathString()); // test - assertTrue(fti.isModified(dci.getDirCacheEntry(), true)); + assertTrue(fti.isModified(dci.getDirCacheEntry(), true, + db.newObjectReader())); } } diff --git a/org.eclipse.jgit.java7/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/MANIFEST.MF index bdb3db04d1..732021f82d 100644 --- a/org.eclipse.jgit.java7/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.java7/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Fragment-Host: org.eclipse.jgit;bundle-version="3.1.1" Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.java7 -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.eclipse.jgit.util;version="3.3.0" +Export-Package: org.eclipse.jgit.util;version="3.3.1" diff --git a/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF index 0a28928d37..852d92a037 100644 --- a/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.java7 - Sources Bundle-SymbolicName: org.eclipse.jgit.java7.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.3.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.3.0";roots="." +Bundle-Version: 3.3.1.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.3.1";roots="." diff --git a/org.eclipse.jgit.java7/pom.xml b/org.eclipse.jgit.java7/pom.xml index 1c5c9d7cb9..42df18d3f9 100644 --- a/org.eclipse.jgit.java7/pom.xml +++ b/org.eclipse.jgit.java7/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.java7</artifactId> diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 61058ed143..22fd07dad8 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy @@ -20,13 +20,13 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)", org.eclipse.jetty.util.component;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)", org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.http.server;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.resolver;version="[3.3.0,3.4.0)", + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.http.server;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.resolver;version="[3.3.1,3.4.0)", org.junit;version="[4.0.0,5.0.0)" -Export-Package: org.eclipse.jgit.junit.http;version="3.3.0" +Export-Package: org.eclipse.jgit.junit.http;version="3.3.1" diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index e103e46d77..dc91e34fd9 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit.http</artifactId> diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index c1a996cfdc..7679630e05 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -2,23 +2,23 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.api.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.dircache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk.filter;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util.io;version="[3.3.0,3.4.0)", +Import-Package: org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.api.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.dircache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk.filter;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util.io;version="[3.3.1,3.4.0)", org.junit;version="[4.0.0,5.0.0)" -Export-Package: org.eclipse.jgit.junit;version="3.3.0" +Export-Package: org.eclipse.jgit.junit;version="3.3.1" diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index 3e084e3b4e..953ad28901 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -52,7 +52,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml index 443fffe07c..ea908c3868 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -57,18 +57,4 @@ version="0.0.0" unpack="false"/> - <plugin - id="org.apache.httpcomponents.httpcore" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.httpcomponents.httpclient" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - </feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml index 564fb76d8a..12148d4a9d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml index 05ee924799..01d7ff0938 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.http.apache" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -33,4 +33,18 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.apache.httpcomponents.httpcore" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.httpcomponents.httpclient" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + </feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml index fcc120c7f3..4c1a5adfaf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml index c9261ec3b8..df749ac67d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.java7" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml index 75c881e33e..191c8b9623 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml index 6877a5f24f..073bac03f8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.junit" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml index 29c74b3931..1a42a1025c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml index 3c6c31082f..869382df6b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.pgm" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -27,7 +27,7 @@ version="0.0.0"/> <requires> - <import feature="org.eclipse.jgit" version="3.3.0" match="equivalent"/> + <import feature="org.eclipse.jgit" version="3.3.1" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml index b6bd572236..d758b8c85b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml index d7ba5e9b81..814f93304b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.pgm.source" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml index 4477fe8df6..c268692137 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index c3f16c283b..b3e876f47e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.repository</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml index 32928663db..c2fed99819 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.source" label="%featureName" - version="3.3.0.qualifier" + version="3.3.1.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml index 77532bb5f4..ff2c333b7b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF index 82e7870c4a..80df938efc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF @@ -2,4 +2,4 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: JGit Target Platform Bundle Bundle-SymbolicName: org.eclipse.jgit.target -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml index 89cbf7b766..a185d9e6b1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -49,7 +49,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.target</artifactId> diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index e6ce495bd7..c3b6ea4a66 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -53,7 +53,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> <packaging>pom</packaging> <name>JGit Tycho Parent</name> diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index 403c2f4638..24e7f29e0a 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -2,25 +2,25 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.dircache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.merge;version="[3.3.0,3.4.0)", - org.eclipse.jgit.pgm;version="[3.3.0,3.4.0)", - org.eclipse.jgit.pgm.internal;version="[3.3.0,3.4.0)", - org.eclipse.jgit.pgm.opt;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util.io;version="[3.3.0,3.4.0)", +Import-Package: org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.dircache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.merge;version="[3.3.1,3.4.0)", + org.eclipse.jgit.pgm;version="[3.3.1,3.4.0)", + org.eclipse.jgit.pgm.internal;version="[3.3.1,3.4.0)", + org.eclipse.jgit.pgm.opt;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util.io;version="[3.3.1,3.4.0)", org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", org.junit;version="[4.4.0,5.0.0)", org.kohsuke.args4j;version="[2.0.12,2.1.0)" diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index 1d88edf159..490b80f5cf 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm.test</artifactId> diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index b4b0766a51..f70e5d9c14 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -2,42 +2,42 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.apache.commons.compress.archivers;version="[1.3,2.0)", org.apache.commons.compress.archivers.tar;version="[1.3,2.0)", org.apache.commons.compress.archivers.zip;version="[1.3,2.0)", - org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.api.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.archive;version="[3.3.0,3.4.0)", - org.eclipse.jgit.awtui;version="[3.3.0,3.4.0)", - org.eclipse.jgit.blame;version="[3.3.0,3.4.0)", - org.eclipse.jgit.diff;version="[3.3.0,3.4.0)", - org.eclipse.jgit.dircache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.merge;version="3.3.0", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.notes;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revplot;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk.filter;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.pack;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.resolver;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk.filter;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util.io;version="[3.3.0,3.4.0)", + org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.api.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.archive;version="[3.3.1,3.4.0)", + org.eclipse.jgit.awtui;version="[3.3.1,3.4.0)", + org.eclipse.jgit.blame;version="[3.3.1,3.4.0)", + org.eclipse.jgit.diff;version="[3.3.1,3.4.0)", + org.eclipse.jgit.dircache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.merge;version="3.3.1", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.notes;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revplot;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk.filter;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.pack;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.resolver;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk.filter;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util.io;version="[3.3.1,3.4.0)", org.kohsuke.args4j;version="[2.0.12,2.1.0)", org.kohsuke.args4j.spi;version="[2.0.12,2.1.0)" Bundle-ActivationPolicy: lazy -Export-Package: org.eclipse.jgit.pgm;version="3.3.0"; +Export-Package: org.eclipse.jgit.pgm;version="3.3.1"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.pgm.opt, @@ -48,10 +48,10 @@ Export-Package: org.eclipse.jgit.pgm;version="3.3.0"; org.eclipse.jgit.treewalk, javax.swing, org.eclipse.jgit.transport", - org.eclipse.jgit.pgm.debug;version="3.3.0"; + org.eclipse.jgit.pgm.debug;version="3.3.1"; uses:="org.eclipse.jgit.pgm", - org.eclipse.jgit.pgm.internal;version="3.3.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", - org.eclipse.jgit.pgm.opt;version="3.3.0"; + org.eclipse.jgit.pgm.internal;version="3.3.1";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", + org.eclipse.jgit.pgm.opt;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.kohsuke.args4j.spi, diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 12814d986b..3f71641971 100644 --- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.pgm - Sources Bundle-SymbolicName: org.eclipse.jgit.pgm.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.3.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.3.0";roots="." +Bundle-Version: 3.3.1.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.3.1";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index f216a9dafa..ee287d6664 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm</artifactId> diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 5453184246..3f2f6ca013 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -2,47 +2,47 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: com.googlecode.javaewah;version="[0.7.9,0.8.0)", - org.eclipse.jgit.api;version="[3.3.0,3.4.0)", - org.eclipse.jgit.api.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.awtui;version="[3.3.0,3.4.0)", - org.eclipse.jgit.blame;version="[3.3.0,3.4.0)", - org.eclipse.jgit.console;version="[3.3.0,3.4.0)", - org.eclipse.jgit.diff;version="[3.3.0,3.4.0)", - org.eclipse.jgit.dircache;version="[3.3.0,3.4.0)", - org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.events;version="[3.3.0,3.4.0)", - org.eclipse.jgit.fnmatch;version="[3.3.0,3.4.0)", - org.eclipse.jgit.ignore;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.dfs;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.internal.storage.pack;version="[3.3.0,3.4.0)", - org.eclipse.jgit.junit;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.merge;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.notes;version="[3.3.0,3.4.0)", - org.eclipse.jgit.patch;version="[3.3.0,3.4.0)", - org.eclipse.jgit.pgm;version="[3.3.0,3.4.0)", - org.eclipse.jgit.pgm.internal;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revplot;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk.filter;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.file;version="[3.3.0,3.4.0)", - org.eclipse.jgit.storage.pack;version="[3.3.0,3.4.0)", - org.eclipse.jgit.submodule;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport.http;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.treewalk.filter;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util.io;version="[3.3.0,3.4.0)", + org.eclipse.jgit.api;version="[3.3.1,3.4.0)", + org.eclipse.jgit.api.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.awtui;version="[3.3.1,3.4.0)", + org.eclipse.jgit.blame;version="[3.3.1,3.4.0)", + org.eclipse.jgit.console;version="[3.3.1,3.4.0)", + org.eclipse.jgit.diff;version="[3.3.1,3.4.0)", + org.eclipse.jgit.dircache;version="[3.3.1,3.4.0)", + org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.events;version="[3.3.1,3.4.0)", + org.eclipse.jgit.fnmatch;version="[3.3.1,3.4.0)", + org.eclipse.jgit.ignore;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.dfs;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.internal.storage.pack;version="[3.3.1,3.4.0)", + org.eclipse.jgit.junit;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.merge;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.notes;version="[3.3.1,3.4.0)", + org.eclipse.jgit.patch;version="[3.3.1,3.4.0)", + org.eclipse.jgit.pgm;version="[3.3.1,3.4.0)", + org.eclipse.jgit.pgm.internal;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revplot;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk.filter;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.file;version="[3.3.1,3.4.0)", + org.eclipse.jgit.storage.pack;version="[3.3.1,3.4.0)", + org.eclipse.jgit.submodule;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport.http;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.treewalk.filter;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util.io;version="[3.3.1,3.4.0)", org.hamcrest;version="[1.1.0,2.0.0)", org.junit;version="[4.4.0,5.0.0)", org.junit.experimental.theories;version="[4.4.0,5.0.0)", diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 55d546b257..29a87e9fd6 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -52,7 +52,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.test</artifactId> diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java index 54de8cfb47..dd06168c30 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java @@ -53,6 +53,7 @@ import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.MergeResult; import org.eclipse.jgit.api.MergeResult.MergeStatus; import org.eclipse.jgit.api.errors.CheckoutConflictException; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.errors.NoMergeBaseException; @@ -264,6 +265,37 @@ public class ResolveMergerTest extends RepositoryTestCase { indexState(CONTENT)); } + @Theory + public void mergeWithCrlfInWT(MergeStrategy strategy) throws IOException, + GitAPIException { + Git git = Git.wrap(db); + db.getConfig().setString("core", null, "autocrlf", "false"); + db.getConfig().save(); + writeTrashFile("crlf.txt", "some\r\ndata\r\n"); + git.add().addFilepattern("crlf.txt").call(); + git.commit().setMessage("base").call(); + + git.branchCreate().setName("brancha").call(); + + writeTrashFile("crlf.txt", "some\r\nmore\r\ndata\r\n"); + git.add().addFilepattern("crlf.txt").call(); + git.commit().setMessage("on master").call(); + + git.checkout().setName("brancha").call(); + writeTrashFile("crlf.txt", "some\r\ndata\r\ntoo\r\n"); + git.add().addFilepattern("crlf.txt").call(); + git.commit().setMessage("on brancha").call(); + + db.getConfig().setString("core", null, "autocrlf", "input"); + db.getConfig().save(); + + MergeResult mergeResult = git.merge().setStrategy(strategy) + .include(db.resolve("master")) + .call(); + assertEquals(MergeResult.MergeStatus.MERGED, + mergeResult.getMergeStatus()); + } + /** * Merging two equal subtrees when the index does not contain any file in * that subtree should lead to a merged state. diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index 9092c82961..7c83babbda 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -3,14 +3,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.eclipse.jgit.awtui;version="3.3.0" -Import-Package: org.eclipse.jgit.errors;version="[3.3.0,3.4.0)", - org.eclipse.jgit.lib;version="[3.3.0,3.4.0)", - org.eclipse.jgit.nls;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revplot;version="[3.3.0,3.4.0)", - org.eclipse.jgit.revwalk;version="[3.3.0,3.4.0)", - org.eclipse.jgit.transport;version="[3.3.0,3.4.0)", - org.eclipse.jgit.util;version="[3.3.0,3.4.0)" +Export-Package: org.eclipse.jgit.awtui;version="3.3.1" +Import-Package: org.eclipse.jgit.errors;version="[3.3.1,3.4.0)", + org.eclipse.jgit.lib;version="[3.3.1,3.4.0)", + org.eclipse.jgit.nls;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revplot;version="[3.3.1,3.4.0)", + org.eclipse.jgit.revwalk;version="[3.3.1,3.4.0)", + org.eclipse.jgit.transport;version="[3.3.1,3.4.0)", + org.eclipse.jgit.util;version="[3.3.1,3.4.0)" diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 29db00fb0a..8a6b452ded 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -52,7 +52,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ui</artifactId> diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 2b05980510..1946db81a0 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.3.1.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name -Export-Package: org.eclipse.jgit.api;version="3.3.0"; +Export-Package: org.eclipse.jgit.api;version="3.3.1"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff, @@ -18,45 +18,45 @@ Export-Package: org.eclipse.jgit.api;version="3.3.0"; org.eclipse.jgit.blame, org.eclipse.jgit.transport, org.eclipse.jgit.merge", - org.eclipse.jgit.api.errors;version="3.3.0"; + org.eclipse.jgit.api.errors;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors", - org.eclipse.jgit.blame;version="3.3.0"; + org.eclipse.jgit.blame;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff", - org.eclipse.jgit.diff;version="3.3.0"; + org.eclipse.jgit.diff;version="3.3.1"; uses:="org.eclipse.jgit.patch, org.eclipse.jgit.lib, org.eclipse.jgit.treewalk, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.util", - org.eclipse.jgit.dircache;version="3.3.0"; + org.eclipse.jgit.dircache;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk, org.eclipse.jgit.util, org.eclipse.jgit.events", - org.eclipse.jgit.errors;version="3.3.0"; + org.eclipse.jgit.errors;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.internal.storage.pack, org.eclipse.jgit.transport, org.eclipse.jgit.dircache", - org.eclipse.jgit.events;version="3.3.0"; + org.eclipse.jgit.events;version="3.3.1"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.fnmatch;version="3.3.0", - org.eclipse.jgit.ignore;version="3.3.0", - org.eclipse.jgit.internal;version="3.3.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test", - org.eclipse.jgit.internal.storage.dfs;version="3.3.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.storage.file;version="3.3.0"; + org.eclipse.jgit.fnmatch;version="3.3.1", + org.eclipse.jgit.ignore;version="3.3.1", + org.eclipse.jgit.internal;version="3.3.1";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test", + org.eclipse.jgit.internal.storage.dfs;version="3.3.1";x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal.storage.file;version="3.3.1"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.junit, org.eclipse.jgit.junit.http, org.eclipse.jgit.http.server, org.eclipse.jgit.java7.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.pack;version="3.3.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", - org.eclipse.jgit.lib;version="3.3.0"; + org.eclipse.jgit.internal.storage.pack;version="3.3.1";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", + org.eclipse.jgit.lib;version="3.3.1"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.util, @@ -65,37 +65,37 @@ Export-Package: org.eclipse.jgit.api;version="3.3.0"; org.eclipse.jgit.internal.storage.file, org.eclipse.jgit.treewalk, org.eclipse.jgit.transport", - org.eclipse.jgit.merge;version="3.3.0"; + org.eclipse.jgit.merge;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk, org.eclipse.jgit.revwalk, org.eclipse.jgit.diff, org.eclipse.jgit.dircache", - org.eclipse.jgit.nls;version="3.3.0", - org.eclipse.jgit.notes;version="3.3.0"; + org.eclipse.jgit.nls;version="3.3.1", + org.eclipse.jgit.notes;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk, org.eclipse.jgit.revwalk, org.eclipse.jgit.merge", - org.eclipse.jgit.patch;version="3.3.0"; + org.eclipse.jgit.patch;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff", - org.eclipse.jgit.revplot;version="3.3.0"; + org.eclipse.jgit.revplot;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk", - org.eclipse.jgit.revwalk;version="3.3.0"; + org.eclipse.jgit.revwalk;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff, org.eclipse.jgit.revwalk.filter", - org.eclipse.jgit.revwalk.filter;version="3.3.0"; + org.eclipse.jgit.revwalk.filter;version="3.3.1"; uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.util", - org.eclipse.jgit.storage.file;version="3.3.0"; + org.eclipse.jgit.storage.file;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util", - org.eclipse.jgit.storage.pack;version="3.3.0"; + org.eclipse.jgit.storage.pack;version="3.3.1"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.submodule;version="3.3.0"; + org.eclipse.jgit.submodule;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk,org.eclipse.jgit.treewalk.filter", - org.eclipse.jgit.transport;version="3.3.0"; + org.eclipse.jgit.transport;version="3.3.1"; uses:="org.eclipse.jgit.transport.resolver, org.eclipse.jgit.revwalk, org.eclipse.jgit.internal.storage.pack, @@ -107,21 +107,21 @@ Export-Package: org.eclipse.jgit.api;version="3.3.0"; org.eclipse.jgit.transport.http, org.eclipse.jgit.errors, org.eclipse.jgit.storage.pack", - org.eclipse.jgit.transport.http;version="3.3.0"; + org.eclipse.jgit.transport.http;version="3.3.1"; uses:="javax.net.ssl", - org.eclipse.jgit.transport.resolver;version="3.3.0"; + org.eclipse.jgit.transport.resolver;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport", - org.eclipse.jgit.treewalk;version="3.3.0"; + org.eclipse.jgit.treewalk;version="3.3.1"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.util, org.eclipse.jgit.dircache", - org.eclipse.jgit.treewalk.filter;version="3.3.0"; + org.eclipse.jgit.treewalk.filter;version="3.3.1"; uses:="org.eclipse.jgit.treewalk", - org.eclipse.jgit.util;version="3.3.0"; + org.eclipse.jgit.util;version="3.3.1"; uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport.http,org.eclipse.jgit.storage.file", - org.eclipse.jgit.util.io;version="3.3.0" + org.eclipse.jgit.util.io;version="3.3.1" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: com.jcraft.jsch;bundle-version="[0.1.37,0.2.0)" diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index d79a190ae8..d4e6c28537 100644 --- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit - Sources Bundle-SymbolicName: org.eclipse.jgit.source;singleton:=true Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 3.3.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit;version="3.3.0";roots="." +Bundle-Version: 3.3.1.qualifier +Eclipse-SourceBundle: org.eclipse.jgit;version="3.3.1";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index c3f681e9c6..43043f971d 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -53,7 +53,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit</artifactId> diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index bb67c127a7..57c08f3691 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -378,6 +378,7 @@ packHasUnresolvedDeltas=pack has unresolved deltas packingCancelledDuringObjectsWriting=Packing cancelled during objects writing packObjectCountMismatch=Pack object count mismatch: pack {0} index {1}: {2} packRefs=Pack refs +packSizeNotSetYet=Pack size not yet set since it has not yet been received packTooLargeForIndexVersion1=Pack too large for index version 1 packWriterStatistics=Total {0,number,#0} (delta {1,number,#0}), reused {2,number,#0} (delta {3,number,#0}) panicCantRenameIndexFile=Panic: index file {0} must be renamed to replace {1}; until then repository is corrupt @@ -403,6 +404,8 @@ readingObjectsFromLocalRepositoryFailed=reading objects from local repository fa readTimedOut=Read timed out after {0} ms receivePackObjectTooLarge1=Object too large, rejecting the pack. Max object size limit is {0} bytes. receivePackObjectTooLarge2=Object too large ({0} bytes), rejecting the pack. Max object size limit is {1} bytes. +receivePackInvalidLimit=Illegal limit parameter value {0} +receivePackTooLarge=Pack exceeds the limit of {0} bytes, rejecting the pack receivingObjects=Receiving objects refAlreadyExists=already exists refAlreadyExists1=Ref {0} already exists diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java new file mode 100644 index 0000000000..5cf0f802c1 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2014, Sasa Zivkov <sasa.zivkov@sap.com>, SAP AG + * and other copyright owners as documented in the project's IP log. + * + * This program and the accompanying materials are made available + * under the terms of the Eclipse Distribution License v1.0 which + * accompanies this distribution, is reproduced below, and is + * available at http://www.eclipse.org/org/documents/edl-v10.php + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * - Neither the name of the Eclipse Foundation, Inc. nor the + * names of its contributors may be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.eclipse.jgit.errors; + +import java.io.IOException; +import java.text.MessageFormat; + +import org.eclipse.jgit.internal.JGitText; + +/** + * Thrown when a pack exceeds a given size limit + * + * @since 3.3 + */ +public class TooLargePackException extends IOException { + private static final long serialVersionUID = 1L; + + /** + * Construct a too large pack exception. + * + * @param packSizeLimit + * the pack size limit (in bytes) that was exceeded + */ + public TooLargePackException(long packSizeLimit) { + super(MessageFormat.format(JGitText.get().receivePackTooLarge, + Long.valueOf(packSizeLimit))); + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index f9700a1ff4..40e74ed892 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -440,6 +440,7 @@ public class JGitText extends TranslationBundle { /***/ public String packingCancelledDuringObjectsWriting; /***/ public String packObjectCountMismatch; /***/ public String packRefs; + /***/ public String packSizeNotSetYet; /***/ public String packTooLargeForIndexVersion1; /***/ public String packWriterStatistics; /***/ public String panicCantRenameIndexFile; @@ -465,6 +466,8 @@ public class JGitText extends TranslationBundle { /***/ public String readTimedOut; /***/ public String receivePackObjectTooLarge1; /***/ public String receivePackObjectTooLarge2; + /***/ public String receivePackInvalidLimit; + /***/ public String receivePackTooLarge; /***/ public String receivingObjects; /***/ public String refAlreadyExists; /***/ public String refAlreadyExists1; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java index 1846c47ed2..a186b81470 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java @@ -169,6 +169,21 @@ public class ObjectDirectoryPackParser extends PackParser { } @Override + public long getPackSize() { + if (newPack == null) + return super.getPackSize(); + + File pack = newPack.getPackFile(); + long size = pack.length(); + String p = pack.getAbsolutePath(); + String i = p.substring(0, p.length() - ".pack".length()) + ".idx"; //$NON-NLS-1$ //$NON-NLS-2$ + File idx = new File(i); + if (idx.exists() && idx.isFile()) + size += idx.length(); + return size; + } + + @Override public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) throws IOException { tmpPack = File.createTempFile("incoming_", ".pack", db.getDirectory()); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java index 414746dc42..a891c85911 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -439,7 +439,7 @@ public class ResolveMerger extends ThreeWayMerger { else { // the preferred version THEIRS has a different mode // than ours. Check it out! - if (isWorktreeDirty(work)) + if (isWorktreeDirty(work, ourDce)) return false; // we know about length and lastMod only after we have written the new content. // This will happen later. Set these values to 0 for know. @@ -477,7 +477,7 @@ public class ResolveMerger extends ThreeWayMerger { // THEIRS. THEIRS is chosen. // Check worktree before checking out THEIRS - if (isWorktreeDirty(work)) + if (isWorktreeDirty(work, ourDce)) return false; if (nonTree(modeT)) { // we know about length and lastMod only after we have written @@ -535,7 +535,7 @@ public class ResolveMerger extends ThreeWayMerger { if (nonTree(modeO) && nonTree(modeT)) { // Check worktree before modifying files - if (isWorktreeDirty(work)) + if (isWorktreeDirty(work, ourDce)) return false; // Don't attempt to resolve submodule link conflicts @@ -566,7 +566,7 @@ public class ResolveMerger extends ThreeWayMerger { // OURS was deleted checkout THEIRS if (modeO == 0) { // Check worktree before checking out THEIRS - if (isWorktreeDirty(work)) + if (isWorktreeDirty(work, ourDce)) return false; if (nonTree(modeT)) { if (e != null) @@ -625,7 +625,8 @@ public class ResolveMerger extends ThreeWayMerger { return isDirty; } - private boolean isWorktreeDirty(WorkingTreeIterator work) { + private boolean isWorktreeDirty(WorkingTreeIterator work, + DirCacheEntry ourDce) throws IOException { if (work == null) return false; @@ -633,9 +634,15 @@ public class ResolveMerger extends ThreeWayMerger { final int modeO = tw.getRawMode(T_OURS); // Worktree entry has to match ours to be considered clean - boolean isDirty = work.isModeDifferent(modeO); - if (!isDirty && nonTree(modeF)) - isDirty = !tw.idEqual(T_FILE, T_OURS); + boolean isDirty; + if (ourDce != null) + isDirty = work.isModified(ourDce, true, reader); + else { + isDirty = work.isModeDifferent(modeO); + if (!isDirty && nonTree(modeF)) + isDirty = !tw.idEqual(T_FILE, T_OURS); + } + // Ignore existing empty directories if (isDirty && modeF == FileMode.TYPE_TREE && modeO == FileMode.TYPE_MISSING) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java index 39e4aadc9d..68b3262a0b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java @@ -55,6 +55,7 @@ import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -65,6 +66,7 @@ import java.util.concurrent.TimeUnit; import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.errors.PackProtocolException; +import org.eclipse.jgit.errors.TooLargePackException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.storage.file.PackLock; import org.eclipse.jgit.lib.BatchRefUpdate; @@ -89,6 +91,7 @@ import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.ReceiveCommand.Result; import org.eclipse.jgit.util.io.InterruptTimer; +import org.eclipse.jgit.util.io.LimitedInputStream; import org.eclipse.jgit.util.io.TimeoutInputStream; import org.eclipse.jgit.util.io.TimeoutOutputStream; @@ -234,6 +237,12 @@ public abstract class BaseReceivePack { /** Git object size limit */ private long maxObjectSizeLimit; + /** Total pack size limit */ + private long maxPackSizeLimit = -1; + + /** The size of the received pack, including index size */ + private Long packSize; + /** * Create a new pack receive for an open repository. * @@ -622,6 +631,24 @@ public abstract class BaseReceivePack { maxObjectSizeLimit = limit; } + + /** + * Set the maximum allowed pack size. + * <p> + * A pack exceeding this size will be rejected. + * + * @param limit + * the pack size limit, in bytes + * + * @since 3.3 + */ + public void setMaxPackSizeLimit(final long limit) { + if (limit < 0) + throw new IllegalArgumentException(MessageFormat.format( + JGitText.get().receivePackInvalidLimit, Long.valueOf(limit))); + maxPackSizeLimit = limit; + } + /** * Check whether the client expects a side-band stream. * @@ -696,6 +723,22 @@ public abstract class BaseReceivePack { return msgOutWrapper; } + /** + * Get the size of the received pack file including the index size. + * + * This can only be called if the pack is already received. + * + * @return the size of the received pack including index size + * @throws IllegalStateException + * if called before the pack has been received + * @since 3.3 + */ + public long getPackSize() { + if (packSize != null) + return packSize.longValue(); + throw new IllegalStateException(JGitText.get().packSizeNotSetYet); + } + /** @return true if any commands to be executed have been read. */ protected boolean hasCommands() { return !commands.isEmpty(); @@ -741,6 +784,14 @@ public abstract class BaseReceivePack { rawOut = o; } + if (maxPackSizeLimit >= 0) + rawIn = new LimitedInputStream(rawIn, maxPackSizeLimit) { + @Override + protected void limitExceeded() throws TooLargePackException { + throw new TooLargePackException(limit); + } + }; + pckIn = new PacketLineIn(rawIn); pckOut = new PacketLineOut(rawOut); pckOut.setFlushOnEnd(false); @@ -936,6 +987,7 @@ public abstract class BaseReceivePack { parser.setLockMessage(lockMsg); parser.setMaxObjectSizeLimit(maxObjectSizeLimit); packLock = parser.parse(receiving, resolving); + packSize = Long.valueOf(parser.getPackSize()); ins.flush(); } finally { ins.release(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java index e16cce0e3d..93522c1e92 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java @@ -419,6 +419,20 @@ public abstract class PackParser { } /** + * Get the size of the parsed pack. + * + * This will also include the pack index size if an index was created. This + * method should only be called after pack parsing is finished. + * + * @return the pack size (including the index size) or -1 if the size cannot + * be determined + * @since 3.3 + */ + public long getPackSize() { + return -1; + } + + /** * Parse the pack stream. * * @param progress diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index a50adf91f4..70f8327b1f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -207,15 +207,6 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } /** - * @return the repository this iterator works with - * - * @since 3.3 - */ - public Repository getRepository() { - return repository; - } - - /** * Define the matching {@link DirCacheIterator}, to optimize ObjectIds. * * Once the DirCacheIterator has been set this iterator must only be @@ -813,7 +804,8 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { @Deprecated public boolean isModified(DirCacheEntry entry, boolean forceContentCheck) { try { - return isModified(entry, forceContentCheck, null); + return isModified(entry, forceContentCheck, + repository.newObjectReader()); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } @@ -923,7 +915,8 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } else { if (mode == FileMode.SYMLINK.getBits()) return !new File(readContentAsNormalizedString(current())) - .equals(new File((readContentAsNormalizedString(entry)))); + .equals(new File((readContentAsNormalizedString(entry, + reader)))); // Content differs: that's a real change, perhaps if (reader == null) // deprecated use, do no further checks return true; @@ -972,9 +965,9 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } } - private String readContentAsNormalizedString(DirCacheEntry entry) - throws MissingObjectException, IOException { - ObjectLoader open = repository.open(entry.getObjectId()); + private static String readContentAsNormalizedString(DirCacheEntry entry, + ObjectReader reader) throws MissingObjectException, IOException { + ObjectLoader open = reader.open(entry.getObjectId()); byte[] cachedBytes = open.getCachedBytes(); return FS.detect().normalize(RawParseUtils.decode(cachedBytes)); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java new file mode 100644 index 0000000000..85c8172042 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2007 The Guava Authors + * Copyright (C) 2014, Sasa Zivkov <sasa.zivkov@sap.com>, SAP AG + * and other copyright owners as documented in the project's IP log. + * + * This program and the accompanying materials are made available + * under the terms of the Eclipse Distribution License v1.0 which + * accompanies this distribution, is reproduced below, and is + * available at http://www.eclipse.org/org/documents/edl-v10.php + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * - Neither the name of the Eclipse Foundation, Inc. nor the + * names of its contributors may be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.eclipse.jgit.util.io; + +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * Wraps a {@link InputStream}, limiting the number of bytes which can be + * read. + * + * This class was copied and modifed from the Google Guava 16.0. Differently from + * the original Guava code, when a caller tries to read from this stream past + * the given limit and the wrapped stream hasn't yet reached its EOF this class + * will call the limitExceeded method instead of returning EOF. + * + * @since 3.3 + */ +public abstract class LimitedInputStream extends FilterInputStream { + + private long left; + /** Max number of bytes to be read from the wrapped stream */ + protected final long limit; + private long mark = -1; + + /** + * Create a new LimitedInputStream + * + * @param in an InputStream + * @param limit max number of bytes to read from the InputStream + */ + protected LimitedInputStream(InputStream in, long limit) { + super(in); + left = limit; + this.limit = limit; + } + + @Override + public int available() throws IOException { + return (int) Math.min(in.available(), left); + } + + // it's okay to mark even if mark isn't supported, as reset won't work + @Override + public synchronized void mark(int readLimit) { + in.mark(readLimit); + mark = left; + } + + @Override + public int read() throws IOException { + if (left == 0) { + if (in.available() == 0) + return -1; + else + limitExceeded(); + } + + int result = in.read(); + if (result != -1) + --left; + return result; + } + + @Override + public int read(byte[] b, int off, int len) throws IOException { + if (left == 0) { + if (in.available() == 0) + return -1; + else + limitExceeded(); + } + + len = (int) Math.min(len, left); + int result = in.read(b, off, len); + if (result != -1) + left -= result; + return result; + } + + @Override + public synchronized void reset() throws IOException { + if (!in.markSupported()) + throw new IOException("Mark not supported"); + + if (mark == -1) + throw new IOException("Mark not set"); + + in.reset(); + left = mark; + } + + @Override + public long skip(long n) throws IOException { + n = Math.min(n, left); + long skipped = in.skip(n); + left -= skipped; + return skipped; + } + + /** + * Called when trying to read past the given {@link #limit} and the wrapped + * InputStream {@link #in} hasn't yet reached its EOF + * + * @throws IOException + * subclasses can throw an IOException when the limit is exceeded. + * The throws IOException will be forwarded back to the caller of + * the read method which read the stream past the limit. + */ + protected abstract void limitExceeded() throws IOException; +} @@ -51,7 +51,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> <packaging>pom</packaging> - <version>3.3.0-SNAPSHOT</version> + <version>3.3.1-SNAPSHOT</version> <name>JGit - Parent</name> <url>${jgit-url}</url> diff --git a/tools/maven-central/deploy.rb b/tools/maven-central/deploy.rb index f169747c79..44abccfc92 100755 --- a/tools/maven-central/deploy.rb +++ b/tools/maven-central/deploy.rb @@ -34,7 +34,7 @@ def get_passphrase(prompt="Enter your GPG Passphrase") ask(prompt) {|q| q.echo = false} end -version = '3.1.0.201310021548-r'.freeze +version = '3.3.0.201403021825-r'.freeze url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' repositoryId = 'sonatype-nexus-staging' puts "gpg passphrase ?" @@ -45,6 +45,7 @@ artifacts = [group, group + '.ant', group + '.archive', group + '.console', + group + '.http.apache', group + '.http.server', group + '.java7', group + '.junit', diff --git a/tools/maven-central/download.rb b/tools/maven-central/download.rb index b5dd871f31..949e6242fa 100755 --- a/tools/maven-central/download.rb +++ b/tools/maven-central/download.rb @@ -1,10 +1,11 @@ #!/usr/bin/env ruby -version = '3.1.0.201310021548-r'.freeze +version = '3.3.0.201403021825-r'.freeze group = 'org.eclipse.jgit' artifacts = [group, group + '.ant', group + '.archive', group + '.console', + group + '.http.apache', group + '.http.server', group + '.java7', group + '.junit', |