Merge branch 'master' into stable-6.0
* master: Add 4.22 target platform for 2021-12 Update Orbit to R20211122181901 for 2021-12 AppServer: fix keystore used to setup test SSL context factory [6.0 API cleanup] Public interface for PackLock [6.0 API cleanup] StoredObjectRepresentationNotAvailableException RepoCommand: Do not wrap GitApiExceptions in GitApiExceptions Set JSch global config values only if not set already Better git system config finding [6.0 API cleanup] CancelledException vs. CanceledException Javadoc fixes Better git system config finding HttpClientConnectionTest: organize imports Update Jetty to 10.0.6 Fix missing @since 6.0 tag Support commit.template config property DFS block cache: harden against race over ref locks. Change-Id: Id9814d92eb40b2ba63c5e753a86a4809826e7c81
This commit is contained in:
commit
751e3ad5d1
30
WORKSPACE
30
WORKSPACE
|
@ -243,55 +243,55 @@ maven_jar(
|
||||||
sha1 = "431fc3cbc0ff81abdbfde070062741089c3ba874",
|
sha1 = "431fc3cbc0ff81abdbfde070062741089c3ba874",
|
||||||
)
|
)
|
||||||
|
|
||||||
JETTY_VER = "9.4.44.v20210927"
|
JETTY_VER = "10.0.6"
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-servlet",
|
name = "jetty-servlet",
|
||||||
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
|
||||||
sha1 = "1cb43a0d74b7395c7207dbf3dc2ca97eac89f5fd",
|
sha1 = "482165726bf54dd10ee7e2aeb4ae9481eee0c878",
|
||||||
src_sha1 = "2bbc54fc1835c963744a4e82ba2541e94fcbcf9b",
|
src_sha1 = "8a8173a0bc6c0d215fc9fb9ba5fd50bae1690f9c",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-security",
|
name = "jetty-security",
|
||||||
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
|
||||||
sha1 = "ecb80b8e008daa46e95e5691b2611d4007922497",
|
sha1 = "513f44ed9636ca5e0adefa0c0b81511065dfddd2",
|
||||||
src_sha1 = "d67d4705a08d9b76592b3e177e2bb1aac968d832",
|
src_sha1 = "2e7eb2edbf1592e15b338096651e379fea860859",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-server",
|
name = "jetty-server",
|
||||||
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
|
||||||
sha1 = "0bf2de0d31925a8ca71ad80f721236850b636e0d",
|
sha1 = "125ee07e4d8182a6afca00d543f6a4dcc84f2678",
|
||||||
src_sha1 = "3582cbf081cf3652f6507093585c2a0f3b8738bb",
|
src_sha1 = "5c0789872ec6743ae893131ae81262aaefc87fe6",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-http",
|
name = "jetty-http",
|
||||||
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
|
||||||
sha1 = "37f0e30cdc02128e40d095ad63cb18e10ecb7726",
|
sha1 = "4c8eed25d577002a6c0f9f3ef340eb581390f696",
|
||||||
src_sha1 = "7f1a6e3ab54e541f33b8ed100d553d4034d2e3a9",
|
src_sha1 = "ac7214d6202ee0cbc4bdbcf90c7906ca716e84e5",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-io",
|
name = "jetty-io",
|
||||||
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
|
||||||
sha1 = "a2ec01e2b5552b777a3d7085163f80756ef8c1ce",
|
sha1 = "1ab82ae5dfdbb07f0ffa07f28274fdf30e3e96ee",
|
||||||
src_sha1 = "6262966b3cd10ff6b98f0bed428640bbbe4f7e79",
|
src_sha1 = "c59082f3a09c024fafc281f432b67432d398b8c0",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-util",
|
name = "jetty-util",
|
||||||
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
|
||||||
sha1 = "3c7151c5a04a93119988b48a1577a972d90f8990",
|
sha1 = "4e2935749ea1c9fcabba61a857f8283c7f5f9885",
|
||||||
src_sha1 = "f7f0420221772bc63ebae21571bb9925ca971a82",
|
src_sha1 = "6baba651899c044e14ba37d43934950670d2aa4e",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "jetty-util-ajax",
|
name = "jetty-util-ajax",
|
||||||
artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER,
|
artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER,
|
||||||
sha1 = "ed2f30e8eef939ab2825e607d83f82f85167e2c0",
|
sha1 = "a801d4b5f5e906f134713ae82fd1ea10a15902c6",
|
||||||
src_sha1 = "1a48ae7a45683d20afb90784d1db314be2c73c92",
|
src_sha1 = "f35f5525a5d30dc1237b85457d758d578e3ce8d0",
|
||||||
)
|
)
|
||||||
|
|
||||||
BOUNCYCASTLE_VER = "1.69"
|
BOUNCYCASTLE_VER = "1.69"
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
JUnit tests for the various ant tasks.
|
JUnit tests for the various ant tasks.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -16,8 +16,8 @@ Export-Package: org.eclipse.jgit.http.server;version="6.0.0",
|
||||||
javax.servlet.http"
|
javax.servlet.http"
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
|
Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
|
||||||
javax.servlet.http;version="[2.5.0,3.2.0)",
|
javax.servlet.http;version="[2.5.0,5.0.0)",
|
||||||
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.internal.storage.dfs;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -7,27 +7,25 @@ Bundle-Version: 6.0.0.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
|
Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
|
||||||
javax.servlet.http;version="[2.5.0,3.2.0)",
|
javax.servlet.http;version="[2.5.0,5.0.0)",
|
||||||
org.apache.commons.codec;version="[1.6.0,2.0.0)",
|
org.apache.commons.codec;version="[1.6.0,2.0.0)",
|
||||||
org.apache.commons.codec.binary;version="[1.6.0,2.0.0)",
|
org.apache.commons.codec.binary;version="[1.6.0,2.0.0)",
|
||||||
org.apache.http;version="[4.3.0,5.0.0)",
|
org.apache.http;version="[4.3.0,5.0.0)",
|
||||||
org.apache.http.client;version="[4.4.0,5.0.0)",
|
org.apache.http.client;version="[4.4.0,5.0.0)",
|
||||||
org.apache.http.message;version="[4.3.0,5.0.0)",
|
org.apache.http.message;version="[4.3.0,5.0.0)",
|
||||||
org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
|
|
||||||
org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
|
|
||||||
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -9,6 +9,13 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.jgit.transport.http.apache;
|
package org.eclipse.jgit.transport.http.apache;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.ProtocolVersion;
|
import org.apache.http.ProtocolVersion;
|
||||||
|
@ -16,13 +23,6 @@
|
||||||
import org.apache.http.message.AbstractHttpMessage;
|
import org.apache.http.message.AbstractHttpMessage;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
public class HttpClientConnectionTest {
|
public class HttpClientConnectionTest {
|
||||||
@Test
|
@Test
|
||||||
public void testGetHeaderFieldsAllowMultipleValues()
|
public void testGetHeaderFieldsAllowMultipleValues()
|
||||||
|
|
|
@ -8,20 +8,19 @@ Bundle-Localization: plugin
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
|
Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
|
||||||
javax.servlet.http;version="[2.5.0,3.2.0)",
|
javax.servlet.http;version="[2.5.0,5.0.0)",
|
||||||
org.apache.commons.logging;version="[1.1.1,2.0.0)",
|
org.apache.commons.logging;version="[1.1.1,2.0.0)",
|
||||||
org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.ssl;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)",
|
|
||||||
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.errors;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.http.server;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -21,20 +21,23 @@
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpVersion;
|
|
||||||
import org.eclipse.jetty.security.AbstractLoginService;
|
import org.eclipse.jetty.security.AbstractLoginService;
|
||||||
import org.eclipse.jetty.security.Authenticator;
|
import org.eclipse.jetty.security.Authenticator;
|
||||||
import org.eclipse.jetty.security.ConstraintMapping;
|
import org.eclipse.jetty.security.ConstraintMapping;
|
||||||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||||
|
import org.eclipse.jetty.security.RolePrincipal;
|
||||||
|
import org.eclipse.jetty.security.UserPrincipal;
|
||||||
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
|
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
|
||||||
import org.eclipse.jetty.server.Connector;
|
import org.eclipse.jetty.server.Connector;
|
||||||
import org.eclipse.jetty.server.HttpConfiguration;
|
import org.eclipse.jetty.server.HttpConfiguration;
|
||||||
import org.eclipse.jetty.server.HttpConnectionFactory;
|
import org.eclipse.jetty.server.HttpConnectionFactory;
|
||||||
|
import org.eclipse.jetty.server.SecureRequestCustomizer;
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.ServerConnector;
|
import org.eclipse.jetty.server.ServerConnector;
|
||||||
import org.eclipse.jetty.server.SslConnectionFactory;
|
import org.eclipse.jetty.server.SslConnectionFactory;
|
||||||
|
@ -143,13 +146,15 @@ public AppServer(int port, int sslPort) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sslPort >= 0) {
|
if (sslPort >= 0) {
|
||||||
SslContextFactory sslContextFactory = createTestSslContextFactory(
|
SslContextFactory.Server sslContextFactory = createTestSslContextFactory(
|
||||||
hostName);
|
hostName, ip);
|
||||||
secureConfig = new HttpConfiguration(config);
|
secureConfig = new HttpConfiguration(config);
|
||||||
secureConnector = new ServerConnector(server,
|
secureConfig.addCustomizer(new SecureRequestCustomizer());
|
||||||
new SslConnectionFactory(sslContextFactory,
|
HttpConnectionFactory http11 = new HttpConnectionFactory(
|
||||||
HttpVersion.HTTP_1_1.asString()),
|
secureConfig);
|
||||||
new HttpConnectionFactory(secureConfig));
|
SslConnectionFactory tls = new SslConnectionFactory(
|
||||||
|
sslContextFactory, http11.getProtocol());
|
||||||
|
secureConnector = new ServerConnector(server, tls, http11);
|
||||||
secureConnector.setPort(sslPort);
|
secureConnector.setPort(sslPort);
|
||||||
secureConnector.setHost(ip);
|
secureConnector.setHost(ip);
|
||||||
} else {
|
} else {
|
||||||
|
@ -171,10 +176,11 @@ public AppServer(int port, int sslPort) {
|
||||||
server.setHandler(log);
|
server.setHandler(log);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SslContextFactory createTestSslContextFactory(String hostName) {
|
private SslContextFactory.Server createTestSslContextFactory(
|
||||||
SslContextFactory.Client factory = new SslContextFactory.Client(true);
|
String hostName, String ip) {
|
||||||
|
SslContextFactory.Server factory = new SslContextFactory.Server();
|
||||||
|
|
||||||
String dName = "CN=,OU=,O=,ST=,L=,C=";
|
String dName = "CN=localhost,OU=JGit,O=Eclipse,ST=Ontario,L=Toronto,C=CA";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File tmpDir = Files.createTempDirectory("jks").toFile();
|
File tmpDir = Files.createTempDirectory("jks").toFile();
|
||||||
|
@ -190,6 +196,11 @@ private SslContextFactory createTestSslContextFactory(String hostName) {
|
||||||
"-keystore", keyStore.getAbsolutePath(), //
|
"-keystore", keyStore.getAbsolutePath(), //
|
||||||
"-storepass", keyPassword,
|
"-storepass", keyPassword,
|
||||||
"-alias", hostName, //
|
"-alias", hostName, //
|
||||||
|
"-ext", "bc=ca:true", //
|
||||||
|
"-ext",
|
||||||
|
String.format(
|
||||||
|
"san=ip:%s,ip:127.0.0.1,ip:[::1],DNS:%s",
|
||||||
|
ip, hostName), //
|
||||||
"-genkeypair", //
|
"-genkeypair", //
|
||||||
"-keyalg", "RSA", //
|
"-keyalg", "RSA", //
|
||||||
"-keypass", keyPassword, //
|
"-keypass", keyPassword, //
|
||||||
|
@ -260,12 +271,12 @@ public ServletContextHandler authBasic(ServletContextHandler ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
static class TestMappedLoginService extends AbstractLoginService {
|
static class TestMappedLoginService extends AbstractLoginService {
|
||||||
private String role;
|
private RolePrincipal role;
|
||||||
|
|
||||||
protected final Map<String, UserPrincipal> users = new ConcurrentHashMap<>();
|
protected final Map<String, UserPrincipal> users = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
TestMappedLoginService(String role) {
|
TestMappedLoginService(String role) {
|
||||||
this.role = role;
|
this.role = new RolePrincipal(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -277,16 +288,16 @@ protected void doStart() throws Exception {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String[] loadRoleInfo(UserPrincipal user) {
|
protected UserPrincipal loadUserInfo(String user) {
|
||||||
if (users.get(user.getName()) == null) {
|
return users.get(user);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new String[] { role };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected UserPrincipal loadUserInfo(String user) {
|
protected List<RolePrincipal> loadRoleInfo(UserPrincipal user) {
|
||||||
return users.get(user);
|
if (users.get(user.getName()) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return Collections.singletonList(role);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,27 +7,25 @@ Bundle-Version: 6.0.0.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
|
Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
|
||||||
javax.servlet.http;version="[3.1.0,4.0.0)",
|
javax.servlet.http;version="[3.1.0,5.0.0)",
|
||||||
org.apache.http;version="[4.4.0,5.0.0)",
|
org.apache.http;version="[4.4.0,5.0.0)",
|
||||||
org.apache.http.client;version="[4.4.0,5.0.0)",
|
org.apache.http.client;version="[4.4.0,5.0.0)",
|
||||||
org.apache.http.client.methods;version="[4.4.0,5.0.0)",
|
org.apache.http.client.methods;version="[4.4.0,5.0.0)",
|
||||||
org.apache.http.entity;version="[4.4.0,5.0.0)",
|
org.apache.http.entity;version="[4.4.0,5.0.0)",
|
||||||
org.apache.http.impl.client;version="[4.4.0,5.0.0)",
|
org.apache.http.impl.client;version="[4.4.0,5.0.0)",
|
||||||
org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.http;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.http;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.io;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.io;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.security.authentication;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
|
|
||||||
org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
|
|
||||||
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.internal.storage.file;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
Tests for the LFS server.
|
Tests for the LFS server.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -20,9 +20,9 @@ Export-Package: org.eclipse.jgit.lfs.server;version="6.0.0";
|
||||||
org.eclipse.jgit.lfs.lib"
|
org.eclipse.jgit.lfs.lib"
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
|
Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
|
||||||
javax.servlet;version="[3.1.0,4.0.0)",
|
javax.servlet;version="[3.1.0,5.0.0)",
|
||||||
javax.servlet.annotation;version="[3.1.0,4.0.0)",
|
javax.servlet.annotation;version="[3.1.0,5.0.0)",
|
||||||
javax.servlet.http;version="[3.1.0,4.0.0)",
|
javax.servlet.http;version="[3.1.0,5.0.0)",
|
||||||
org.apache.http;version="[4.3.0,5.0.0)",
|
org.apache.http;version="[4.3.0,5.0.0)",
|
||||||
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.annotations;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.internal;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
Tests for the Large File Extension (LFS).
|
Tests for the Large File Extension (LFS).
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -75,10 +75,52 @@
|
||||||
<bundle id="javaewah.source">
|
<bundle id="javaewah.source">
|
||||||
<category name="JGit-dependency-bundles"/>
|
<category name="JGit-dependency-bundles"/>
|
||||||
</bundle>
|
</bundle>
|
||||||
<bundle id="javax.servlet">
|
<bundle id="jakarta.servlet-api">
|
||||||
<category name="JGit-dependency-bundles"/>
|
<category name="JGit-dependency-bundles"/>
|
||||||
</bundle>
|
</bundle>
|
||||||
<bundle id="javax.servlet.source">
|
<bundle id="jakarta.servlet-api.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.http">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.http.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.io">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.io.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.security">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.security.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.server">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.server.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.servlet">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.servlet.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.util">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.util.source">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.util.ajax">
|
||||||
|
<category name="JGit-dependency-bundles"/>
|
||||||
|
</bundle>
|
||||||
|
<bundle id="org.eclipse.jetty.util.ajax.source">
|
||||||
<category name="JGit-dependency-bundles"/>
|
<category name="JGit-dependency-bundles"/>
|
||||||
</bundle>
|
</bundle>
|
||||||
<bundle id="net.i2p.crypto.eddsa">
|
<bundle id="net.i2p.crypto.eddsa">
|
||||||
|
|
|
@ -1,28 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde?>
|
<?pde?>
|
||||||
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
<target name="jgit-4.17" sequenceNumber="1636551936">
|
<target name="jgit-4.17" sequenceNumber="1637746569">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
|
|
||||||
<repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
|
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javax.servlet" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
target "jgit-4.17" with source configurePhase
|
target "jgit-4.17" with source configurePhase
|
||||||
|
|
||||||
include "projects/jetty-9.4.x.tpd"
|
include "projects/jetty-10.0.x.tpd"
|
||||||
include "orbit/S20211108222137.tpd"
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
location "https://download.eclipse.org/releases/2020-09/" {
|
location "https://download.eclipse.org/releases/2020-09/" {
|
||||||
org.eclipse.osgi lazy
|
org.eclipse.osgi lazy
|
||||||
|
|
|
@ -1,28 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde?>
|
<?pde?>
|
||||||
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
<target name="jgit-4.18" sequenceNumber="1636551936">
|
<target name="jgit-4.18" sequenceNumber="1637746569">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
|
|
||||||
<repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
|
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javax.servlet" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
target "jgit-4.18" with source configurePhase
|
target "jgit-4.18" with source configurePhase
|
||||||
|
|
||||||
include "projects/jetty-9.4.x.tpd"
|
include "projects/jetty-10.0.x.tpd"
|
||||||
include "orbit/S20211108222137.tpd"
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
location "https://download.eclipse.org/releases/2020-12/" {
|
location "https://download.eclipse.org/releases/2020-12/" {
|
||||||
org.eclipse.osgi lazy
|
org.eclipse.osgi lazy
|
||||||
|
|
|
@ -1,28 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde?>
|
<?pde?>
|
||||||
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
<target name="jgit-4.19-staging" sequenceNumber="1636551936">
|
<target name="jgit-4.19-staging" sequenceNumber="1637746569">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
|
|
||||||
<repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
|
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javax.servlet" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
target "jgit-4.19-staging" with source configurePhase
|
target "jgit-4.19-staging" with source configurePhase
|
||||||
|
|
||||||
include "projects/jetty-9.4.x.tpd"
|
include "projects/jetty-10.0.x.tpd"
|
||||||
include "orbit/S20211108222137.tpd"
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
location "https://download.eclipse.org/staging/2021-03/" {
|
location "https://download.eclipse.org/staging/2021-03/" {
|
||||||
org.eclipse.osgi lazy
|
org.eclipse.osgi lazy
|
||||||
|
|
|
@ -1,28 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde?>
|
<?pde?>
|
||||||
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
<target name="jgit-4.20" sequenceNumber="1636551936">
|
<target name="jgit-4.20" sequenceNumber="1637746569">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
|
|
||||||
<repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
|
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javax.servlet" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
target "jgit-4.20" with source configurePhase
|
target "jgit-4.20" with source configurePhase
|
||||||
|
|
||||||
include "projects/jetty-9.4.x.tpd"
|
include "projects/jetty-10.0.x.tpd"
|
||||||
include "orbit/S20211108222137.tpd"
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
location "https://download.eclipse.org/releases/2021-06/" {
|
location "https://download.eclipse.org/releases/2021-06/" {
|
||||||
org.eclipse.osgi lazy
|
org.eclipse.osgi lazy
|
||||||
|
|
|
@ -1,28 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde?>
|
<?pde?>
|
||||||
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
<target name="jgit-4.21" sequenceNumber="1636551936">
|
<target name="jgit-4.21" sequenceNumber="1637746569">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.jetty.client" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.client.source" version="9.4.44.v20210927"/>
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
<unit id="org.eclipse.jetty.continuation" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.continuation.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.http.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.io.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.security.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.server.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.servlet.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.source" version="9.4.44.v20210927"/>
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax" version="9.4.44.v20210927"/>
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
<unit id="org.eclipse.jetty.util.ajax.source" version="9.4.44.v20210927"/>
|
|
||||||
<repository id="jetty-9.4.x" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/"/>
|
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
<unit id="javax.servlet" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
|
|
||||||
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository"/>
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
target "jgit-4.21" with source configurePhase
|
target "jgit-4.21" with source configurePhase
|
||||||
|
|
||||||
include "projects/jetty-9.4.x.tpd"
|
include "projects/jetty-10.0.x.tpd"
|
||||||
include "orbit/S20211108222137.tpd"
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
location "https://download.eclipse.org/releases/2021-09/" {
|
location "https://download.eclipse.org/releases/2021-09/" {
|
||||||
org.eclipse.osgi lazy
|
org.eclipse.osgi lazy
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?pde?>
|
||||||
|
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
|
||||||
|
<target name="jgit-4.22" sequenceNumber="1637746993">
|
||||||
|
<locations>
|
||||||
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
|
<unit id="jakarta.servlet-api" version="4.0.0"/>
|
||||||
|
<unit id="jakarta.servlet-api.source" version="4.0.0"/>
|
||||||
|
<unit id="org.eclipse.jetty.http" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.http.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.io" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.io.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.security" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.security.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.server" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.server.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.servlet" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.servlet.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.util" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.util.source" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.util.ajax" version="10.0.6"/>
|
||||||
|
<unit id="org.eclipse.jetty.util.ajax.source" version="10.0.6"/>
|
||||||
|
<repository id="jetty-10.0.x" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/>
|
||||||
|
</location>
|
||||||
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
|
<unit id="com.google.gson" version="2.8.8.v20211029-0838"/>
|
||||||
|
<unit id="com.google.gson.source" version="2.8.8.v20211029-0838"/>
|
||||||
|
<unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
|
||||||
|
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
|
||||||
|
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
|
||||||
|
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
|
||||||
|
<unit id="com.sun.jna" version="5.8.0.v20210503-0343"/>
|
||||||
|
<unit id="com.sun.jna.source" version="5.8.0.v20210503-0343"/>
|
||||||
|
<unit id="com.sun.jna.platform" version="5.8.0.v20210406-1004"/>
|
||||||
|
<unit id="com.sun.jna.platform.source" version="5.8.0.v20210406-1004"/>
|
||||||
|
<unit id="javaewah" version="1.1.13.v20211029-0839"/>
|
||||||
|
<unit id="javaewah.source" version="1.1.13.v20211029-0839"/>
|
||||||
|
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
|
||||||
|
<unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
|
||||||
|
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
|
||||||
|
<unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
|
||||||
|
<unit id="net.i2p.crypto.eddsa" version="0.3.0.v20210923-1401"/>
|
||||||
|
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20210923-1401"/>
|
||||||
|
<unit id="org.apache.ant" version="1.10.12.v20211102-1452"/>
|
||||||
|
<unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/>
|
||||||
|
<unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
|
||||||
|
<unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
|
||||||
|
<unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
|
||||||
|
<unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
|
||||||
|
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
|
||||||
|
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
|
||||||
|
<unit id="org.apache.httpcomponents.httpclient" version="4.5.13.v20210128-2225"/>
|
||||||
|
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.13.v20210128-2225"/>
|
||||||
|
<unit id="org.apache.httpcomponents.httpcore" version="4.4.14.v20210128-2225"/>
|
||||||
|
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.14.v20210128-2225"/>
|
||||||
|
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
|
||||||
|
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
|
||||||
|
<unit id="org.apache.sshd.osgi" version="2.7.0.v20210623-0618"/>
|
||||||
|
<unit id="org.apache.sshd.osgi.source" version="2.7.0.v20210623-0618"/>
|
||||||
|
<unit id="org.apache.sshd.sftp" version="2.7.0.v20210623-0618"/>
|
||||||
|
<unit id="org.apache.sshd.sftp.source" version="2.7.0.v20210623-0618"/>
|
||||||
|
<unit id="org.assertj" version="3.20.2.v20210706-1104"/>
|
||||||
|
<unit id="org.assertj.source" version="3.20.2.v20210706-1104"/>
|
||||||
|
<unit id="org.bouncycastle.bcpg" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.bouncycastle.bcpg.source" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.bouncycastle.bcpkix" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.bouncycastle.bcpkix.source" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.bouncycastle.bcprov" version="1.69.0.v20210923-1401"/>
|
||||||
|
<unit id="org.bouncycastle.bcprov.source" version="1.69.0.v20210923-1401"/>
|
||||||
|
<unit id="org.bouncycastle.bcutil" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.bouncycastle.bcutil.source" version="1.69.0.v20210713-1924"/>
|
||||||
|
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
|
||||||
|
<unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/>
|
||||||
|
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
|
||||||
|
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
|
||||||
|
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
|
||||||
|
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
|
||||||
|
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
|
||||||
|
<unit id="org.junit.source" version="4.13.2.v20211018-1956"/>
|
||||||
|
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
|
||||||
|
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
|
||||||
|
<unit id="org.mockito" version="2.23.0.v20200310-1642"/>
|
||||||
|
<unit id="org.mockito.source" version="2.23.0.v20200310-1642"/>
|
||||||
|
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
|
||||||
|
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
|
||||||
|
<unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/>
|
||||||
|
<unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/>
|
||||||
|
<unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/>
|
||||||
|
<unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
|
||||||
|
<unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/>
|
||||||
|
<unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/>
|
||||||
|
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository"/>
|
||||||
|
</location>
|
||||||
|
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
|
||||||
|
<unit id="org.eclipse.osgi" version="0.0.0"/>
|
||||||
|
<repository location="https://download.eclipse.org/releases/2021-12/"/>
|
||||||
|
</location>
|
||||||
|
</locations>
|
||||||
|
</target>
|
|
@ -0,0 +1,8 @@
|
||||||
|
target "jgit-4.22" with source configurePhase
|
||||||
|
|
||||||
|
include "projects/jetty-10.0.x.tpd"
|
||||||
|
include "orbit/R20211122181901-2021-12.tpd"
|
||||||
|
|
||||||
|
location "https://download.eclipse.org/releases/2021-12/" {
|
||||||
|
org.eclipse.osgi lazy
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
target "S20211108222137" with source configurePhase
|
target "R20211122181901-2021-12" with source configurePhase
|
||||||
// see https://download.eclipse.org/tools/orbit/downloads/
|
// see https://download.eclipse.org/tools/orbit/downloads/
|
||||||
|
|
||||||
location "https://download.eclipse.org/tools/orbit/downloads/drops/S20211108222137/repository" {
|
location "https://download.eclipse.org/tools/orbit/downloads/drops/R20211122181901/repository" {
|
||||||
com.google.gson [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
|
com.google.gson [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
|
||||||
com.google.gson.source [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
|
com.google.gson.source [2.8.8.v20211029-0838,2.8.8.v20211029-0838]
|
||||||
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
|
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
|
||||||
|
@ -14,8 +14,6 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/S202111082221
|
||||||
com.sun.jna.platform.source [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
|
com.sun.jna.platform.source [5.8.0.v20210406-1004,5.8.0.v20210406-1004]
|
||||||
javaewah [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
|
javaewah [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
|
||||||
javaewah.source [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
|
javaewah.source [1.1.13.v20211029-0839,1.1.13.v20211029-0839]
|
||||||
javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
|
|
||||||
javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
|
|
||||||
net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
|
net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
|
||||||
net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
|
net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
|
||||||
net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
|
net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
|
|
@ -0,0 +1,20 @@
|
||||||
|
target "jetty-10.0.x" with source configurePhase
|
||||||
|
|
||||||
|
location jetty-10.0.x "https://download.eclipse.org/eclipse/jetty/10.0.6/" {
|
||||||
|
jakarta.servlet-api [4.0.0, 5.0.0)
|
||||||
|
jakarta.servlet-api.source [4.0.0, 5.0.0)
|
||||||
|
org.eclipse.jetty.http [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.http.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.io [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.io.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.security [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.security.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.server [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.server.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.servlet [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.servlet.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.util [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.util.source [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.util.ajax [10.0.6,10.0.6]
|
||||||
|
org.eclipse.jetty.util.ajax.source [10.0.6,10.0.6]
|
||||||
|
}
|
|
@ -1,22 +0,0 @@
|
||||||
target "jetty-9.4.x" with source configurePhase
|
|
||||||
|
|
||||||
location jetty-9.4.x "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.44.v20210927/" {
|
|
||||||
org.eclipse.jetty.client [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.client.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.continuation [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.continuation.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.http [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.http.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.io [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.io.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.security [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.security.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.server [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.server.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.servlet [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.servlet.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.util [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.util.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.util.ajax [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
org.eclipse.jetty.util.ajax.source [9.4.44.v20210927,9.4.44.v20210927]
|
|
||||||
}
|
|
|
@ -27,6 +27,10 @@
|
||||||
Tests for command line client tools built on top of JGit.
|
Tests for command line client tools built on top of JGit.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -7,13 +7,13 @@ Bundle-Version: 6.0.0.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
|
Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
|
||||||
org.apache.commons.logging;version="[1.2,2.0)",
|
org.apache.commons.logging;version="[1.2,2.0)",
|
||||||
org.eclipse.jetty.server;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.server.handler;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
|
org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
|
||||||
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.api;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.api.errors;version="[6.0.0,6.1.0)",
|
||||||
org.eclipse.jgit.archive;version="[6.0.0,6.1.0)",
|
org.eclipse.jgit.archive;version="[6.0.0,6.1.0)",
|
||||||
|
|
|
@ -71,9 +71,9 @@ public class JGitClientSession extends ClientSessionImpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default setting for the maximum number of bytes to read in the initial
|
* Default setting for the maximum number of bytes to read in the initial
|
||||||
* protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH 8.0
|
* protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH
|
||||||
* changed it to 8Mb, but that seems excessive for the purpose stated in RFC
|
* 8.0 changed it to 8Mb, but that seems excessive for the purpose stated in
|
||||||
* 4253. The Apache MINA sshd default in
|
* RFC 4253. The Apache MINA sshd default in
|
||||||
* {@link org.apache.sshd.core.CoreModuleProperties#MAX_IDENTIFICATION_SIZE}
|
* {@link org.apache.sshd.core.CoreModuleProperties#MAX_IDENTIFICATION_SIZE}
|
||||||
* is 16kb.
|
* is 16kb.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -105,7 +105,7 @@ protected void init(ClientSession session) {
|
||||||
/**
|
/**
|
||||||
* Obtains the timeout for the whole rest of the proxy connection protocol.
|
* Obtains the timeout for the whole rest of the proxy connection protocol.
|
||||||
*
|
*
|
||||||
* @return the timeout in milliseconds, always > 0L
|
* @return the timeout in milliseconds, always > 0L
|
||||||
*/
|
*/
|
||||||
protected long getTimeout() {
|
protected long getTimeout() {
|
||||||
long last = lastProxyOperationTime;
|
long last = lastProxyOperationTime;
|
||||||
|
|
|
@ -31,7 +31,7 @@ public interface KeyPasswordProvider {
|
||||||
* identifying the key resource that is being attempted to be
|
* identifying the key resource that is being attempted to be
|
||||||
* loaded
|
* loaded
|
||||||
* @param attempt
|
* @param attempt
|
||||||
* the number of previous attempts to get a passphrase; >= 0
|
* the number of previous attempts to get a passphrase; >= 0
|
||||||
* @return the passphrase
|
* @return the passphrase
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* if no password can be obtained
|
* if no password can be obtained
|
||||||
|
@ -44,7 +44,7 @@ public interface KeyPasswordProvider {
|
||||||
*
|
*
|
||||||
* @param maxNumberOfAttempts
|
* @param maxNumberOfAttempts
|
||||||
* number of times to ask for a passphrase;
|
* number of times to ask for a passphrase;
|
||||||
* {@link IllegalArgumentException} may be thrown if <= 0
|
* {@link IllegalArgumentException} may be thrown if <= 0
|
||||||
*/
|
*/
|
||||||
void setAttempts(int maxNumberOfAttempts);
|
void setAttempts(int maxNumberOfAttempts);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public interface KeyPasswordProvider {
|
||||||
* attempted for one identity resource through this provider. The default
|
* attempted for one identity resource through this provider. The default
|
||||||
* return 1.
|
* return 1.
|
||||||
*
|
*
|
||||||
* @return the number of times to ask for a passphrase; should be >= 1.
|
* @return the number of times to ask for a passphrase; should be >= 1.
|
||||||
*/
|
*/
|
||||||
default int getAttempts() {
|
default int getAttempts() {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
package org.eclipse.jgit.internal.storage.dfs;
|
package org.eclipse.jgit.internal.storage.dfs;
|
||||||
|
|
||||||
|
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||||
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
|
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
@ -20,11 +21,10 @@
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.LongStream;
|
import java.util.stream.LongStream;
|
||||||
|
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import org.eclipse.jgit.internal.storage.pack.PackExt;
|
import org.eclipse.jgit.internal.storage.pack.PackExt;
|
||||||
import org.eclipse.jgit.junit.TestRepository;
|
import org.eclipse.jgit.junit.TestRepository;
|
||||||
import org.eclipse.jgit.junit.TestRng;
|
import org.eclipse.jgit.junit.TestRng;
|
||||||
|
@ -42,10 +42,12 @@ public class DfsBlockCacheTest {
|
||||||
public TestName testName = new TestName();
|
public TestName testName = new TestName();
|
||||||
private TestRng rng;
|
private TestRng rng;
|
||||||
private DfsBlockCache cache;
|
private DfsBlockCache cache;
|
||||||
|
private ExecutorService pool;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
rng = new TestRng(testName.getMethodName());
|
rng = new TestRng(testName.getMethodName());
|
||||||
|
pool = Executors.newFixedThreadPool(10);
|
||||||
resetCache();
|
resetCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,49 +154,169 @@ public void hasCacheHotMap() throws Exception {
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings("resource")
|
||||||
@Test
|
@Test
|
||||||
public void noConcurrencySerializedReads() throws Exception {
|
public void noConcurrencySerializedReads_oneRepo() throws Exception {
|
||||||
DfsRepositoryDescription repo = new DfsRepositoryDescription("test");
|
InMemoryRepository r1 = createRepoWithBitmap("test");
|
||||||
InMemoryRepository r1 = new InMemoryRepository(repo);
|
|
||||||
TestRepository<InMemoryRepository> repository = new TestRepository<>(
|
|
||||||
r1);
|
|
||||||
RevCommit commit = repository.branch("/refs/ref1").commit()
|
|
||||||
.add("blob1", "blob1").create();
|
|
||||||
repository.branch("/refs/ref2").commit().add("blob2", "blob2")
|
|
||||||
.parent(commit).create();
|
|
||||||
|
|
||||||
new DfsGarbageCollector(r1).pack(null);
|
|
||||||
// Reset cache with concurrency Level at 1 i.e. no concurrency.
|
// Reset cache with concurrency Level at 1 i.e. no concurrency.
|
||||||
DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
|
resetCache(1);
|
||||||
.setBlockLimit(1 << 20).setConcurrencyLevel(1));
|
|
||||||
cache = DfsBlockCache.getInstance();
|
|
||||||
|
|
||||||
DfsReader reader = (DfsReader) r1.newObjectReader();
|
DfsReader reader = (DfsReader) r1.newObjectReader();
|
||||||
ExecutorService pool = Executors.newFixedThreadPool(10);
|
|
||||||
for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
|
for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
|
||||||
// Only load non-garbage pack with bitmap.
|
// Only load non-garbage pack with bitmap.
|
||||||
if (pack.isGarbage()) {
|
if (pack.isGarbage()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
asyncRun(pool, () -> pack.getBitmapIndex(reader));
|
asyncRun(() -> pack.getBitmapIndex(reader));
|
||||||
asyncRun(pool, () -> pack.getPackIndex(reader));
|
asyncRun(() -> pack.getPackIndex(reader));
|
||||||
asyncRun(pool, () -> pack.getBitmapIndex(reader));
|
asyncRun(() -> pack.getBitmapIndex(reader));
|
||||||
}
|
}
|
||||||
|
waitForExecutorPoolTermination();
|
||||||
|
|
||||||
pool.shutdown();
|
|
||||||
pool.awaitTermination(500, TimeUnit.MILLISECONDS);
|
|
||||||
assertTrue("Threads did not complete, likely due to a deadlock.",
|
|
||||||
pool.isTerminated());
|
|
||||||
assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
||||||
assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
||||||
|
// Reverse index has no pack extension, it defaults to 0.
|
||||||
|
assertEquals(1, cache.getMissCount()[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
@Test
|
||||||
|
public void noConcurrencySerializedReads_twoRepos() throws Exception {
|
||||||
|
InMemoryRepository r1 = createRepoWithBitmap("test1");
|
||||||
|
InMemoryRepository r2 = createRepoWithBitmap("test2");
|
||||||
|
resetCache(1);
|
||||||
|
|
||||||
|
DfsReader reader = (DfsReader) r1.newObjectReader();
|
||||||
|
DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
|
||||||
|
DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
|
||||||
|
// Safety check that both repos have the same number of packs.
|
||||||
|
assertEquals(r1Packs.length, r2Packs.length);
|
||||||
|
|
||||||
|
for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
|
||||||
|
DfsPackFile pack1 = r1Packs[i];
|
||||||
|
DfsPackFile pack2 = r2Packs[i];
|
||||||
|
if (pack1.isGarbage() || pack2.isGarbage()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
asyncRun(() -> pack1.getBitmapIndex(reader));
|
||||||
|
asyncRun(() -> pack2.getBitmapIndex(reader));
|
||||||
|
}
|
||||||
|
|
||||||
|
waitForExecutorPoolTermination();
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
||||||
|
assertEquals(2, cache.getMissCount()[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
@Test
|
||||||
|
public void lowConcurrencyParallelReads_twoRepos() throws Exception {
|
||||||
|
InMemoryRepository r1 = createRepoWithBitmap("test1");
|
||||||
|
InMemoryRepository r2 = createRepoWithBitmap("test2");
|
||||||
|
resetCache(2);
|
||||||
|
|
||||||
|
DfsReader reader = (DfsReader) r1.newObjectReader();
|
||||||
|
DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
|
||||||
|
DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
|
||||||
|
// Safety check that both repos have the same number of packs.
|
||||||
|
assertEquals(r1Packs.length, r2Packs.length);
|
||||||
|
|
||||||
|
for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
|
||||||
|
DfsPackFile pack1 = r1Packs[i];
|
||||||
|
DfsPackFile pack2 = r2Packs[i];
|
||||||
|
if (pack1.isGarbage() || pack2.isGarbage()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
asyncRun(() -> pack1.getBitmapIndex(reader));
|
||||||
|
asyncRun(() -> pack2.getBitmapIndex(reader));
|
||||||
|
}
|
||||||
|
|
||||||
|
waitForExecutorPoolTermination();
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
||||||
|
assertEquals(2, cache.getMissCount()[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
@Test
|
||||||
|
public void lowConcurrencyParallelReads_twoReposAndIndex()
|
||||||
|
throws Exception {
|
||||||
|
InMemoryRepository r1 = createRepoWithBitmap("test1");
|
||||||
|
InMemoryRepository r2 = createRepoWithBitmap("test2");
|
||||||
|
resetCache(2);
|
||||||
|
|
||||||
|
DfsReader reader = (DfsReader) r1.newObjectReader();
|
||||||
|
DfsPackFile[] r1Packs = r1.getObjectDatabase().getPacks();
|
||||||
|
DfsPackFile[] r2Packs = r2.getObjectDatabase().getPacks();
|
||||||
|
// Safety check that both repos have the same number of packs.
|
||||||
|
assertEquals(r1Packs.length, r2Packs.length);
|
||||||
|
|
||||||
|
for (int i = 0; i < r1.getObjectDatabase().getPacks().length; ++i) {
|
||||||
|
DfsPackFile pack1 = r1Packs[i];
|
||||||
|
DfsPackFile pack2 = r2Packs[i];
|
||||||
|
if (pack1.isGarbage() || pack2.isGarbage()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
asyncRun(() -> pack1.getBitmapIndex(reader));
|
||||||
|
asyncRun(() -> pack1.getPackIndex(reader));
|
||||||
|
asyncRun(() -> pack2.getBitmapIndex(reader));
|
||||||
|
}
|
||||||
|
waitForExecutorPoolTermination();
|
||||||
|
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
||||||
|
// Index is loaded once for each repo.
|
||||||
|
assertEquals(2, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
||||||
|
assertEquals(2, cache.getMissCount()[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
@Test
|
||||||
|
public void highConcurrencyParallelReads_oneRepo() throws Exception {
|
||||||
|
InMemoryRepository r1 = createRepoWithBitmap("test");
|
||||||
|
resetCache();
|
||||||
|
|
||||||
|
DfsReader reader = (DfsReader) r1.newObjectReader();
|
||||||
|
for (DfsPackFile pack : r1.getObjectDatabase().getPacks()) {
|
||||||
|
// Only load non-garbage pack with bitmap.
|
||||||
|
if (pack.isGarbage()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
asyncRun(() -> pack.getBitmapIndex(reader));
|
||||||
|
asyncRun(() -> pack.getPackIndex(reader));
|
||||||
|
asyncRun(() -> pack.getBitmapIndex(reader));
|
||||||
|
}
|
||||||
|
waitForExecutorPoolTermination();
|
||||||
|
|
||||||
|
assertEquals(1, cache.getMissCount()[PackExt.BITMAP_INDEX.ordinal()]);
|
||||||
|
assertEquals(1, cache.getMissCount()[PackExt.INDEX.ordinal()]);
|
||||||
|
assertEquals(1, cache.getMissCount()[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetCache() {
|
private void resetCache() {
|
||||||
|
resetCache(32);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetCache(int concurrencyLevel) {
|
||||||
DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
|
DfsBlockCache.reconfigure(new DfsBlockCacheConfig().setBlockSize(512)
|
||||||
.setBlockLimit(1 << 20));
|
.setConcurrencyLevel(concurrencyLevel).setBlockLimit(1 << 20));
|
||||||
cache = DfsBlockCache.getInstance();
|
cache = DfsBlockCache.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void asyncRun(ExecutorService pool, Callable<?> call) {
|
private InMemoryRepository createRepoWithBitmap(String repoName)
|
||||||
|
throws Exception {
|
||||||
|
DfsRepositoryDescription repoDesc = new DfsRepositoryDescription(
|
||||||
|
repoName);
|
||||||
|
InMemoryRepository repo = new InMemoryRepository(repoDesc);
|
||||||
|
try (TestRepository<InMemoryRepository> repository = new TestRepository<>(
|
||||||
|
repo)) {
|
||||||
|
RevCommit commit = repository.branch("/refs/ref1" + repoName)
|
||||||
|
.commit().add("blob1", "blob1" + repoName).create();
|
||||||
|
repository.branch("/refs/ref2" + repoName).commit()
|
||||||
|
.add("blob2", "blob2" + repoName).parent(commit).create();
|
||||||
|
}
|
||||||
|
new DfsGarbageCollector(repo).pack(null);
|
||||||
|
return repo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void asyncRun(Callable<?> call) {
|
||||||
pool.execute(() -> {
|
pool.execute(() -> {
|
||||||
try {
|
try {
|
||||||
call.call();
|
call.call();
|
||||||
|
@ -203,4 +325,11 @@ private void asyncRun(ExecutorService pool, Callable<?> call) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void waitForExecutorPoolTermination() throws Exception {
|
||||||
|
pool.shutdown();
|
||||||
|
pool.awaitTermination(500, MILLISECONDS);
|
||||||
|
assertTrue("Threads did not complete, likely due to a deadlock.",
|
||||||
|
pool.isTerminated());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
import org.eclipse.jgit.junit.MockSystemReader;
|
import org.eclipse.jgit.junit.MockSystemReader;
|
||||||
import org.eclipse.jgit.merge.MergeConfig;
|
import org.eclipse.jgit.merge.MergeConfig;
|
||||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||||
|
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||||
import org.eclipse.jgit.transport.RefSpec;
|
import org.eclipse.jgit.transport.RefSpec;
|
||||||
import org.eclipse.jgit.util.FS;
|
import org.eclipse.jgit.util.FS;
|
||||||
import org.eclipse.jgit.util.SystemReader;
|
import org.eclipse.jgit.util.SystemReader;
|
||||||
|
@ -1471,14 +1472,17 @@ public void testCommitTemplateEmptyConfig()
|
||||||
// no values defined nowhere
|
// no values defined nowhere
|
||||||
Config config = new Config(null);
|
Config config = new Config(null);
|
||||||
assertNull(config.get(CommitConfig.KEY).getCommitTemplatePath());
|
assertNull(config.get(CommitConfig.KEY).getCommitTemplatePath());
|
||||||
assertNull(config.get(CommitConfig.KEY).getCommitTemplateContent());
|
assertNull(config.get(CommitConfig.KEY)
|
||||||
|
.getCommitTemplateContent(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCommitTemplateConfig()
|
public void testCommitTemplateConfig()
|
||||||
throws ConfigInvalidException, IOException {
|
throws ConfigInvalidException, IOException {
|
||||||
|
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
File tempFile = tmp.newFile("testCommitTemplate-");
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
|
Repository repo = FileRepositoryBuilder.create(workTree);
|
||||||
String templateContent = "content of the template";
|
String templateContent = "content of the template";
|
||||||
JGitTestUtil.write(tempFile, templateContent);
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
String expectedTemplatePath = tempFile.getPath();
|
String expectedTemplatePath = tempFile.getPath();
|
||||||
|
@ -1492,7 +1496,32 @@ public void testCommitTemplateConfig()
|
||||||
.getCommitEncoding();
|
.getCommitEncoding();
|
||||||
assertEquals(expectedTemplatePath, templatePath);
|
assertEquals(expectedTemplatePath, templatePath);
|
||||||
assertEquals(templateContent,
|
assertEquals(templateContent,
|
||||||
config.get(CommitConfig.KEY).getCommitTemplateContent());
|
config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
|
||||||
|
assertNull("no commitEncoding has been set so it must be null",
|
||||||
|
commitEncoding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCommitTemplateConfigRelativePath()
|
||||||
|
throws ConfigInvalidException, IOException {
|
||||||
|
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
|
String templateContent = "content of the template";
|
||||||
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
|
String expectedTemplatePath = "../" + tempFile.getName();
|
||||||
|
|
||||||
|
Config config = parse(
|
||||||
|
"[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
|
||||||
|
|
||||||
|
String templatePath = config.get(CommitConfig.KEY)
|
||||||
|
.getCommitTemplatePath();
|
||||||
|
String commitEncoding = config.get(CommitConfig.KEY)
|
||||||
|
.getCommitEncoding();
|
||||||
|
assertEquals(expectedTemplatePath, templatePath);
|
||||||
|
assertEquals(templateContent, config.get(CommitConfig.KEY)
|
||||||
|
.getCommitTemplateContent(
|
||||||
|
new RepositoryBuilder().setWorkTree(workTree).build()));
|
||||||
assertNull("no commitEncoding has been set so it must be null",
|
assertNull("no commitEncoding has been set so it must be null",
|
||||||
commitEncoding);
|
commitEncoding);
|
||||||
}
|
}
|
||||||
|
@ -1501,6 +1530,8 @@ public void testCommitTemplateConfig()
|
||||||
public void testCommitTemplateEncoding()
|
public void testCommitTemplateEncoding()
|
||||||
throws ConfigInvalidException, IOException {
|
throws ConfigInvalidException, IOException {
|
||||||
Config config = new Config(null);
|
Config config = new Config(null);
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
|
Repository repo = FileRepositoryBuilder.create(workTree);
|
||||||
File tempFile = tmp.newFile("testCommitTemplate-");
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
String templateContent = "content of the template";
|
String templateContent = "content of the template";
|
||||||
JGitTestUtil.write(tempFile, templateContent);
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
|
@ -1508,7 +1539,7 @@ public void testCommitTemplateEncoding()
|
||||||
config = parse("[i18n]\n\tcommitEncoding = utf-8\n"
|
config = parse("[i18n]\n\tcommitEncoding = utf-8\n"
|
||||||
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
|
+ "[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
|
||||||
assertEquals(templateContent,
|
assertEquals(templateContent,
|
||||||
config.get(CommitConfig.KEY).getCommitTemplateContent());
|
config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
|
||||||
String commitEncoding = config.get(CommitConfig.KEY)
|
String commitEncoding = config.get(CommitConfig.KEY)
|
||||||
.getCommitEncoding();
|
.getCommitEncoding();
|
||||||
assertEquals("commitEncoding has been set to utf-8 it must be utf-8",
|
assertEquals("commitEncoding has been set to utf-8 it must be utf-8",
|
||||||
|
@ -1520,6 +1551,8 @@ public void testCommitTemplatePathInHomeDirecory()
|
||||||
throws ConfigInvalidException, IOException {
|
throws ConfigInvalidException, IOException {
|
||||||
Config config = new Config(null);
|
Config config = new Config(null);
|
||||||
File tempFile = tmp.newFile("testCommitTemplate-");
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
|
Repository repo = FileRepositoryBuilder.create(workTree);
|
||||||
String templateContent = "content of the template";
|
String templateContent = "content of the template";
|
||||||
JGitTestUtil.write(tempFile, templateContent);
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
// proper evaluation of the ~/ directory
|
// proper evaluation of the ~/ directory
|
||||||
|
@ -1535,35 +1568,39 @@ public void testCommitTemplatePathInHomeDirecory()
|
||||||
.getCommitTemplatePath();
|
.getCommitTemplatePath();
|
||||||
assertEquals(expectedTemplatePath, templatePath);
|
assertEquals(expectedTemplatePath, templatePath);
|
||||||
assertEquals(templateContent,
|
assertEquals(templateContent,
|
||||||
config.get(CommitConfig.KEY).getCommitTemplateContent());
|
config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = ConfigInvalidException.class)
|
@Test(expected = ConfigInvalidException.class)
|
||||||
public void testCommitTemplateWithInvalidEncoding()
|
public void testCommitTemplateWithInvalidEncoding()
|
||||||
throws ConfigInvalidException, IOException {
|
throws ConfigInvalidException, IOException {
|
||||||
Config config = new Config(null);
|
Config config = new Config(null);
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
File tempFile = tmp.newFile("testCommitTemplate-");
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
|
Repository repo = FileRepositoryBuilder.create(workTree);
|
||||||
String templateContent = "content of the template";
|
String templateContent = "content of the template";
|
||||||
JGitTestUtil.write(tempFile, templateContent);
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
config = parse("[i18n]\n\tcommitEncoding = invalidEcoding\n"
|
config = parse("[i18n]\n\tcommitEncoding = invalidEcoding\n"
|
||||||
+ "[commit]\n\ttemplate = " + tempFile.getPath() + "\n");
|
+ "[commit]\n\ttemplate = " + tempFile.getPath() + "\n");
|
||||||
config.get(CommitConfig.KEY).getCommitTemplateContent();
|
config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = FileNotFoundException.class)
|
@Test(expected = FileNotFoundException.class)
|
||||||
public void testCommitTemplateWithInvalidPath()
|
public void testCommitTemplateWithInvalidPath()
|
||||||
throws ConfigInvalidException, IOException {
|
throws ConfigInvalidException, IOException {
|
||||||
Config config = new Config(null);
|
Config config = new Config(null);
|
||||||
|
File workTree = tmp.newFolder("dummy-worktree");
|
||||||
File tempFile = tmp.newFile("testCommitTemplate-");
|
File tempFile = tmp.newFile("testCommitTemplate-");
|
||||||
|
Repository repo = FileRepositoryBuilder.create(workTree);
|
||||||
String templateContent = "content of the template";
|
String templateContent = "content of the template";
|
||||||
JGitTestUtil.write(tempFile, templateContent);
|
JGitTestUtil.write(tempFile, templateContent);
|
||||||
// commit message encoding
|
// commit message encoding
|
||||||
String expectedTemplatePath = "nonExistingTemplate";
|
String expectedTemplatePath = "/nonExistingTemplate";
|
||||||
config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
|
config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n");
|
||||||
String templatePath = config.get(CommitConfig.KEY)
|
String templatePath = config.get(CommitConfig.KEY)
|
||||||
.getCommitTemplatePath();
|
.getCommitTemplatePath();
|
||||||
assertEquals(expectedTemplatePath, templatePath);
|
assertEquals(expectedTemplatePath, templatePath);
|
||||||
config.get(CommitConfig.KEY).getCommitTemplateContent();
|
config.get(CommitConfig.KEY).getCommitTemplateContent(repo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertValueRoundTrip(String value)
|
private static void assertValueRoundTrip(String value)
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector;
|
import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector;
|
||||||
import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
|
import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
|
||||||
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
|
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.internal.storage.pack.CachedPack;
|
import org.eclipse.jgit.internal.storage.pack.CachedPack;
|
||||||
import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider;
|
import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider;
|
||||||
import org.eclipse.jgit.junit.TestRepository;
|
import org.eclipse.jgit.junit.TestRepository;
|
||||||
|
|
|
@ -71,12 +71,12 @@ class Candidate {
|
||||||
/**
|
/**
|
||||||
* Score assigned to the rename to this candidate.
|
* Score assigned to the rename to this candidate.
|
||||||
* <p>
|
* <p>
|
||||||
* Consider the history "A<-B<-C". If the result file S in C was renamed to
|
* Consider the history "A<-B<-C". If the result file S in C was
|
||||||
* R in B, the rename score for this rename will be held in this field by
|
* renamed to R in B, the rename score for this rename will be held in this
|
||||||
* the candidate object for B. By storing the score with B, the application
|
* field by the candidate object for B. By storing the score with B, the
|
||||||
* can see what the rename score was as it makes the transition from C/S to
|
* application can see what the rename score was as it makes the transition
|
||||||
* B/R. This may seem backwards since it was C that performed the rename,
|
* from C/S to B/R. This may seem backwards since it was C that performed
|
||||||
* but the application doesn't learn about path R until B.
|
* the rename, but the application doesn't learn about path R until B.
|
||||||
*/
|
*/
|
||||||
int renameScore;
|
int renameScore;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Region {
|
||||||
/** First position in the {@link Candidate} that owns this Region. */
|
/** First position in the {@link Candidate} that owns this Region. */
|
||||||
int sourceStart;
|
int sourceStart;
|
||||||
|
|
||||||
/** Length of the region, always >= 1. */
|
/** Length of the region, always >= 1. */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
Region(int rs, int ss, int len) {
|
Region(int rs, int ss, int len) {
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.jgit.api.errors.CanceledException;
|
||||||
import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm;
|
import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm;
|
||||||
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
||||||
import org.eclipse.jgit.dircache.DirCacheIterator;
|
import org.eclipse.jgit.dircache.DirCacheIterator;
|
||||||
import org.eclipse.jgit.errors.AmbiguousObjectException;
|
import org.eclipse.jgit.errors.AmbiguousObjectException;
|
||||||
import org.eclipse.jgit.errors.BinaryBlobException;
|
import org.eclipse.jgit.errors.BinaryBlobException;
|
||||||
import org.eclipse.jgit.errors.CancelledException;
|
|
||||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||||
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
|
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
|
||||||
import org.eclipse.jgit.errors.MissingObjectException;
|
import org.eclipse.jgit.errors.MissingObjectException;
|
||||||
|
@ -578,7 +578,7 @@ private List<DiffEntry> detectRenames(List<DiffEntry> files)
|
||||||
renameDetector.addAll(files);
|
renameDetector.addAll(files);
|
||||||
try {
|
try {
|
||||||
return renameDetector.compute(reader, progressMonitor);
|
return renameDetector.compute(reader, progressMonitor);
|
||||||
} catch (CancelledException e) {
|
} catch (CanceledException e) {
|
||||||
// TODO: consider propagating once bug 536323 is tackled
|
// TODO: consider propagating once bug 536323 is tackled
|
||||||
// (making DiffEntry.scan() and DiffFormatter.scan() and
|
// (making DiffEntry.scan() and DiffFormatter.scan() and
|
||||||
// format() cancellable).
|
// format() cancellable).
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.jgit.api.errors.CanceledException;
|
||||||
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
||||||
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
|
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
|
||||||
import org.eclipse.jgit.errors.CancelledException;
|
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.lib.AbbreviatedObjectId;
|
import org.eclipse.jgit.lib.AbbreviatedObjectId;
|
||||||
import org.eclipse.jgit.lib.FileMode;
|
import org.eclipse.jgit.lib.FileMode;
|
||||||
|
@ -336,6 +336,7 @@ public void add(DiffEntry entry) {
|
||||||
* Detect renames in the current file set.
|
* Detect renames in the current file set.
|
||||||
* <p>
|
* <p>
|
||||||
* This convenience function runs without a progress monitor.
|
* This convenience function runs without a progress monitor.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s
|
* @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s
|
||||||
* representing all files that have been changed.
|
* representing all files that have been changed.
|
||||||
|
@ -343,7 +344,12 @@ public void add(DiffEntry entry) {
|
||||||
* file contents cannot be read from the repository.
|
* file contents cannot be read from the repository.
|
||||||
*/
|
*/
|
||||||
public List<DiffEntry> compute() throws IOException {
|
public List<DiffEntry> compute() throws IOException {
|
||||||
return compute(NullProgressMonitor.INSTANCE);
|
try {
|
||||||
|
return compute(NullProgressMonitor.INSTANCE);
|
||||||
|
} catch (CanceledException e) {
|
||||||
|
// Won't happen with a NullProgressMonitor
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -355,13 +361,11 @@ public List<DiffEntry> compute() throws IOException {
|
||||||
* representing all files that have been changed.
|
* representing all files that have been changed.
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
* file contents cannot be read from the repository.
|
* file contents cannot be read from the repository.
|
||||||
* @throws CancelledException
|
* @throws CanceledException
|
||||||
* if rename detection was cancelled
|
* if rename detection was cancelled
|
||||||
*/
|
*/
|
||||||
// TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
|
|
||||||
// version
|
|
||||||
public List<DiffEntry> compute(ProgressMonitor pm)
|
public List<DiffEntry> compute(ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
if (!done) {
|
if (!done) {
|
||||||
try {
|
try {
|
||||||
return compute(objectReader, pm);
|
return compute(objectReader, pm);
|
||||||
|
@ -383,13 +387,11 @@ public List<DiffEntry> compute(ProgressMonitor pm)
|
||||||
* representing all files that have been changed.
|
* representing all files that have been changed.
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
* file contents cannot be read from the repository.
|
* file contents cannot be read from the repository.
|
||||||
* @throws CancelledException
|
* @throws CanceledException
|
||||||
* if rename detection was cancelled
|
* if rename detection was cancelled
|
||||||
*/
|
*/
|
||||||
// TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
|
|
||||||
// version
|
|
||||||
public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm)
|
public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
final ContentSource cs = ContentSource.create(reader);
|
final ContentSource cs = ContentSource.create(reader);
|
||||||
return compute(new ContentSource.Pair(cs, cs), pm);
|
return compute(new ContentSource.Pair(cs, cs), pm);
|
||||||
}
|
}
|
||||||
|
@ -405,13 +407,11 @@ public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm)
|
||||||
* representing all files that have been changed.
|
* representing all files that have been changed.
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
* file contents cannot be read from the repository.
|
* file contents cannot be read from the repository.
|
||||||
* @throws CancelledException
|
* @throws CanceledException
|
||||||
* if rename detection was cancelled
|
* if rename detection was cancelled
|
||||||
*/
|
*/
|
||||||
// TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major
|
|
||||||
// version
|
|
||||||
public List<DiffEntry> compute(ContentSource.Pair reader, ProgressMonitor pm)
|
public List<DiffEntry> compute(ContentSource.Pair reader, ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
if (!done) {
|
if (!done) {
|
||||||
done = true;
|
done = true;
|
||||||
|
|
||||||
|
@ -451,15 +451,15 @@ public void reset() {
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void advanceOrCancel(ProgressMonitor pm) throws CancelledException {
|
private void advanceOrCancel(ProgressMonitor pm) throws CanceledException {
|
||||||
if (pm.isCancelled()) {
|
if (pm.isCancelled()) {
|
||||||
throw new CancelledException(JGitText.get().renameCancelled);
|
throw new CanceledException(JGitText.get().renameCancelled);
|
||||||
}
|
}
|
||||||
pm.update(1);
|
pm.update(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
|
private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
ArrayList<DiffEntry> newEntries = new ArrayList<>(entries.size());
|
ArrayList<DiffEntry> newEntries = new ArrayList<>(entries.size());
|
||||||
|
|
||||||
pm.beginTask(JGitText.get().renamesBreakingModifies, entries.size());
|
pm.beginTask(JGitText.get().renamesBreakingModifies, entries.size());
|
||||||
|
@ -486,7 +486,7 @@ private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
|
||||||
entries = newEntries;
|
entries = newEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rejoinModifies(ProgressMonitor pm) throws CancelledException {
|
private void rejoinModifies(ProgressMonitor pm) throws CanceledException {
|
||||||
HashMap<String, DiffEntry> nameMap = new HashMap<>();
|
HashMap<String, DiffEntry> nameMap = new HashMap<>();
|
||||||
ArrayList<DiffEntry> newAdded = new ArrayList<>(added.size());
|
ArrayList<DiffEntry> newAdded = new ArrayList<>(added.size());
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ private int calculateModifyScore(ContentSource.Pair reader, DiffEntry d)
|
||||||
|
|
||||||
private void findContentRenames(ContentSource.Pair reader,
|
private void findContentRenames(ContentSource.Pair reader,
|
||||||
ProgressMonitor pm)
|
ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
int cnt = Math.max(added.size(), deleted.size());
|
int cnt = Math.max(added.size(), deleted.size());
|
||||||
if (getRenameLimit() == 0 || cnt <= getRenameLimit()) {
|
if (getRenameLimit() == 0 || cnt <= getRenameLimit()) {
|
||||||
SimilarityRenameDetector d;
|
SimilarityRenameDetector d;
|
||||||
|
@ -562,7 +562,7 @@ private void findContentRenames(ContentSource.Pair reader,
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private void findExactRenames(ProgressMonitor pm)
|
private void findExactRenames(ProgressMonitor pm)
|
||||||
throws CancelledException {
|
throws CanceledException {
|
||||||
pm.beginTask(JGitText.get().renamesFindingExact, //
|
pm.beginTask(JGitText.get().renamesFindingExact, //
|
||||||
added.size() + added.size() + deleted.size()
|
added.size() + added.size() + deleted.size()
|
||||||
+ added.size() * deleted.size());
|
+ added.size() * deleted.size());
|
||||||
|
@ -651,7 +651,7 @@ private void findExactRenames(ProgressMonitor pm)
|
||||||
matrix[mNext] = SimilarityRenameDetector.encode(score, delIdx, addIdx);
|
matrix[mNext] = SimilarityRenameDetector.encode(score, delIdx, addIdx);
|
||||||
mNext++;
|
mNext++;
|
||||||
if (pm.isCancelled()) {
|
if (pm.isCancelled()) {
|
||||||
throw new CancelledException(
|
throw new CanceledException(
|
||||||
JGitText.get().renameCancelled);
|
JGitText.get().renameCancelled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ private static DiffEntry bestPathMatch(DiffEntry src, List<DiffEntry> list) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private HashMap<AbbreviatedObjectId, Object> populateMap(
|
private HashMap<AbbreviatedObjectId, Object> populateMap(
|
||||||
List<DiffEntry> diffEntries, ProgressMonitor pm)
|
List<DiffEntry> diffEntries, ProgressMonitor pm)
|
||||||
throws CancelledException {
|
throws CanceledException {
|
||||||
HashMap<AbbreviatedObjectId, Object> map = new HashMap<>();
|
HashMap<AbbreviatedObjectId, Object> map = new HashMap<>();
|
||||||
for (DiffEntry de : diffEntries) {
|
for (DiffEntry de : diffEntries) {
|
||||||
Object old = map.put(id(de), de);
|
Object old = map.put(id(de), de);
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
import java.util.BitSet;
|
import java.util.BitSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.jgit.api.errors.CanceledException;
|
||||||
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
|
||||||
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
|
import org.eclipse.jgit.diff.SimilarityIndex.TableFullException;
|
||||||
import org.eclipse.jgit.errors.CancelledException;
|
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.lib.FileMode;
|
import org.eclipse.jgit.lib.FileMode;
|
||||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||||
|
@ -115,7 +115,7 @@ void setSkipBinaryFiles(boolean value) {
|
||||||
skipBinaryFiles = value;
|
skipBinaryFiles = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute(ProgressMonitor pm) throws IOException, CancelledException {
|
void compute(ProgressMonitor pm) throws IOException, CanceledException {
|
||||||
if (pm == null)
|
if (pm == null)
|
||||||
pm = NullProgressMonitor.INSTANCE;
|
pm = NullProgressMonitor.INSTANCE;
|
||||||
|
|
||||||
|
@ -130,9 +130,7 @@ void compute(ProgressMonitor pm) throws IOException, CancelledException {
|
||||||
//
|
//
|
||||||
for (--mNext; mNext >= 0; mNext--) {
|
for (--mNext; mNext >= 0; mNext--) {
|
||||||
if (pm.isCancelled()) {
|
if (pm.isCancelled()) {
|
||||||
// TODO(ms): use org.eclipse.jgit.api.errors.CanceledException
|
throw new CanceledException(JGitText.get().renameCancelled);
|
||||||
// in next major version
|
|
||||||
throw new CancelledException(JGitText.get().renameCancelled);
|
|
||||||
}
|
}
|
||||||
long ent = matrix[mNext];
|
long ent = matrix[mNext];
|
||||||
int sIdx = srcFile(ent);
|
int sIdx = srcFile(ent);
|
||||||
|
@ -202,7 +200,7 @@ private static List<DiffEntry> compactDstList(List<DiffEntry> in) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int buildMatrix(ProgressMonitor pm)
|
private int buildMatrix(ProgressMonitor pm)
|
||||||
throws IOException, CancelledException {
|
throws IOException, CanceledException {
|
||||||
// Allocate for the worst-case scenario where every pair has a
|
// Allocate for the worst-case scenario where every pair has a
|
||||||
// score that we need to consider. We might not need that many.
|
// score that we need to consider. We might not need that many.
|
||||||
//
|
//
|
||||||
|
@ -228,10 +226,7 @@ private int buildMatrix(ProgressMonitor pm)
|
||||||
|
|
||||||
for (int dstIdx = 0; dstIdx < dsts.size(); dstIdx++) {
|
for (int dstIdx = 0; dstIdx < dsts.size(); dstIdx++) {
|
||||||
if (pm.isCancelled()) {
|
if (pm.isCancelled()) {
|
||||||
// TODO(ms): use
|
throw new CanceledException(
|
||||||
// org.eclipse.jgit.api.errors.CanceledException in next
|
|
||||||
// major version
|
|
||||||
throw new CancelledException(
|
|
||||||
JGitText.get().renameCancelled);
|
JGitText.get().renameCancelled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,12 +280,12 @@ public String getPathString() {
|
||||||
* number of bytes of <code>cache[cacheIdx].path</code> that
|
* number of bytes of <code>cache[cacheIdx].path</code> that
|
||||||
* matches this tree's path. The value at array position
|
* matches this tree's path. The value at array position
|
||||||
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
|
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
|
||||||
* <code>pathOff</code> is > 0.
|
* <code>pathOff</code> is > 0.
|
||||||
* @param ow
|
* @param ow
|
||||||
* the writer to use when serializing to the store.
|
* the writer to use when serializing to the store.
|
||||||
* @return identity of this tree.
|
* @return identity of this tree.
|
||||||
* @throws UnmergedPathException
|
* @throws UnmergedPathException
|
||||||
* one or more paths contain higher-order stages (stage > 0),
|
* one or more paths contain higher-order stages (stage > 0),
|
||||||
* which cannot be stored in a tree object.
|
* which cannot be stored in a tree object.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* an unexpected error occurred writing to the object store.
|
* an unexpected error occurred writing to the object store.
|
||||||
|
@ -401,7 +401,7 @@ final boolean contains(byte[] a, int aOff, int aLen) {
|
||||||
* number of bytes of <code>cache[cacheIdx].path</code> that
|
* number of bytes of <code>cache[cacheIdx].path</code> that
|
||||||
* matches this tree's path. The value at array position
|
* matches this tree's path. The value at array position
|
||||||
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
|
* <code>cache[cacheIdx].path[pathOff-1]</code> is always '/' if
|
||||||
* <code>pathOff</code> is > 0.
|
* <code>pathOff</code> is > 0.
|
||||||
*/
|
*/
|
||||||
void validate(final DirCacheEntry[] cache, final int cCnt, int cIdx,
|
void validate(final DirCacheEntry[] cache, final int cCnt, int cIdx,
|
||||||
final int pathOff) {
|
final int pathOff) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010, Google Inc. and others
|
* Copyright (C) 2010, 2021 Google Inc. and others
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials are made available under the
|
* This program and the accompanying materials are made available under the
|
||||||
* terms of the Eclipse Distribution License v. 1.0 which is available at
|
* terms of the Eclipse Distribution License v. 1.0 which is available at
|
||||||
|
@ -7,29 +7,23 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.eclipse.jgit.errors;
|
package org.eclipse.jgit.errors;
|
||||||
|
|
||||||
import org.eclipse.jgit.internal.storage.pack.ObjectToPack;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A previously selected representation is no longer available.
|
* A previously selected representation is no longer available.
|
||||||
*/
|
*/
|
||||||
public class StoredObjectRepresentationNotAvailableException extends Exception { //TODO remove unused ObjectToPack in 5.0
|
public class StoredObjectRepresentationNotAvailableException extends Exception {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an error for an object.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @param otp
|
|
||||||
* the object whose current representation is no longer present.
|
|
||||||
* @param cause
|
* @param cause
|
||||||
* cause
|
* {@link Throwable} that caused this exception
|
||||||
* @since 4.10
|
* @since 6.0
|
||||||
*/
|
*/
|
||||||
public StoredObjectRepresentationNotAvailableException(ObjectToPack otp,
|
public StoredObjectRepresentationNotAvailableException(Throwable cause) {
|
||||||
Throwable cause) {
|
|
||||||
super(cause);
|
super(cause);
|
||||||
// Do nothing.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -578,10 +578,10 @@ public RevCommit call() throws GitAPIException {
|
||||||
|
|
||||||
DirCache index = DirCache.newInCore();
|
DirCache index = DirCache.newInCore();
|
||||||
ObjectInserter inserter = repo.newObjectInserter();
|
ObjectInserter inserter = repo.newObjectInserter();
|
||||||
|
|
||||||
try (RevWalk rw = new RevWalk(repo)) {
|
try (RevWalk rw = new RevWalk(repo)) {
|
||||||
prepareIndex(renamedProjects, index, inserter);
|
prepareIndex(renamedProjects, index, inserter);
|
||||||
ObjectId treeId = index.writeTree(inserter);
|
ObjectId treeId = index.writeTree(inserter);
|
||||||
|
|
||||||
long prevDelay = 0;
|
long prevDelay = 0;
|
||||||
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
|
for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
|
||||||
try {
|
try {
|
||||||
|
@ -597,7 +597,7 @@ public RevCommit call() throws GitAPIException {
|
||||||
}
|
}
|
||||||
// In the last try, just propagate the exceptions
|
// In the last try, just propagate the exceptions
|
||||||
return commitTreeOnCurrentTip(inserter, rw, treeId);
|
return commitTreeOnCurrentTip(inserter, rw, treeId);
|
||||||
} catch (GitAPIException | IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
throw new ManifestErrorException(e);
|
throw new ManifestErrorException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -609,12 +609,11 @@ public RevCommit call() throws GitAPIException {
|
||||||
}
|
}
|
||||||
return git.commit().setMessage(RepoText.get().repoCommitMessage)
|
return git.commit().setMessage(RepoText.get().repoCommitMessage)
|
||||||
.call();
|
.call();
|
||||||
} catch (GitAPIException | IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ManifestErrorException(e);
|
throw new ManifestErrorException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void prepareIndex(List<RepoProject> projects, DirCache index,
|
private void prepareIndex(List<RepoProject> projects, DirCache index,
|
||||||
ObjectInserter inserter) throws IOException, GitAPIException {
|
ObjectInserter inserter) throws IOException, GitAPIException {
|
||||||
Config cfg = new Config();
|
Config cfg = new Config();
|
||||||
|
|
|
@ -104,9 +104,10 @@ public static DfsBlockCache getInstance() {
|
||||||
private final ReentrantLock[] loadLocks;
|
private final ReentrantLock[] loadLocks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A separate pool of locks to prevent concurrent loads for same index or bitmap from PackFile.
|
* A separate pool of locks per pack extension to prevent concurrent loads
|
||||||
|
* for same index or bitmap from PackFile.
|
||||||
*/
|
*/
|
||||||
private final ReentrantLock[] refLocks;
|
private final ReentrantLock[][] refLocks;
|
||||||
|
|
||||||
/** Maximum number of bytes the cache should hold. */
|
/** Maximum number of bytes the cache should hold. */
|
||||||
private final long maxBytes;
|
private final long maxBytes;
|
||||||
|
@ -173,13 +174,16 @@ private DfsBlockCache(DfsBlockCacheConfig cfg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
table = new AtomicReferenceArray<>(tableSize);
|
table = new AtomicReferenceArray<>(tableSize);
|
||||||
loadLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
|
int concurrencyLevel = cfg.getConcurrencyLevel();
|
||||||
|
loadLocks = new ReentrantLock[concurrencyLevel];
|
||||||
for (int i = 0; i < loadLocks.length; i++) {
|
for (int i = 0; i < loadLocks.length; i++) {
|
||||||
loadLocks[i] = new ReentrantLock(true /* fair */);
|
loadLocks[i] = new ReentrantLock(true /* fair */);
|
||||||
}
|
}
|
||||||
refLocks = new ReentrantLock[cfg.getConcurrencyLevel()];
|
refLocks = new ReentrantLock[PackExt.values().length][concurrencyLevel];
|
||||||
for (int i = 0; i < refLocks.length; i++) {
|
for (int i = 0; i < PackExt.values().length; i++) {
|
||||||
refLocks[i] = new ReentrantLock(true /* fair */);
|
for (int j = 0; j < concurrencyLevel; ++j) {
|
||||||
|
refLocks[i][j] = new ReentrantLock(true /* fair */);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maxBytes = cfg.getBlockLimit();
|
maxBytes = cfg.getBlockLimit();
|
||||||
|
@ -636,7 +640,8 @@ private ReentrantLock lockFor(DfsStreamKey key, long position) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private ReentrantLock lockForRef(DfsStreamKey key) {
|
private ReentrantLock lockForRef(DfsStreamKey key) {
|
||||||
return refLocks[(key.hash >>> 1) % refLocks.length];
|
int slot = (key.hash >>> 1) % refLocks[key.packExtPos].length;
|
||||||
|
return refLocks[key.packExtPos][slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AtomicLong[] newCounters() {
|
private static AtomicLong[] newCounters() {
|
||||||
|
|
|
@ -415,8 +415,7 @@ void copyAsIs(PackOutputStream out, DfsObjectToPack src,
|
||||||
try {
|
try {
|
||||||
readFully(src.offset, buf, 0, 20, ctx);
|
readFully(src.offset, buf, 0, 20, ctx);
|
||||||
} catch (IOException ioError) {
|
} catch (IOException ioError) {
|
||||||
throw new StoredObjectRepresentationNotAvailableException(src,
|
throw new StoredObjectRepresentationNotAvailableException(ioError);
|
||||||
ioError);
|
|
||||||
}
|
}
|
||||||
int c = buf[0] & 0xff;
|
int c = buf[0] & 0xff;
|
||||||
final int typeCode = (c >> 4) & 7;
|
final int typeCode = (c >> 4) & 7;
|
||||||
|
@ -537,12 +536,11 @@ void copyAsIs(PackOutputStream out, DfsObjectToPack src,
|
||||||
Long.valueOf(src.offset), getFileName()),
|
Long.valueOf(src.offset), getFileName()),
|
||||||
dataFormat);
|
dataFormat);
|
||||||
|
|
||||||
throw new StoredObjectRepresentationNotAvailableException(src,
|
throw new StoredObjectRepresentationNotAvailableException(
|
||||||
corruptObject);
|
corruptObject);
|
||||||
|
|
||||||
} catch (IOException ioError) {
|
} catch (IOException ioError) {
|
||||||
throw new StoredObjectRepresentationNotAvailableException(src,
|
throw new StoredObjectRepresentationNotAvailableException(ioError);
|
||||||
ioError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quickCopy != null) {
|
if (quickCopy != null) {
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
import java.util.zip.Deflater;
|
import java.util.zip.Deflater;
|
||||||
|
|
||||||
import org.eclipse.jgit.internal.storage.file.PackIndex;
|
import org.eclipse.jgit.internal.storage.file.PackIndex;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.lib.AnyObjectId;
|
import org.eclipse.jgit.lib.AnyObjectId;
|
||||||
import org.eclipse.jgit.lib.Constants;
|
import org.eclipse.jgit.lib.Constants;
|
||||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||||
|
import org.eclipse.jgit.transport.PackLock;
|
||||||
import org.eclipse.jgit.transport.PackParser;
|
import org.eclipse.jgit.transport.PackParser;
|
||||||
import org.eclipse.jgit.transport.PackedObjectInfo;
|
import org.eclipse.jgit.transport.PackedObjectInfo;
|
||||||
|
|
||||||
|
|
|
@ -1530,7 +1530,8 @@ private void addRepackAllOption() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@code true} if number of packs > gc.autopacklimit (default 50)
|
* @return {@code true} if number of packs > gc.autopacklimit (default
|
||||||
|
* 50)
|
||||||
*/
|
*/
|
||||||
boolean tooManyPacks() {
|
boolean tooManyPacks() {
|
||||||
int autopacklimit = repo.getConfig().getInt(
|
int autopacklimit = repo.getConfig().getInt(
|
||||||
|
@ -1549,7 +1550,8 @@ boolean tooManyPacks() {
|
||||||
* Quickly estimate number of loose objects, SHA1 is distributed evenly so
|
* Quickly estimate number of loose objects, SHA1 is distributed evenly so
|
||||||
* counting objects in one directory (bucket 17) is sufficient
|
* counting objects in one directory (bucket 17) is sufficient
|
||||||
*
|
*
|
||||||
* @return {@code true} if number of loose objects > gc.auto (default 6700)
|
* @return {@code true} if number of loose objects > gc.auto (default
|
||||||
|
* 6700)
|
||||||
*/
|
*/
|
||||||
boolean tooManyLooseObjects() {
|
boolean tooManyLooseObjects() {
|
||||||
int auto = getLooseObjectLimit();
|
int auto = getLooseObjectLimit();
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
import org.eclipse.jgit.lib.ObjectId;
|
import org.eclipse.jgit.lib.ObjectId;
|
||||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||||
import org.eclipse.jgit.storage.pack.PackConfig;
|
import org.eclipse.jgit.storage.pack.PackConfig;
|
||||||
|
import org.eclipse.jgit.transport.PackLock;
|
||||||
import org.eclipse.jgit.transport.PackParser;
|
import org.eclipse.jgit.transport.PackParser;
|
||||||
import org.eclipse.jgit.transport.PackedObjectInfo;
|
import org.eclipse.jgit.transport.PackedObjectInfo;
|
||||||
import org.eclipse.jgit.util.FileUtils;
|
import org.eclipse.jgit.util.FileUtils;
|
||||||
|
@ -431,7 +432,7 @@ private PackLock renameAndOpenPack(String lockMessage)
|
||||||
File packDir = new File(db.getDirectory(), "pack"); //$NON-NLS-1$
|
File packDir = new File(db.getDirectory(), "pack"); //$NON-NLS-1$
|
||||||
PackFile finalPack = new PackFile(packDir, id, PackExt.PACK);
|
PackFile finalPack = new PackFile(packDir, id, PackExt.PACK);
|
||||||
PackFile finalIdx = finalPack.create(PackExt.INDEX);
|
PackFile finalIdx = finalPack.create(PackExt.INDEX);
|
||||||
final PackLock keep = new PackLock(finalPack, db.getFS());
|
final PackLockImpl keep = new PackLockImpl(finalPack, db.getFS());
|
||||||
|
|
||||||
if (!packDir.exists() && !packDir.mkdir() && !packDir.exists()) {
|
if (!packDir.exists() && !packDir.mkdir() && !packDir.exists()) {
|
||||||
// The objects/pack directory isn't present, and we are unable
|
// The objects/pack directory isn't present, and we are unable
|
||||||
|
|
|
@ -521,12 +521,11 @@ private void copyAsIs2(PackOutputStream out, LocalObjectToPack src,
|
||||||
Long.valueOf(src.offset), getPackFile()),
|
Long.valueOf(src.offset), getPackFile()),
|
||||||
dataFormat);
|
dataFormat);
|
||||||
|
|
||||||
throw new StoredObjectRepresentationNotAvailableException(src,
|
throw new StoredObjectRepresentationNotAvailableException(
|
||||||
corruptObject);
|
corruptObject);
|
||||||
|
|
||||||
} catch (IOException ioError) {
|
} catch (IOException ioError) {
|
||||||
throw new StoredObjectRepresentationNotAvailableException(src,
|
throw new StoredObjectRepresentationNotAvailableException(ioError);
|
||||||
ioError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quickCopy != null) {
|
if (quickCopy != null) {
|
||||||
|
@ -611,7 +610,7 @@ private synchronized void beginCopyAsIs(ObjectToPack otp)
|
||||||
try {
|
try {
|
||||||
doOpen();
|
doOpen();
|
||||||
} catch (IOException thisPackNotValid) {
|
} catch (IOException thisPackNotValid) {
|
||||||
throw new StoredObjectRepresentationNotAvailableException(otp,
|
throw new StoredObjectRepresentationNotAvailableException(
|
||||||
thisPackNotValid);
|
thisPackNotValid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.eclipse.jgit.lib.Constants;
|
import org.eclipse.jgit.lib.Constants;
|
||||||
|
import org.eclipse.jgit.transport.PackLock;
|
||||||
import org.eclipse.jgit.util.FS;
|
import org.eclipse.jgit.util.FS;
|
||||||
import org.eclipse.jgit.util.FileUtils;
|
import org.eclipse.jgit.util.FileUtils;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
* Keeps track of a {@link org.eclipse.jgit.internal.storage.file.Pack}'s
|
* Keeps track of a {@link org.eclipse.jgit.internal.storage.file.Pack}'s
|
||||||
* associated <code>.keep</code> file.
|
* associated <code>.keep</code> file.
|
||||||
*/
|
*/
|
||||||
public class PackLock {
|
public class PackLockImpl implements PackLock {
|
||||||
private final File keepFile;
|
private final File keepFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +33,7 @@ public class PackLock {
|
||||||
* @param fs
|
* @param fs
|
||||||
* the filesystem abstraction used by the repository.
|
* the filesystem abstraction used by the repository.
|
||||||
*/
|
*/
|
||||||
public PackLock(File packFile, FS fs) {
|
public PackLockImpl(File packFile, FS fs) {
|
||||||
final File p = packFile.getParentFile();
|
final File p = packFile.getParentFile();
|
||||||
final String n = packFile.getName();
|
final String n = packFile.getName();
|
||||||
keepFile = new File(p, n.substring(0, n.length() - 5) + ".keep"); //$NON-NLS-1$
|
keepFile = new File(p, n.substring(0, n.length() - 5) + ".keep"); //$NON-NLS-1$
|
||||||
|
@ -59,12 +60,7 @@ public boolean lock(String msg) throws IOException {
|
||||||
return lf.commit();
|
return lf.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Remove the <code>.keep</code> file that holds this pack in place.
|
|
||||||
*
|
|
||||||
* @throws java.io.IOException
|
|
||||||
* if deletion of .keep file failed
|
|
||||||
*/
|
|
||||||
public void unlock() throws IOException {
|
public void unlock() throws IOException {
|
||||||
FileUtils.delete(keepFile);
|
FileUtils.delete(keepFile);
|
||||||
}
|
}
|
|
@ -142,7 +142,7 @@ public OpenSshConfigFile(@NonNull File home, @NonNull File config,
|
||||||
* real host name, or it may just be a "Host" block in the
|
* real host name, or it may just be a "Host" block in the
|
||||||
* configuration file.
|
* configuration file.
|
||||||
* @param port
|
* @param port
|
||||||
* the user supplied; <= 0 if none
|
* the user supplied; <= 0 if none
|
||||||
* @param userName
|
* @param userName
|
||||||
* the user supplied, may be {@code null} or empty if none given
|
* the user supplied, may be {@code null} or empty if none given
|
||||||
* @return the configuration for the requested name.
|
* @return the configuration for the requested name.
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.charset.UnsupportedCharsetException;
|
import java.nio.charset.UnsupportedCharsetException;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
|
import org.eclipse.jgit.annotations.NonNull;
|
||||||
import org.eclipse.jgit.annotations.Nullable;
|
import org.eclipse.jgit.annotations.Nullable;
|
||||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
|
@ -77,6 +79,9 @@ public String getCommitEncoding() {
|
||||||
* {@code commit.template}. If no {@code i18n.commitEncoding} is specified,
|
* {@code commit.template}. If no {@code i18n.commitEncoding} is specified,
|
||||||
* UTF-8 fallback is used.
|
* UTF-8 fallback is used.
|
||||||
*
|
*
|
||||||
|
* @param repository
|
||||||
|
* to resolve relative path in local git repo config
|
||||||
|
*
|
||||||
* @return content of the commit template or {@code null} if not present.
|
* @return content of the commit template or {@code null} if not present.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* if the template file can not be read
|
* if the template file can not be read
|
||||||
|
@ -84,9 +89,10 @@ public String getCommitEncoding() {
|
||||||
* if the template file does not exists
|
* if the template file does not exists
|
||||||
* @throws ConfigInvalidException
|
* @throws ConfigInvalidException
|
||||||
* if a {@code commitEncoding} is specified and is invalid
|
* if a {@code commitEncoding} is specified and is invalid
|
||||||
|
* @since 6.0
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getCommitTemplateContent()
|
public String getCommitTemplateContent(@NonNull Repository repository)
|
||||||
throws FileNotFoundException, IOException, ConfigInvalidException {
|
throws FileNotFoundException, IOException, ConfigInvalidException {
|
||||||
|
|
||||||
if (commitTemplatePath == null) {
|
if (commitTemplatePath == null) {
|
||||||
|
@ -94,11 +100,17 @@ public String getCommitTemplateContent()
|
||||||
}
|
}
|
||||||
|
|
||||||
File commitTemplateFile;
|
File commitTemplateFile;
|
||||||
|
FS fileSystem = repository.getFS();
|
||||||
if (commitTemplatePath.startsWith("~/")) { //$NON-NLS-1$
|
if (commitTemplatePath.startsWith("~/")) { //$NON-NLS-1$
|
||||||
commitTemplateFile = FS.DETECTED.resolve(FS.DETECTED.userHome(),
|
commitTemplateFile = fileSystem.resolve(fileSystem.userHome(),
|
||||||
commitTemplatePath.substring(2));
|
commitTemplatePath.substring(2));
|
||||||
} else {
|
} else {
|
||||||
commitTemplateFile = FS.DETECTED.resolve(null, commitTemplatePath);
|
commitTemplateFile = fileSystem.resolve(null, commitTemplatePath);
|
||||||
|
}
|
||||||
|
if (!commitTemplateFile.isAbsolute()) {
|
||||||
|
commitTemplateFile = fileSystem.resolve(
|
||||||
|
repository.getWorkTree().getAbsoluteFile(),
|
||||||
|
commitTemplatePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
Charset commitMessageEncoding = getEncoding();
|
Charset commitMessageEncoding = getEncoding();
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
import org.eclipse.jgit.errors.RemoteRepositoryException;
|
import org.eclipse.jgit.errors.RemoteRepositoryException;
|
||||||
import org.eclipse.jgit.errors.TransportException;
|
import org.eclipse.jgit.errors.TransportException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.lib.AnyObjectId;
|
import org.eclipse.jgit.lib.AnyObjectId;
|
||||||
import org.eclipse.jgit.lib.Config;
|
import org.eclipse.jgit.lib.Config;
|
||||||
import org.eclipse.jgit.lib.MutableObjectId;
|
import org.eclipse.jgit.lib.MutableObjectId;
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
import org.eclipse.jgit.errors.PackProtocolException;
|
import org.eclipse.jgit.errors.PackProtocolException;
|
||||||
import org.eclipse.jgit.errors.TransportException;
|
import org.eclipse.jgit.errors.TransportException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||||
import org.eclipse.jgit.lib.ObjectId;
|
import org.eclipse.jgit.lib.ObjectId;
|
||||||
import org.eclipse.jgit.lib.ObjectIdRef;
|
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.jgit.errors.TransportException;
|
import org.eclipse.jgit.errors.TransportException;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.lib.ObjectId;
|
import org.eclipse.jgit.lib.ObjectId;
|
||||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||||
import org.eclipse.jgit.lib.Ref;
|
import org.eclipse.jgit.lib.Ref;
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
import org.eclipse.jgit.errors.TransportException;
|
import org.eclipse.jgit.errors.TransportException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.LockFile;
|
import org.eclipse.jgit.internal.storage.file.LockFile;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.lib.BatchRefUpdate;
|
import org.eclipse.jgit.lib.BatchRefUpdate;
|
||||||
import org.eclipse.jgit.lib.BatchingProgressMonitor;
|
import org.eclipse.jgit.lib.BatchingProgressMonitor;
|
||||||
import org.eclipse.jgit.lib.Constants;
|
import org.eclipse.jgit.lib.Constants;
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others.
|
||||||
|
*
|
||||||
|
* This program and the accompanying materials are made available under the
|
||||||
|
* terms of the Eclipse Distribution License v. 1.0 which is available at
|
||||||
|
* https://www.eclipse.org/org/documents/edl-v10.php.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
package org.eclipse.jgit.transport;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A {@code PackLock} describes a {@code .keep} file that holds a pack in place.
|
||||||
|
* If {@link PackParser#parse(org.eclipse.jgit.lib.ProgressMonitor)} creates
|
||||||
|
* such a pack lock, it returns the lock so that it can be unlocked once the
|
||||||
|
* pack doesn't need a {@code .keep} file anymore.
|
||||||
|
*
|
||||||
|
* @since 6.0
|
||||||
|
*/
|
||||||
|
public interface PackLock {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the {@code .keep} file that holds a pack in place.
|
||||||
|
*
|
||||||
|
* @throws java.io.IOException
|
||||||
|
* if deletion of the {@code .keep} file failed
|
||||||
|
*/
|
||||||
|
void unlock() throws IOException;
|
||||||
|
}
|
|
@ -29,7 +29,6 @@
|
||||||
import org.eclipse.jgit.errors.MissingObjectException;
|
import org.eclipse.jgit.errors.MissingObjectException;
|
||||||
import org.eclipse.jgit.errors.TooLargeObjectInPackException;
|
import org.eclipse.jgit.errors.TooLargeObjectInPackException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.internal.storage.pack.BinaryDelta;
|
import org.eclipse.jgit.internal.storage.pack.BinaryDelta;
|
||||||
import org.eclipse.jgit.lib.AnyObjectId;
|
import org.eclipse.jgit.lib.AnyObjectId;
|
||||||
import org.eclipse.jgit.lib.BatchingProgressMonitor;
|
import org.eclipse.jgit.lib.BatchingProgressMonitor;
|
||||||
|
@ -490,7 +489,7 @@ public ReceivedPackStatistics getReceivedPackStatistics() {
|
||||||
* {@link #setLockMessage(String)}.
|
* {@link #setLockMessage(String)}.
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
* the stream is malformed, or contains corrupt objects.
|
* the stream is malformed, or contains corrupt objects.
|
||||||
* @since 3.0
|
* @since 6.0
|
||||||
*/
|
*/
|
||||||
public final PackLock parse(ProgressMonitor progress) throws IOException {
|
public final PackLock parse(ProgressMonitor progress) throws IOException {
|
||||||
return parse(progress, progress);
|
return parse(progress, progress);
|
||||||
|
@ -509,7 +508,7 @@ public final PackLock parse(ProgressMonitor progress) throws IOException {
|
||||||
* {@link #setLockMessage(String)}.
|
* {@link #setLockMessage(String)}.
|
||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
* the stream is malformed, or contains corrupt objects.
|
* the stream is malformed, or contains corrupt objects.
|
||||||
* @since 3.0
|
* @since 6.0
|
||||||
*/
|
*/
|
||||||
public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving)
|
public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
import org.eclipse.jgit.errors.TooLargePackException;
|
import org.eclipse.jgit.errors.TooLargePackException;
|
||||||
import org.eclipse.jgit.errors.UnpackException;
|
import org.eclipse.jgit.errors.UnpackException;
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.internal.submodule.SubmoduleValidator;
|
import org.eclipse.jgit.internal.submodule.SubmoduleValidator;
|
||||||
import org.eclipse.jgit.internal.submodule.SubmoduleValidator.SubmoduleValidationException;
|
import org.eclipse.jgit.internal.submodule.SubmoduleValidator.SubmoduleValidationException;
|
||||||
import org.eclipse.jgit.internal.transport.connectivity.FullConnectivityChecker;
|
import org.eclipse.jgit.internal.transport.connectivity.FullConnectivityChecker;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public interface SshConfigStore {
|
||||||
* @param hostName
|
* @param hostName
|
||||||
* to look up
|
* to look up
|
||||||
* @param port
|
* @param port
|
||||||
* the user supplied; <= 0 if none
|
* the user supplied; <= 0 if none
|
||||||
* @param userName
|
* @param userName
|
||||||
* the user supplied, may be {@code null} or empty if none given
|
* the user supplied, may be {@code null} or empty if none given
|
||||||
* @return the configuration for the requested name.
|
* @return the configuration for the requested name.
|
||||||
|
@ -68,7 +68,7 @@ public interface SshConfigStore {
|
||||||
* @param hostName
|
* @param hostName
|
||||||
* host name to look up
|
* host name to look up
|
||||||
* @param port
|
* @param port
|
||||||
* port number; <= 0 if none
|
* port number; <= 0 if none
|
||||||
* @param userName
|
* @param userName
|
||||||
* the user name, may be {@code null} or empty if none given
|
* the user name, may be {@code null} or empty if none given
|
||||||
* @return the configuration for the requested name.
|
* @return the configuration for the requested name.
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
import org.eclipse.jgit.internal.JGitText;
|
import org.eclipse.jgit.internal.JGitText;
|
||||||
import org.eclipse.jgit.internal.storage.file.ObjectDirectory;
|
import org.eclipse.jgit.internal.storage.file.ObjectDirectory;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackIndex;
|
import org.eclipse.jgit.internal.storage.file.PackIndex;
|
||||||
import org.eclipse.jgit.internal.storage.file.PackLock;
|
|
||||||
import org.eclipse.jgit.internal.storage.file.UnpackedObject;
|
import org.eclipse.jgit.internal.storage.file.UnpackedObject;
|
||||||
import org.eclipse.jgit.lib.AnyObjectId;
|
import org.eclipse.jgit.lib.AnyObjectId;
|
||||||
import org.eclipse.jgit.lib.Constants;
|
import org.eclipse.jgit.lib.Constants;
|
||||||
|
|
|
@ -59,6 +59,8 @@
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.eclipse.jgit.annotations.NonNull;
|
import org.eclipse.jgit.annotations.NonNull;
|
||||||
import org.eclipse.jgit.annotations.Nullable;
|
import org.eclipse.jgit.annotations.Nullable;
|
||||||
|
@ -94,6 +96,9 @@ public abstract class FS {
|
||||||
*/
|
*/
|
||||||
protected static final Entry[] NO_ENTRIES = {};
|
protected static final Entry[] NO_ENTRIES = {};
|
||||||
|
|
||||||
|
private static final Pattern VERSION = Pattern
|
||||||
|
.compile("\\s(\\d+)\\.(\\d+)\\.(\\d+)"); //$NON-NLS-1$
|
||||||
|
|
||||||
private volatile Boolean supportSymlinks;
|
private volatile Boolean supportSymlinks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1516,26 +1521,76 @@ protected File discoverGitSystemConfig() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trick Git into printing the path to the config file by using "echo"
|
if (parseVersion(v) < makeVersion(2, 8, 0)) {
|
||||||
// as the editor.
|
// --show-origin was introduced in git 2.8.0. For older git: trick
|
||||||
Map<String, String> env = new HashMap<>();
|
// it into printing the path to the config file by using "echo" as
|
||||||
env.put("GIT_EDITOR", "echo"); //$NON-NLS-1$ //$NON-NLS-2$
|
// the editor.
|
||||||
|
Map<String, String> env = new HashMap<>();
|
||||||
|
env.put("GIT_EDITOR", "echo"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
|
String w;
|
||||||
|
try {
|
||||||
|
w = readPipe(gitExe.getParentFile(),
|
||||||
|
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
"--edit" }, //$NON-NLS-1$
|
||||||
|
SystemReader.getInstance().getDefaultCharset().name(),
|
||||||
|
env);
|
||||||
|
} catch (CommandFailedException e) {
|
||||||
|
LOG.warn(e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmptyOrNull(w)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new File(w);
|
||||||
|
}
|
||||||
String w;
|
String w;
|
||||||
try {
|
try {
|
||||||
w = readPipe(gitExe.getParentFile(),
|
w = readPipe(gitExe.getParentFile(),
|
||||||
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
|
new String[] { gitExe.getPath(), "config", "--system", //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
"--edit" }, //$NON-NLS-1$
|
"--show-origin", "--list", "-z" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
SystemReader.getInstance().getDefaultCharset().name(), env);
|
SystemReader.getInstance().getDefaultCharset().name());
|
||||||
} catch (CommandFailedException e) {
|
} catch (CommandFailedException e) {
|
||||||
LOG.warn(e.getMessage());
|
LOG.warn(e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmptyOrNull(w)) {
|
if (w == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// We get NUL-terminated items; the first one will be a file name,
|
||||||
|
// prefixed by "file:". (Using -z is crucial, otherwise git quotes file
|
||||||
|
// names with special characters.)
|
||||||
|
int nul = w.indexOf(0);
|
||||||
|
if (nul <= 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
w = w.substring(0, nul);
|
||||||
|
int colon = w.indexOf(':');
|
||||||
|
if (colon < 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
w = w.substring(colon + 1);
|
||||||
|
return w.isEmpty() ? null : new File(w);
|
||||||
|
}
|
||||||
|
|
||||||
return new File(w);
|
private long parseVersion(String version) {
|
||||||
|
Matcher m = VERSION.matcher(version);
|
||||||
|
if (m.find()) {
|
||||||
|
try {
|
||||||
|
return makeVersion(
|
||||||
|
Integer.parseInt(m.group(1)),
|
||||||
|
Integer.parseInt(m.group(2)),
|
||||||
|
Integer.parseInt(m.group(3)));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long makeVersion(int major, int minor, int patch) {
|
||||||
|
return ((major * 10_000L) + minor) * 10_000L + patch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -162,7 +162,7 @@
|
||||||
<commons-compress-version>1.21</commons-compress-version>
|
<commons-compress-version>1.21</commons-compress-version>
|
||||||
<osgi-core-version>4.3.1</osgi-core-version>
|
<osgi-core-version>4.3.1</osgi-core-version>
|
||||||
<servlet-api-version>3.1.0</servlet-api-version>
|
<servlet-api-version>3.1.0</servlet-api-version>
|
||||||
<jetty-version>9.4.44.v20210927</jetty-version>
|
<jetty-version>10.0.6</jetty-version>
|
||||||
<japicmp-version>0.15.3</japicmp-version>
|
<japicmp-version>0.15.3</japicmp-version>
|
||||||
<httpclient-version>4.5.13</httpclient-version>
|
<httpclient-version>4.5.13</httpclient-version>
|
||||||
<httpcore-version>4.4.14</httpcore-version>
|
<httpcore-version>4.4.14</httpcore-version>
|
||||||
|
|
Loading…
Reference in New Issue