Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix NPE in RebaseTodoFile#parseComments
  Fix NPE in ObjectIdOwnerMap#get
  Fix NPE in CommitOnlyTest#getHead
  FileUtils#lastModifiedInstant should not log error if path doesn't exist
  Cache user global and system-wide git configurations
  Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
  Add missing dependencies for running FS_POSIXTest in Eclipse
  Fix javadoc for SystemReader#getInstance
  Improve retry handling when saving FileStoreAttributes fails
  Ensure FSTest uses MockSystemReader
  Make supportsAtomicCreateNewFile return true as default
  Update orbit to R20190602212107-2019-06 to enable backports from master
  Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  Ensure root cause of lock creation failures is logged
  Implement toString in MockSystemReader and MockConfig
  LocalDiskRefTreeDatabaseTest shall use MockSystemReader
  Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader
  Ensure we use MockSystemReader in tests
  Override FileBasedConfig's save method in MockConfig
  Remove FileBasedConfig.load(boolean) introduced in d45219ba
  Disable debug log for FS in org.eclipse.jgit.test
  Bazel: enable logging for tests in org.eclipse.jgit.test
  LockFile: log exception if creation of lock file failed
  Stop using deprecated Constants.CHARACTER_ENCODING

Change-Id: I48c585f3c9287be7d6ddb6b01a1955444e13fa31
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-08-19 17:52:02 +02:00
commit 0eea7368e2
49 changed files with 760 additions and 398 deletions

View File

@ -30,8 +30,8 @@ maven_jar(
maven_jar( maven_jar(
name = "jsch", name = "jsch",
artifact = "com.jcraft:jsch:0.1.54", artifact = "com.jcraft:jsch:0.1.55",
sha1 = "da3584329a263616e277e15462b387addd1b208d", sha1 = "bbd40e5aa7aa3cfad5db34965456cee738a42a50",
) )
maven_jar( maven_jar(
@ -48,14 +48,14 @@ maven_jar(
maven_jar( maven_jar(
name = "httpclient", name = "httpclient",
artifact = "org.apache.httpcomponents:httpclient:4.5.5", artifact = "org.apache.httpcomponents:httpclient:4.5.6",
sha1 = "1603dfd56ebcd583ccdf337b6c3984ac55d89e58", sha1 = "1afe5621985efe90a92d0fbc9be86271efbe796f",
) )
maven_jar( maven_jar(
name = "httpcore", name = "httpcore",
artifact = "org.apache.httpcomponents:httpcore:4.4.9", artifact = "org.apache.httpcomponents:httpcore:4.4.10",
sha1 = "a86ce739e5a7175b4b234c290a00a5fdb80957a0", sha1 = "acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b",
) )
maven_jar( maven_jar(
@ -138,22 +138,22 @@ maven_jar(
maven_jar( maven_jar(
name = "mockito", name = "mockito",
artifact = "org.mockito:mockito-core:2.13.0", artifact = "org.mockito:mockito-core:2.23.0",
sha1 = "8e372943974e4a121fb8617baced8ebfe46d54f0", sha1 = "497ddb32fd5d01f9dbe99a2ec790aeb931dff1b1",
) )
BYTE_BUDDY_VERSION = "1.7.9" BYTE_BUDDY_VERSION = "1.9.0"
maven_jar( maven_jar(
name = "byte_buddy", name = "bytebuddy",
artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION, artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION,
sha1 = "51218a01a882c04d0aba8c028179cce488bbcb58", sha1 = "8cb0d5baae526c9df46ae17693bbba302640538b",
) )
maven_jar( maven_jar(
name = "byte_buddy_agent", name = "bytebuddy-agent",
artifact = "net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION, artifact = "net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION,
sha1 = "a6c65f9da7f467ee1f02ff2841ffd3155aee2fc9", sha1 = "37b5703b4a6290be3fffc63ae9c6bcaaee0ff856",
) )
maven_jar( maven_jar(

View File

@ -162,9 +162,13 @@ java_library(
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = [ exports = [
"@bytebuddy//jar",
"@bytebuddy-agent//jar",
"@hamcrest-core//jar", "@hamcrest-core//jar",
"@hamcrest-library//jar", "@hamcrest-library//jar",
"@junit//jar", "@junit//jar",
"@mockito//jar",
"@objenesis//jar"
], ],
) )
@ -173,8 +177,8 @@ java_library(
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = [ exports = [
"@byte_buddy//jar", "@bytebuddy//jar",
"@byte_buddy_agent//jar", "@bytebuddy-agent//jar",
"@mockito//jar", "@mockito//jar",
"@objenesis//jar", "@objenesis//jar",
], ],

View File

@ -107,7 +107,6 @@
import org.eclipse.jgit.revwalk.RevBlob; import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.transport.AbstractAdvertiseRefsHook; import org.eclipse.jgit.transport.AbstractAdvertiseRefsHook;
import org.eclipse.jgit.transport.AdvertiseRefsHook; import org.eclipse.jgit.transport.AdvertiseRefsHook;
import org.eclipse.jgit.transport.CredentialItem; import org.eclipse.jgit.transport.CredentialItem;
@ -127,7 +126,6 @@
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException; import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException; import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.transport.resolver.UploadPackFactory; import org.eclipse.jgit.transport.resolver.UploadPackFactory;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.HttpSupport; import org.eclipse.jgit.util.HttpSupport;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
@ -652,8 +650,8 @@ public void testInitialClone_RedirectMultiple() throws Exception {
@Test @Test
public void testInitialClone_RedirectMax() throws Exception { public void testInitialClone_RedirectMax() throws Exception {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = SystemReader.getInstance()
.openUserConfig(null, FS.DETECTED); .getUserConfig();
userConfig.setInt("http", null, "maxRedirects", 4); userConfig.setInt("http", null, "maxRedirects", 4);
userConfig.save(); userConfig.save();
initialClone_Redirect(4, 302); initialClone_Redirect(4, 302);
@ -661,8 +659,8 @@ public void testInitialClone_RedirectMax() throws Exception {
@Test @Test
public void testInitialClone_RedirectTooOften() throws Exception { public void testInitialClone_RedirectTooOften() throws Exception {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = SystemReader.getInstance()
.openUserConfig(null, FS.DETECTED); .getUserConfig();
userConfig.setInt("http", null, "maxRedirects", 3); userConfig.setInt("http", null, "maxRedirects", 3);
userConfig.save(); userConfig.save();
Repository dst = createBareRepository(); Repository dst = createBareRepository();
@ -701,8 +699,8 @@ public void testInitialClone_RedirectLoop() throws Exception {
@Test @Test
public void testInitialClone_RedirectOnPostAllowed() throws Exception { public void testInitialClone_RedirectOnPostAllowed() throws Exception {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = SystemReader.getInstance()
.openUserConfig(null, FS.DETECTED); .getUserConfig();
userConfig.setString("http", null, "followRedirects", "true"); userConfig.setString("http", null, "followRedirects", "true");
userConfig.save(); userConfig.save();
Repository dst = createBareRepository(); Repository dst = createBareRepository();
@ -764,8 +762,8 @@ public void testInitialClone_RedirectOnPostForbidden() throws Exception {
@Test @Test
public void testInitialClone_RedirectForbidden() throws Exception { public void testInitialClone_RedirectForbidden() throws Exception {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = SystemReader.getInstance()
.openUserConfig(null, FS.DETECTED); .getUserConfig();
userConfig.setString("http", null, "followRedirects", "false"); userConfig.setString("http", null, "followRedirects", "false");
userConfig.save(); userConfig.save();

View File

@ -128,21 +128,25 @@ public void setUp() throws Exception {
if (!tmp.delete() || !tmp.mkdir()) if (!tmp.delete() || !tmp.mkdir())
throw new IOException("Cannot create " + tmp); throw new IOException("Cannot create " + tmp);
// measure timer resolution before the test to avoid time critical tests mockSystemReader = new MockSystemReader();
// are affected by time needed for measurement SystemReader.setInstance(mockSystemReader);
// Measure timer resolution before the test to avoid time critical tests
// are affected by time needed for measurement.
// The MockSystemReader must be configured first since we need to use
// the same one here
FS.getFileStoreAttributes(tmp.toPath().getParent()); FS.getFileStoreAttributes(tmp.toPath().getParent());
mockSystemReader = new MockSystemReader(); FileBasedConfig userConfig = new FileBasedConfig(
mockSystemReader.userGitConfig = new FileBasedConfig(new File(tmp, new File(tmp, "usergitconfig"), FS.DETECTED);
"usergitconfig"), FS.DETECTED);
// We have to set autoDetach to false for tests, because tests expect to be able // We have to set autoDetach to false for tests, because tests expect to be able
// to clean up by recursively removing the repository, and background GC might be // to clean up by recursively removing the repository, and background GC might be
// in the middle of writing or deleting files, which would disrupt this. // in the middle of writing or deleting files, which would disrupt this.
mockSystemReader.userGitConfig.setBoolean(ConfigConstants.CONFIG_GC_SECTION, userConfig.setBoolean(ConfigConstants.CONFIG_GC_SECTION,
null, ConfigConstants.CONFIG_KEY_AUTODETACH, false); null, ConfigConstants.CONFIG_KEY_AUTODETACH, false);
mockSystemReader.userGitConfig.save(); userConfig.save();
mockSystemReader.setUserGitConfig(userConfig);
ceilTestDirectories(getCeilings()); ceilTestDirectories(getCeilings());
SystemReader.setInstance(mockSystemReader);
author = new PersonIdent("J. Author", "jauthor@example.com"); author = new PersonIdent("J. Author", "jauthor@example.com");
committer = new PersonIdent("J. Committer", "jcommitter@example.com"); committer = new PersonIdent("J. Committer", "jcommitter@example.com");

View File

@ -60,6 +60,7 @@
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
@ -80,20 +81,56 @@ public void load() throws IOException, ConfigInvalidException {
// Do nothing // Do nothing
} }
@Override
public void save() throws IOException {
// Do nothing
}
@Override @Override
public boolean isOutdated() { public boolean isOutdated() {
return false; return false;
} }
@Override
public String toString() {
return "MockConfig";
}
} }
long now = 1250379778668L; // Sat Aug 15 20:12:58 GMT-03:30 2009 long now = 1250379778668L; // Sat Aug 15 20:12:58 GMT-03:30 2009
final Map<String, String> values = new HashMap<>(); final Map<String, String> values = new HashMap<>();
FileBasedConfig userGitConfig; private FileBasedConfig userGitConfig;
FileBasedConfig systemGitConfig; FileBasedConfig systemGitConfig;
/**
* Set the user-level git config
*
* @param userGitConfig
* set another user-level git config
* @return the old user-level git config
*/
public FileBasedConfig setUserGitConfig(FileBasedConfig userGitConfig) {
FileBasedConfig old = this.userGitConfig;
this.userGitConfig = userGitConfig;
return old;
}
/**
* Set the system-level git config
*
* @param systemGitConfig
* the new system-level git config
* @return the old system-level config
*/
public FileBasedConfig setSystemGitConfig(FileBasedConfig systemGitConfig) {
FileBasedConfig old = this.systemGitConfig;
this.systemGitConfig = systemGitConfig;
return old;
}
/** /**
* Constructor for <code>MockSystemReader</code> * Constructor for <code>MockSystemReader</code>
*/ */
@ -156,6 +193,18 @@ public FileBasedConfig openSystemConfig(Config parent, FS fs) {
return systemGitConfig; return systemGitConfig;
} }
@Override
public StoredConfig getUserConfig()
throws IOException, ConfigInvalidException {
return userGitConfig;
}
@Override
public StoredConfig getSystemConfig()
throws IOException, ConfigInvalidException {
return systemGitConfig;
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public String getHostname() { public String getHostname() {
@ -280,4 +329,10 @@ private void resetOsNames() {
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override
public String toString() {
return "MockSystemReader";
}
} }

View File

@ -74,6 +74,7 @@
import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClientBuilder;
import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.junit.http.AppServer; import org.eclipse.jgit.junit.http.AppServer;
import org.eclipse.jgit.lfs.errors.LfsException; import org.eclipse.jgit.lfs.errors.LfsException;
import org.eclipse.jgit.lfs.lib.AnyLongObjectId; import org.eclipse.jgit.lfs.lib.AnyLongObjectId;
@ -85,6 +86,7 @@
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.SystemReader;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -119,6 +121,7 @@ public Path getDir() {
@Before @Before
public void setup() throws Exception { public void setup() throws Exception {
SystemReader.setInstance(new MockSystemReader());
tmp = Files.createTempDirectory("jgit_test_"); tmp = Files.createTempDirectory("jgit_test_");
// measure timer resolution before the test to avoid time critical tests // measure timer resolution before the test to avoid time critical tests

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.jgit.lfs" version="2">
<resource path="META-INF/MANIFEST.MF">
<filter id="924844039">
<message_arguments>
<message_argument value="5.2.3"/>
<message_argument value="5.2.0"/>
</message_arguments>
</filter>
</resource>
</component>

View File

@ -43,14 +43,12 @@
package org.eclipse.jgit.lfs; package org.eclipse.jgit.lfs;
import java.io.IOException; import java.io.IOException;
import java.text.MessageFormat;
import org.eclipse.jgit.api.errors.InvalidConfigurationException;
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lfs.internal.LfsText;
import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.LfsFactory.LfsInstallCommand; import org.eclipse.jgit.util.LfsFactory.LfsInstallCommand;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
@ -70,12 +68,28 @@ public class InstallBuiltinLfsCommand implements LfsInstallCommand {
private Repository repository; private Repository repository;
/** {@inheritDoc} */ /**
* {@inheritDoc}
*
* @throws IOException
* if an I/O error occurs while accessing a git config or
* executing {@code git lfs install} in an external process
* @throws InvalidConfigurationException
* if a git configuration is invalid
* @throws InterruptedException
* if the current thread is interrupted while waiting for the
* {@code git lfs install} executed in an external process
*/
@Override @Override
public Void call() throws Exception { public Void call() throws IOException, InvalidConfigurationException,
InterruptedException {
StoredConfig cfg = null; StoredConfig cfg = null;
if (repository == null) { if (repository == null) {
cfg = loadUserConfig(); try {
cfg = SystemReader.getInstance().getUserConfig();
} catch (ConfigInvalidException e) {
throw new InvalidConfigurationException(e.getMessage(), e);
}
} else { } else {
cfg = repository.getConfig(); cfg = repository.getConfig();
} }
@ -116,19 +130,4 @@ public LfsInstallCommand setRepository(Repository repo) {
return this; return this;
} }
private StoredConfig loadUserConfig() throws IOException {
FileBasedConfig c = SystemReader.getInstance().openUserConfig(null,
FS.DETECTED);
try {
c.load();
} catch (ConfigInvalidException e1) {
throw new IOException(MessageFormat
.format(LfsText.get().userConfigInvalid, c.getFile()
.getAbsolutePath(), e1),
e1);
}
return c;
}
} }

View File

@ -1,7 +1,7 @@
<?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.9-staging" sequenceNumber="1544018574"> <target name="jgit-4.9-staging" sequenceNumber="1566229361">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.9-staging" with source configurePhase target "jgit-4.9-staging" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/staging/2018-12/" { location "http://download.eclipse.org/staging/2018-12/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -1,7 +1,7 @@
<?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.5" sequenceNumber="1544018556"> <target name="jgit-4.5" sequenceNumber="1566229356">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.5" with source configurePhase target "jgit-4.5" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/releases/mars/" { location "http://download.eclipse.org/releases/mars/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -1,7 +1,7 @@
<?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.6" sequenceNumber="1544018561"> <target name="jgit-4.6" sequenceNumber="1566229352">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/releases/neon/" { location "http://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -1,7 +1,7 @@
<?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.7" sequenceNumber="1544018548"> <target name="jgit-4.7" sequenceNumber="1566229348">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/releases/oxygen/" { location "http://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -1,7 +1,7 @@
<?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.8" sequenceNumber="1544018536"> <target name="jgit-4.8" sequenceNumber="1566229344">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/releases/photon/" { location "http://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -1,7 +1,7 @@
<?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.9" sequenceNumber="1544017335"> <target name="jgit-4.9" sequenceNumber="1566229339">
<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.11.v20180605"/> <unit id="org.eclipse.jetty.client" version="9.4.11.v20180605"/>
@ -23,18 +23,18 @@
<repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/> <repository id="jetty-9.4.11" location="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.11.v20180605"/>
</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.apache.ant" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.ant.source" version="1.10.5.v20180808-0324"/> <unit id="org.apache.ant.source" version="1.10.5.v20190526-1402"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <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.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.5.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.9.v20180409-1525"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <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.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
@ -48,16 +48,16 @@
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.6.v20160919-1400"/>
<unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/>
<unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/>
<unit id="org.mockito" version="2.13.0.v20180426-1843"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
<unit id="org.mockito.source" version="2.13.0.v20180426-1843"/> <unit id="org.mockito.source" version="2.23.0.v20190527-1420"/>
<unit id="net.bytebuddy.byte-buddy" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
<unit id="net.bytebuddy.byte-buddy-agent" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/>
<unit id="net.bytebuddy.byte-buddy-agent.source" version="1.7.9.v20180420-1519"/> <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/>
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
<unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/>
<unit id="com.jcraft.jsch" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jsch.source" version="0.1.54.v20170116-1932"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.12.0.v201504281640"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
@ -76,7 +76,7 @@
<unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.core.source" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp" version="2.0.0.v20181102-1323"/>
<unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/> <unit id="org.apache.sshd.sftp.source" version="2.0.0.v20181102-1323"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/repository"/> <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/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"/>

View File

@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.11.tpd" include "projects/jetty-9.4.11.tpd"
include "orbit/R20181128170323-2018-12.tpd" include "orbit/R20190602212107-2019-06.tpd"
location "http://download.eclipse.org/releases/2018-09/" { location "http://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

View File

@ -0,0 +1,58 @@
target "R20190602212107-2019-06" with source configurePhase
// see http://download.eclipse.org/tools/orbit/downloads/
location "http://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository" {
org.apache.ant [1.10.5.v20190526-1402,1.10.5.v20190526-1402]
org.apache.ant.source [1.10.5.v20190526-1402,1.10.5.v20190526-1402]
org.apache.commons.codec [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
org.apache.commons.codec.source [1.10.0.v20180409-1845,1.10.0.v20180409-1845]
org.apache.commons.compress [1.18.0.v20181121-2221,1.18.0.v20181121-2221]
org.apache.commons.compress.source [1.18.0.v20181121-2221,1.18.0.v20181121-2221]
org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
org.apache.httpcomponents.httpclient [4.5.6.v20190503-0009,4.5.6.v20190503-0009]
org.apache.httpcomponents.httpclient.source [4.5.6.v20190503-0009,4.5.6.v20190503-0009]
org.apache.httpcomponents.httpcore [4.4.10.v20190123-2214,4.4.10.v20190123-2214]
org.apache.httpcomponents.httpcore.source [4.4.10.v20190123-2214,4.4.10.v20190123-2214]
org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815]
org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815]
org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
javaewah [1.1.6.v20160919-1400,1.1.6.v20160919-1400]
javaewah.source [1.1.6.v20160919-1400,1.1.6.v20160919-1400]
org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
org.mockito [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
org.mockito.source [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
net.bytebuddy.byte-buddy.source [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.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
org.junit [4.12.0.v201504281640,4.12.0.v201504281640]
org.junit.source [4.12.0.v201504281640,4.12.0.v201504281640]
javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
org.tukaani.xz [1.6.0.v20170629-1752,1.6.0.v20170629-1752]
org.tukaani.xz.source [1.6.0.v20170629-1752,1.6.0.v20170629-1752]
org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305]
com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
org.apache.sshd.core [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
org.apache.sshd.core.source [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
org.apache.sshd.sftp [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
org.apache.sshd.sftp.source [2.0.0.v20181102-1323,2.0.0.v20181102-1323]
}

View File

@ -43,14 +43,14 @@
package org.eclipse.jgit.pgm; package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.HashMap;
import java.util.Map;
import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase; import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -65,6 +65,7 @@ public void setUp() throws Exception {
} }
} }
@SuppressWarnings("boxing")
@Test @Test
public void testListConfig() throws Exception { public void testListConfig() throws Exception {
boolean isWindows = SystemReader.getInstance().getProperty("os.name") boolean isWindows = SystemReader.getInstance().getProperty("os.name")
@ -73,19 +74,31 @@ public void testListConfig() throws Exception {
.equals("Mac OS X"); .equals("Mac OS X");
String[] output = execute("git config --list"); String[] output = execute("git config --list");
List<String> expect = new ArrayList<>();
expect.add("gc.autoDetach=false"); Map<String, String> options = parseOptions(output);
expect.add("core.filemode=" + !isWindows);
expect.add("core.logallrefupdates=true"); assertEquals(!isWindows, Boolean.valueOf(options.get("core.filemode")));
if (isMac) assertTrue((Boolean.valueOf(options.get("core.logallrefupdates"))));
expect.add("core.precomposeunicode=true"); if (isMac) {
expect.add("core.repositoryformatversion=0"); assertTrue(
if (!FS.DETECTED.supportsSymlinks()) (Boolean.valueOf(options.get("core.precomposeunicode"))));
expect.add("core.symlinks=false"); }
expect.add(""); // ends with LF (last line empty) assertEquals(Integer.valueOf(0),
assertEquals("expected default configuration", Integer.valueOf(options.get("core.repositoryformatversion")));
Arrays.asList(expect.toArray()).toString(), }
Arrays.asList(output).toString());
private Map<String, String> parseOptions(String[] output) {
Map<String, String> options = new HashMap<>();
Arrays.stream(output).forEachOrdered(s -> {
int p = s.indexOf('=');
if (p == -1) {
return;
}
String key = s.substring(0, p);
String value = s.substring(p + 1);
options.put(key, value);
});
return options;
} }
} }

View File

@ -49,6 +49,7 @@ java_library(
deps = [ deps = [
"//lib:jsch", "//lib:jsch",
"//lib:junit", "//lib:junit",
"//lib:slf4j-simple",
"//lib:mockito", "//lib:mockito",
"//org.eclipse.jgit:jgit", "//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.junit:junit", "//org.eclipse.jgit.junit:junit",

View File

@ -10,7 +10,7 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
com.jcraft.jsch;version="[0.1.54,0.2.0)", com.jcraft.jsch;version="[0.1.54,0.2.0)",
net.bytebuddy.dynamic.loading;version="[1.7.0,2.0.0)", net.bytebuddy.dynamic.loading;version="[1.9.0,2.0.0)",
org.apache.commons.compress.archivers;version="[1.15.0,2.0)", org.apache.commons.compress.archivers;version="[1.15.0,2.0)",
org.apache.commons.compress.archivers.tar;version="[1.15.0,2.0)", org.apache.commons.compress.archivers.tar;version="[1.15.0,2.0)",
org.apache.commons.compress.archivers.zip;version="[1.15.0,2.0)", org.apache.commons.compress.archivers.zip;version="[1.15.0,2.0)",
@ -72,10 +72,10 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.rules;version="[4.12,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.runner;version="[4.12,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)", org.junit.runners;version="[4.12,5.0.0)",
org.mockito;version="[2.13.0,3.0.0)", org.mockito;version="[2.23.0,3.0.0)",
org.mockito.invocation;version="[2.13.0,3.0.0)", org.mockito.invocation;version="[2.23.0,3.0.0)",
org.mockito.junit;version="[2.13.0,3.0.0)", org.mockito.junit;version="[2.23.0,3.0.0)",
org.mockito.stubbing;version="[2.13.0,3.0.0)", org.mockito.stubbing;version="[2.23.0,3.0.0)",
org.objenesis;version="[2.6.0,3.0.0)", org.objenesis;version="[2.6.0,3.0.0)",
org.slf4j;version="[1.7.0,2.0.0)", org.slf4j;version="[1.7.0,2.0.0)",
org.tukaani.xz;version="[1.6.0,2.0)" org.tukaani.xz;version="[1.6.0,2.0)"

View File

@ -90,7 +90,7 @@
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>2.13.0</version> <version>2.23.0</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -7,8 +7,8 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
#log4j.appender.fileLogger.bufferedIO = true log4j.appender.fileLogger.bufferedIO = true
#log4j.appender.fileLogger.bufferSize = 4096 log4j.appender.fileLogger.bufferSize = 4096
#log4j.logger.org.eclipse.jgit.util.FS = DEBUG #log4j.logger.org.eclipse.jgit.util.FS = DEBUG
#log4j.logger.org.eclipse.jgit.internal.storage.file.FileSnapshot = DEBUG #log4j.logger.org.eclipse.jgit.internal.storage.file.FileSnapshot = DEBUG

View File

@ -0,0 +1,9 @@
org.slf4j.simpleLogger.logFile = System.err
org.slf4j.simpleLogger.cacheOutputStream = true
org.slf4j.simpleLogger.defaultLogLevel = info
org.slf4j.simpleLogger.showDateTime = true
org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSSXXX
org.slf4j.simpleLogger.showThreadName = true
#org.slf4j.simpleLogger.log.org.eclipse.jgit.util.FS = debug
#org.slf4j.simpleLogger.log.org.eclipse.jgit.internal.storage.file.FileSnapshot = debug

View File

@ -68,9 +68,9 @@
import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevBlob; import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.submodule.SubmoduleStatus; import org.eclipse.jgit.submodule.SubmoduleStatus;
import org.eclipse.jgit.submodule.SubmoduleStatusType; import org.eclipse.jgit.submodule.SubmoduleStatusType;
import org.eclipse.jgit.submodule.SubmoduleWalk; import org.eclipse.jgit.submodule.SubmoduleWalk;
@ -654,8 +654,8 @@ public void testCloneWithAutoSetupRebase() throws Exception {
ConfigConstants.CONFIG_BRANCH_SECTION, "test", ConfigConstants.CONFIG_BRANCH_SECTION, "test",
ConfigConstants.CONFIG_KEY_REBASE, null)); ConfigConstants.CONFIG_KEY_REBASE, null));
FileBasedConfig userConfig = SystemReader.getInstance().openUserConfig( StoredConfig userConfig = SystemReader.getInstance()
null, git.getRepository().getFS()); .getUserConfig();
userConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, null, userConfig.setString(ConfigConstants.CONFIG_BRANCH_SECTION, null,
ConfigConstants.CONFIG_KEY_AUTOSETUPREBASE, ConfigConstants.CONFIG_KEY_AUTOSETUPREBASE,
ConfigConstants.CONFIG_KEY_ALWAYS); ConfigConstants.CONFIG_KEY_ALWAYS);

View File

@ -1295,9 +1295,15 @@ static private String getHead(Git git, String path)
try { try {
final Repository repo = git.getRepository(); final Repository repo = git.getRepository();
final ObjectId headId = repo.resolve(Constants.HEAD + "^{commit}"); final ObjectId headId = repo.resolve(Constants.HEAD + "^{commit}");
if (headId == null) {
return "";
}
try (RevWalk rw = new RevWalk(repo)) { try (RevWalk rw = new RevWalk(repo)) {
final TreeWalk tw = TreeWalk.forPath(repo, path, final TreeWalk tw = TreeWalk.forPath(repo, path,
rw.parseTree(headId)); rw.parseTree(headId));
if (tw == null) {
return "";
}
return new String(tw.getObjectReader().open(tw.getObjectId(0)) return new String(tw.getObjectReader().open(tw.getObjectId(0))
.getBytes(), UTF_8); .getBytes(), UTF_8);
} }

View File

@ -62,6 +62,7 @@
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FS.FileStoreAttributes; import org.eclipse.jgit.util.FS.FileStoreAttributes;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
@ -84,6 +85,7 @@ public class FileSnapshotTest {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
SystemReader.setInstance(new MockSystemReader());
trash = Files.createTempDirectory("tmp_"); trash = Files.createTempDirectory("tmp_");
// measure timer resolution before the test to avoid time critical tests // measure timer resolution before the test to avoid time critical tests
// are affected by time needed for measurement // are affected by time needed for measurement

View File

@ -80,6 +80,7 @@ public class LocalDiskRefTreeDatabaseTest extends LocalDiskRepositoryTestCase {
@Override @Override
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp();
FileRepository init = createWorkRepository(); FileRepository init = createWorkRepository();
FileBasedConfig cfg = init.getConfig(); FileBasedConfig cfg = init.getConfig();
cfg.setInt("core", null, "repositoryformatversion", 1); cfg.setInt("core", null, "repositoryformatversion", 1);

View File

@ -56,9 +56,11 @@
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.SystemReader;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -90,6 +92,7 @@ public class FileBasedConfigTest {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
SystemReader.setInstance(new MockSystemReader());
trash = Files.createTempDirectory("tmp_"); trash = Files.createTempDirectory("tmp_");
FS.getFileStoreAttributes(trash.getParent()); FS.getFileStoreAttributes(trash.getParent());
} }

View File

@ -65,6 +65,7 @@
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.errors.CommandFailedException; import org.eclipse.jgit.errors.CommandFailedException;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.RepositoryCache; import org.eclipse.jgit.lib.RepositoryCache;
import org.junit.After; import org.junit.After;
@ -77,6 +78,7 @@ public class FSTest {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
SystemReader.setInstance(new MockSystemReader());
trash = File.createTempFile("tmp_", ""); trash = File.createTempFile("tmp_", "");
trash.delete(); trash.delete();
assertTrue("mkdir " + trash, trash.mkdir()); assertTrue("mkdir " + trash, trash.mkdir());

View File

@ -0,0 +1,139 @@
/*
* Copyright (C) 2019, Vishal Devgire <vishaldevgire@gmail.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the Eclipse Foundation, Inc. nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.eclipse.jgit.util;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class FS_POSIXTest {
private SystemReader originalSystemReaderInstance;
private FileBasedConfig systemConfig;
private FileBasedConfig userConfig;
private Path tmp;
@Before
public void setUp() throws Exception {
tmp = Files.createTempDirectory("jgit_test_");
MockSystemReader mockSystemReader = new MockSystemReader();
SystemReader.setInstance(mockSystemReader);
// Measure timer resolution before the test to avoid time critical tests
// are affected by time needed for measurement.
// The MockSystemReader must be configured first since we need to use
// the same one here
FS.getFileStoreAttributes(tmp.getParent());
systemConfig = new FileBasedConfig(
new File(tmp.toFile(), "systemgitconfig"), FS.DETECTED);
userConfig = new FileBasedConfig(systemConfig,
new File(tmp.toFile(), "usergitconfig"), FS.DETECTED);
// We have to set autoDetach to false for tests, because tests expect to
// be able to clean up by recursively removing the repository, and
// background GC might be in the middle of writing or deleting files,
// which would disrupt this.
userConfig.setBoolean(ConfigConstants.CONFIG_GC_SECTION, null,
ConfigConstants.CONFIG_KEY_AUTODETACH, false);
userConfig.save();
mockSystemReader.setSystemGitConfig(systemConfig);
mockSystemReader.setUserGitConfig(userConfig);
originalSystemReaderInstance = SystemReader.getInstance();
SystemReader.setInstance(mockSystemReader);
}
@After
public void tearDown() throws IOException {
SystemReader.setInstance(originalSystemReaderInstance);
FileUtils.delete(tmp.toFile(), FileUtils.RECURSIVE | FileUtils.RETRY);
}
@Test
public void supportsAtomicCreateNewFile_shouldReturnSupportedAsDefault() {
assertTrue(new FS_POSIX().supportsAtomicCreateNewFile());
}
@Test
public void supportsAtomicCreateNewFile_shouldReturnTrueIfFlagIsSetInUserConfig() {
setAtomicCreateCreationFlag(userConfig, "true");
assertTrue(new FS_POSIX().supportsAtomicCreateNewFile());
}
@Test
public void supportsAtomicCreateNewFile_shouldReturnTrueIfFlagIsSetInSystemConfig() {
setAtomicCreateCreationFlag(systemConfig, "true");
assertTrue(new FS_POSIX().supportsAtomicCreateNewFile());
}
@Test
public void supportsAtomicCreateNewFile_shouldReturnFalseIfFlagUnsetInUserConfig() {
setAtomicCreateCreationFlag(userConfig, "false");
assertFalse(new FS_POSIX().supportsAtomicCreateNewFile());
}
@Test
public void supportsAtomicCreateNewFile_shouldReturnFalseIfFlagUnsetInSystemConfig() {
setAtomicCreateCreationFlag(systemConfig, "false");
assertFalse(new FS_POSIX().supportsAtomicCreateNewFile());
}
private void setAtomicCreateCreationFlag(FileBasedConfig config,
String value) {
config.setString(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_SUPPORTSATOMICFILECREATION, value);
}
}

View File

@ -62,14 +62,6 @@
</message_arguments> </message_arguments>
</filter> </filter>
</resource> </resource>
<resource path="src/org/eclipse/jgit/storage/file/FileBasedConfig.java" type="org.eclipse.jgit.storage.file.FileBasedConfig">
<filter id="1142947843">
<message_arguments>
<message_argument value="5.1.9"/>
<message_argument value="load(boolean)"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/jgit/storage/pack/PackConfig.java" type="org.eclipse.jgit.storage.pack.PackConfig"> <resource path="src/org/eclipse/jgit/storage/pack/PackConfig.java" type="org.eclipse.jgit.storage.pack.PackConfig">
<filter id="336658481"> <filter id="336658481">
<message_arguments> <message_arguments>
@ -240,4 +232,30 @@
</message_arguments> </message_arguments>
</filter> </filter>
</resource> </resource>
<resource path="src/org/eclipse/jgit/util/SystemReader.java" type="org.eclipse.jgit.util.SystemReader">
<filter id="336695337">
<message_arguments>
<message_argument value="org.eclipse.jgit.util.SystemReader"/>
<message_argument value="getSystemConfig()"/>
</message_arguments>
</filter>
<filter id="336695337">
<message_arguments>
<message_argument value="org.eclipse.jgit.util.SystemReader"/>
<message_argument value="getUserConfig()"/>
</message_arguments>
</filter>
<filter id="1142947843">
<message_arguments>
<message_argument value="5.1.9"/>
<message_argument value="getSystemConfig()"/>
</message_arguments>
</filter>
<filter id="1142947843">
<message_arguments>
<message_argument value="5.1.9"/>
<message_argument value="getUserConfig()"/>
</message_arguments>
</filter>
</resource>
</component> </component>

View File

@ -17,6 +17,7 @@ applyingCommit=Applying {0}
archiveFormatAlreadyAbsent=Archive format already absent: {0} archiveFormatAlreadyAbsent=Archive format already absent: {0}
archiveFormatAlreadyRegistered=Archive format already registered with different implementation: {0} archiveFormatAlreadyRegistered=Archive format already registered with different implementation: {0}
argumentIsNotAValidCommentString=Invalid comment: {0} argumentIsNotAValidCommentString=Invalid comment: {0}
assumeAtomicCreateNewFile=Reading option "core.supportsAtomicFileCreation" failed, fallback to default assuming atomic file creation is supported
atLeastOnePathIsRequired=At least one path is required. atLeastOnePathIsRequired=At least one path is required.
atLeastOnePatternIsRequired=At least one pattern is required. atLeastOnePatternIsRequired=At least one pattern is required.
atLeastTwoFiltersNeeded=At least two filters needed. atLeastTwoFiltersNeeded=At least two filters needed.
@ -302,7 +303,8 @@ expectedLessThanGot=expected less than ''{0}'', got ''{1}''
expectedPktLineWithService=expected pkt-line with ''# service=-'', got ''{0}'' expectedPktLineWithService=expected pkt-line with ''# service=-'', got ''{0}''
expectedReceivedContentType=expected Content-Type {0}; received Content-Type {1} expectedReceivedContentType=expected Content-Type {0}; received Content-Type {1}
expectedReportForRefNotReceived={0}: expected report for ref {1} not received expectedReportForRefNotReceived={0}: expected report for ref {1} not received
failedAtomicFileCreation=Atomic file creation failed, number of hard links to file {0} was not 2 but {1}" failedAtomicFileCreation=Atomic file creation failed, number of hard links to file {0} was not 2 but {1}
failedCreateLockFile=Creating lock file {} failed
failedToDetermineFilterDefinition=An exception occurred while determining filter definitions failedToDetermineFilterDefinition=An exception occurred while determining filter definitions
failedUpdatingRefs=failed updating refs failedUpdatingRefs=failed updating refs
failureDueToOneOfTheFollowing=Failure due to one of the following: failureDueToOneOfTheFollowing=Failure due to one of the following:
@ -429,6 +431,7 @@ localRefIsMissingObjects=Local ref {0} is missing object(s).
localRepository=local repository localRepository=local repository
lockCountMustBeGreaterOrEqual1=lockCount must be >= 1 lockCountMustBeGreaterOrEqual1=lockCount must be >= 1
lockError=lock error: {0} lockError=lock error: {0}
lockFailedRetry=locking {0} failed after {1} retries
lockOnNotClosed=Lock on {0} not closed. lockOnNotClosed=Lock on {0} not closed.
lockOnNotHeld=Lock on {0} not held. lockOnNotHeld=Lock on {0} not held.
malformedpersonIdentString=Malformed PersonIdent string (no < was found): {0} malformedpersonIdentString=Malformed PersonIdent string (no < was found): {0}
@ -561,6 +564,7 @@ pushNotPermitted=push not permitted
pushOptionsNotSupported=Push options not supported; received {0} pushOptionsNotSupported=Push options not supported; received {0}
rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry rawLogMessageDoesNotParseAsLogEntry=Raw log message does not parse as log entry
readConfigFailed=Reading config file ''{0}'' failed readConfigFailed=Reading config file ''{0}'' failed
readFileStoreAttributesFailed=Reading FileStore attributes from user config failed
readerIsRequired=Reader is required readerIsRequired=Reader is required
readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0} readingObjectsFromLocalRepositoryFailed=reading objects from local repository failed: {0}
readLastModifiedFailed=Reading lastModified of {0} failed readLastModifiedFailed=Reading lastModified of {0} failed
@ -617,6 +621,7 @@ rewinding=Rewinding to commit {0}
s3ActionDeletion=Deletion s3ActionDeletion=Deletion
s3ActionReading=Reading s3ActionReading=Reading
s3ActionWriting=Writing s3ActionWriting=Writing
saveFileStoreAttributesFailed=Saving measured FileStore attributes to user config failed
searchForReuse=Finding sources searchForReuse=Finding sources
searchForSizes=Getting sizes searchForSizes=Getting sizes
secondsAgo={0} seconds ago secondsAgo={0} seconds ago
@ -775,7 +780,7 @@ uriNotConfigured=Submodule URI not configured
uriNotFound={0} not found uriNotFound={0} not found
uriNotFoundWithMessage={0} not found: {1} uriNotFoundWithMessage={0} not found: {1}
URINotSupported=URI not supported: {0} URINotSupported=URI not supported: {0}
userConfigFileInvalid=User config file {0} invalid {1} userConfigInvalid=Git config in the user's home directory {0} is invalid {1}
validatingGitModules=Validating .gitmodules files validatingGitModules=Validating .gitmodules files
walkFailure=Walk failure. walkFailure=Walk failure.
wantNoSpaceWithCapabilities=No space between oid and first capability in first want line wantNoSpaceWithCapabilities=No space between oid and first capability in first want line

View File

@ -78,6 +78,7 @@ public static JGitText get() {
/***/ public String archiveFormatAlreadyAbsent; /***/ public String archiveFormatAlreadyAbsent;
/***/ public String archiveFormatAlreadyRegistered; /***/ public String archiveFormatAlreadyRegistered;
/***/ public String argumentIsNotAValidCommentString; /***/ public String argumentIsNotAValidCommentString;
/***/ public String assumeAtomicCreateNewFile;
/***/ public String atLeastOnePathIsRequired; /***/ public String atLeastOnePathIsRequired;
/***/ public String atLeastOnePatternIsRequired; /***/ public String atLeastOnePatternIsRequired;
/***/ public String atLeastTwoFiltersNeeded; /***/ public String atLeastTwoFiltersNeeded;
@ -364,6 +365,7 @@ public static JGitText get() {
/***/ public String expectedReceivedContentType; /***/ public String expectedReceivedContentType;
/***/ public String expectedReportForRefNotReceived; /***/ public String expectedReportForRefNotReceived;
/***/ public String failedAtomicFileCreation; /***/ public String failedAtomicFileCreation;
/***/ public String failedCreateLockFile;
/***/ public String failedToDetermineFilterDefinition; /***/ public String failedToDetermineFilterDefinition;
/***/ public String failedUpdatingRefs; /***/ public String failedUpdatingRefs;
/***/ public String failureDueToOneOfTheFollowing; /***/ public String failureDueToOneOfTheFollowing;
@ -490,6 +492,7 @@ public static JGitText get() {
/***/ public String localRepository; /***/ public String localRepository;
/***/ public String lockCountMustBeGreaterOrEqual1; /***/ public String lockCountMustBeGreaterOrEqual1;
/***/ public String lockError; /***/ public String lockError;
/***/ public String lockFailedRetry;
/***/ public String lockOnNotClosed; /***/ public String lockOnNotClosed;
/***/ public String lockOnNotHeld; /***/ public String lockOnNotHeld;
/***/ public String malformedpersonIdentString; /***/ public String malformedpersonIdentString;
@ -622,6 +625,7 @@ public static JGitText get() {
/***/ public String pushOptionsNotSupported; /***/ public String pushOptionsNotSupported;
/***/ public String rawLogMessageDoesNotParseAsLogEntry; /***/ public String rawLogMessageDoesNotParseAsLogEntry;
/***/ public String readConfigFailed; /***/ public String readConfigFailed;
/***/ public String readFileStoreAttributesFailed;
/***/ public String readerIsRequired; /***/ public String readerIsRequired;
/***/ public String readingObjectsFromLocalRepositoryFailed; /***/ public String readingObjectsFromLocalRepositoryFailed;
/***/ public String readLastModifiedFailed; /***/ public String readLastModifiedFailed;
@ -678,6 +682,7 @@ public static JGitText get() {
/***/ public String s3ActionDeletion; /***/ public String s3ActionDeletion;
/***/ public String s3ActionReading; /***/ public String s3ActionReading;
/***/ public String s3ActionWriting; /***/ public String s3ActionWriting;
/***/ public String saveFileStoreAttributesFailed;
/***/ public String searchForReuse; /***/ public String searchForReuse;
/***/ public String searchForSizes; /***/ public String searchForSizes;
/***/ public String secondsAgo; /***/ public String secondsAgo;
@ -835,7 +840,7 @@ public static JGitText get() {
/***/ public String uriNotFound; /***/ public String uriNotFound;
/***/ public String uriNotFoundWithMessage; /***/ public String uriNotFoundWithMessage;
/***/ public String URINotSupported; /***/ public String URINotSupported;
/***/ public String userConfigFileInvalid; /***/ public String userConfigInvalid;
/***/ public String validatingGitModules; /***/ public String validatingGitModules;
/***/ public String walkFailure; /***/ public String walkFailure;
/***/ public String wantNoSpaceWithCapabilities; /***/ public String wantNoSpaceWithCapabilities;

View File

@ -81,15 +81,17 @@
import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.ReflogReader; import org.eclipse.jgit.lib.ReflogReader;
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
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.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.storage.pack.PackConfig; import org.eclipse.jgit.storage.pack.PackConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.RawParseUtils;
import org.eclipse.jgit.util.StringUtils; import org.eclipse.jgit.util.StringUtils;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Represents a Git repository. A repository holds all objects and refs used for * Represents a Git repository. A repository holds all objects and refs used for
@ -116,10 +118,10 @@
* This implementation only handles a subtly undocumented subset of git features. * This implementation only handles a subtly undocumented subset of git features.
*/ */
public class FileRepository extends Repository { public class FileRepository extends Repository {
private static final Logger LOG = LoggerFactory
.getLogger(FileRepository.class);
private static final String UNNAMED = "Unnamed repository; edit this file to name it for gitweb."; //$NON-NLS-1$ private static final String UNNAMED = "Unnamed repository; edit this file to name it for gitweb."; //$NON-NLS-1$
private final FileBasedConfig systemConfig;
private final FileBasedConfig userConfig;
private final FileBasedConfig repoConfig; private final FileBasedConfig repoConfig;
private final RefDatabase refs; private final RefDatabase refs;
private final ObjectDirectory objectDatabase; private final ObjectDirectory objectDatabase;
@ -178,32 +180,16 @@ public FileRepository(String gitDir) throws IOException {
*/ */
public FileRepository(BaseRepositoryBuilder options) throws IOException { public FileRepository(BaseRepositoryBuilder options) throws IOException {
super(options); super(options);
StoredConfig userConfig = null;
if (StringUtils.isEmptyOrNull(SystemReader.getInstance().getenv( try {
Constants.GIT_CONFIG_NOSYSTEM_KEY))) userConfig = SystemReader.getInstance().getUserConfig();
systemConfig = SystemReader.getInstance().openSystemConfig(null, } catch (ConfigInvalidException e) {
getFS()); LOG.error(e.getMessage(), e);
else throw new IOException(e.getMessage(), e);
systemConfig = new FileBasedConfig(null, FS.DETECTED) { }
@Override
public void load() {
// empty, do not load
}
@Override
public boolean isOutdated() {
// regular class would bomb here
return false;
}
};
userConfig = SystemReader.getInstance().openUserConfig(systemConfig,
getFS());
repoConfig = new FileBasedConfig(userConfig, getFS().resolve( repoConfig = new FileBasedConfig(userConfig, getFS().resolve(
getDirectory(), Constants.CONFIG), getDirectory(), Constants.CONFIG),
getFS()); getFS());
loadSystemConfig();
loadUserConfig();
loadRepoConfig(); loadRepoConfig();
repoConfig.addChangeListener(new ConfigChangedListener() { repoConfig.addChangeListener(new ConfigChangedListener() {
@ -247,28 +233,6 @@ public void onConfigChanged(ConfigChangedEvent event) {
} }
} }
private void loadSystemConfig() throws IOException {
try {
systemConfig.load();
} catch (ConfigInvalidException e) {
throw new IOException(MessageFormat.format(JGitText
.get().systemConfigFileInvalid, systemConfig.getFile()
.getAbsolutePath(),
e), e);
}
}
private void loadUserConfig() throws IOException {
try {
userConfig.load();
} catch (ConfigInvalidException e) {
throw new IOException(MessageFormat.format(JGitText
.get().userConfigFileInvalid, userConfig.getFile()
.getAbsolutePath(),
e), e);
}
}
private void loadRepoConfig() throws IOException { private void loadRepoConfig() throws IOException {
try { try {
repoConfig.load(); repoConfig.load();
@ -398,26 +362,13 @@ public RefDatabase getRefDatabase() {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public FileBasedConfig getConfig() { public FileBasedConfig getConfig() {
if (systemConfig.isOutdated()) { try {
try { SystemReader.getInstance().getUserConfig();
loadSystemConfig(); if (repoConfig.isOutdated()) {
} catch (IOException e) { loadRepoConfig();
throw new RuntimeException(e);
} }
} } catch (IOException | ConfigInvalidException e) {
if (userConfig.isOutdated()) { throw new RuntimeException(e);
try {
loadUserConfig();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
if (repoConfig.isOutdated()) {
try {
loadRepoConfig();
} catch (IOException e) {
throw new RuntimeException(e);
}
} }
return repoConfig; return repoConfig;
} }

View File

@ -165,7 +165,12 @@ public LockFile(File f) {
*/ */
public boolean lock() throws IOException { public boolean lock() throws IOException {
FileUtils.mkdirs(lck.getParentFile(), true); FileUtils.mkdirs(lck.getParentFile(), true);
token = FS.DETECTED.createNewFileAtomic(lck); try {
token = FS.DETECTED.createNewFileAtomic(lck);
} catch (IOException e) {
LOG.error(JGitText.get().failedCreateLockFile, lck, e);
throw e;
}
if (token.isCreated()) { if (token.isCreated()) {
haveLck = true; haveLck = true;
try { try {

View File

@ -135,6 +135,9 @@ public void clear() {
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public V get(AnyObjectId toFind) { public V get(AnyObjectId toFind) {
if (toFind == null) {
return null;
}
int h = toFind.w1; int h = toFind.w1;
V obj = directory[h & mask][h >>> SEGMENT_SHIFT]; V obj = directory[h & mask][h >>> SEGMENT_SHIFT];
for (; obj != null; obj = (V) obj.next) for (; obj != null; obj = (V) obj.next)

View File

@ -137,11 +137,13 @@ private static void parseComments(byte[] buf, int tokenBegin,
if (skip != -1) { if (skip != -1) {
// try to parse the line as non-comment // try to parse the line as non-comment
line = parseLine(buf, skip, lineEnd); line = parseLine(buf, skip, lineEnd);
// successfully parsed as non-comment line if (line != null) {
// mark this line as a comment explicitly // successfully parsed as non-comment line
line.setAction(Action.COMMENT); // mark this line as a comment explicitly
// use the read line as comment string line.setAction(Action.COMMENT);
line.setComment(commentString); // use the read line as comment string
line.setComment(commentString);
}
} }
} catch (Exception e) { } catch (Exception e) {
// parsing as non-comment line failed // parsing as non-comment line failed

View File

@ -148,37 +148,13 @@ public final File getFile() {
*/ */
@Override @Override
public void load() throws IOException, ConfigInvalidException { public void load() throws IOException, ConfigInvalidException {
load(true);
}
/**
* Load the configuration as a Git text style configuration file.
* <p>
* If the file does not exist, this configuration is cleared, and thus
* behaves the same as though the file exists, but is empty.
*
* @param useFileSnapshotWithConfig
* if {@code true} use the FileSnapshot with config, otherwise
* use it without config
* @throws IOException
* if IO failed
* @throws ConfigInvalidException
* if config is invalid
* @since 5.1.9
*/
public void load(boolean useFileSnapshotWithConfig)
throws IOException, ConfigInvalidException {
final int maxStaleRetries = 5; final int maxStaleRetries = 5;
int retries = 0; int retries = 0;
while (true) { while (true) {
final FileSnapshot oldSnapshot = snapshot; final FileSnapshot oldSnapshot = snapshot;
final FileSnapshot newSnapshot; final FileSnapshot newSnapshot;
if (useFileSnapshotWithConfig) { // don't use config in this snapshot to avoid endless recursion
newSnapshot = FileSnapshot.save(getFile()); newSnapshot = FileSnapshot.saveNoConfig(getFile());
} else {
// don't use config in this snapshot to avoid endless recursion
newSnapshot = FileSnapshot.saveNoConfig(getFile());
}
try { try {
final byte[] in = IO.readFully(getFile()); final byte[] in = IO.readFully(getFile());
final ObjectId newHash = hash(in); final ObjectId newHash = hash(in);

View File

@ -53,8 +53,7 @@
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.StringUtils; import org.eclipse.jgit.util.StringUtils;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -210,14 +209,12 @@ public HttpConfig(Config config, URIish uri) {
* to get the configuration values for * to get the configuration values for
*/ */
public HttpConfig(URIish uri) { public HttpConfig(URIish uri) {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = null;
.openUserConfig(null, FS.DETECTED);
try { try {
userConfig.load(); userConfig = SystemReader.getInstance().getUserConfig();
} catch (IOException | ConfigInvalidException e) { } catch (IOException | ConfigInvalidException e) {
// Log it and then work with default values. // Log it and then work with default values.
LOG.error(MessageFormat.format(JGitText.get().userConfigFileInvalid, LOG.error(e.getMessage(), e);
userConfig.getFile().getAbsolutePath(), e));
init(new Config(), uri); init(new Config(), uri);
return; return;
} }

View File

@ -108,11 +108,9 @@
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.lib.SymbolicRef; import org.eclipse.jgit.lib.SymbolicRef;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.transport.HttpAuthMethod.Type; import org.eclipse.jgit.transport.HttpAuthMethod.Type;
import org.eclipse.jgit.transport.HttpConfig.HttpRedirectMode; import org.eclipse.jgit.transport.HttpConfig.HttpRedirectMode;
import org.eclipse.jgit.transport.http.HttpConnection; import org.eclipse.jgit.transport.http.HttpConnection;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.HttpSupport; import org.eclipse.jgit.util.HttpSupport;
import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.RawParseUtils;
@ -715,15 +713,13 @@ private void updateSslVerify(StoredConfig config, boolean value) {
} }
private void updateSslVerifyUser(boolean value) { private void updateSslVerifyUser(boolean value) {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig = null;
.openUserConfig(null, FS.DETECTED);
try { try {
userConfig.load(); userConfig = SystemReader.getInstance().getUserConfig();
updateSslVerify(userConfig, value); updateSslVerify(userConfig, value);
} catch (IOException | ConfigInvalidException e) { } catch (IOException | ConfigInvalidException e) {
// Log it, but otherwise ignore here. // Log it, but otherwise ignore here.
LOG.error(MessageFormat.format(JGitText.get().userConfigFileInvalid, LOG.error(e.getMessage(), e);
userConfig.getFile().getAbsolutePath(), e));
} }
} }

View File

@ -100,7 +100,7 @@
import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry; import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry;
import org.eclipse.jgit.treewalk.FileTreeIterator.FileModeStrategy; import org.eclipse.jgit.treewalk.FileTreeIterator.FileModeStrategy;
import org.eclipse.jgit.treewalk.WorkingTreeIterator.Entry; import org.eclipse.jgit.treewalk.WorkingTreeIterator.Entry;
@ -510,18 +510,12 @@ private static void deleteProbe(Path probe) {
private static Optional<FileStoreAttributes> readFromConfig( private static Optional<FileStoreAttributes> readFromConfig(
FileStore s) { FileStore s) {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig;
.openUserConfig(null, FS.DETECTED);
try { try {
userConfig.load(false); userConfig = SystemReader.getInstance().getUserConfig();
} catch (IOException e) { } catch (IOException | ConfigInvalidException e) {
LOG.error(MessageFormat.format(JGitText.get().readConfigFailed, LOG.error(JGitText.get().readFileStoreAttributesFailed, e);
userConfig.getFile().getAbsolutePath()), e); return Optional.empty();
} catch (ConfigInvalidException e) {
LOG.error(MessageFormat.format(
JGitText.get().repositoryConfigFileInvalid,
userConfig.getFile().getAbsolutePath(),
e.getMessage()));
} }
String key = getConfigKey(s); String key = getConfigKey(s);
Duration resolution = Duration.ofNanos(userConfig.getTimeUnit( Duration resolution = Duration.ofNanos(userConfig.getTimeUnit(
@ -544,8 +538,13 @@ private static Optional<FileStoreAttributes> readFromConfig(
private static void saveToConfig(FileStore s, private static void saveToConfig(FileStore s,
FileStoreAttributes c) { FileStoreAttributes c) {
FileBasedConfig userConfig = SystemReader.getInstance() StoredConfig userConfig;
.openUserConfig(null, FS.DETECTED); try {
userConfig = SystemReader.getInstance().getUserConfig();
} catch (IOException | ConfigInvalidException e) {
LOG.error(JGitText.get().saveFileStoreAttributesFailed, e);
return;
}
long resolution = c.getFsTimestampResolution().toNanos(); long resolution = c.getFsTimestampResolution().toNanos();
TimeUnit resolutionUnit = getUnit(resolution); TimeUnit resolutionUnit = getUnit(resolution);
long resolutionValue = resolutionUnit.convert(resolution, long resolutionValue = resolutionUnit.convert(resolution,
@ -562,7 +561,7 @@ private static void saveToConfig(FileStore s,
String key = getConfigKey(s); String key = getConfigKey(s);
while (!succeeded && retries < max_retries) { while (!succeeded && retries < max_retries) {
try { try {
userConfig.load(false); userConfig.load();
userConfig.setString( userConfig.setString(
ConfigConstants.CONFIG_FILESYSTEM_SECTION, key, ConfigConstants.CONFIG_FILESYSTEM_SECTION, key,
ConfigConstants.CONFIG_KEY_TIMESTAMP_RESOLUTION, ConfigConstants.CONFIG_KEY_TIMESTAMP_RESOLUTION,
@ -580,22 +579,30 @@ private static void saveToConfig(FileStore s,
} catch (LockFailedException e) { } catch (LockFailedException e) {
// race with another thread, wait a bit and try again // race with another thread, wait a bit and try again
try { try {
LOG.warn(MessageFormat.format(JGitText.get().cannotLock,
userConfig.getFile().getAbsolutePath()));
retries++; retries++;
Thread.sleep(20); if (retries < max_retries) {
Thread.sleep(100);
LOG.debug("locking {} failed, retries {}/{}", //$NON-NLS-1$
userConfig, Integer.valueOf(retries),
Integer.valueOf(max_retries));
} else {
LOG.warn(MessageFormat.format(
JGitText.get().lockFailedRetry, userConfig,
Integer.valueOf(retries)));
}
} catch (InterruptedException e1) { } catch (InterruptedException e1) {
Thread.interrupted(); Thread.currentThread().interrupt();
break;
} }
} catch (IOException e) { } catch (IOException e) {
LOG.error(MessageFormat.format( LOG.error(MessageFormat.format(
JGitText.get().cannotSaveConfig, JGitText.get().cannotSaveConfig, userConfig), e);
userConfig.getFile().getAbsolutePath()), e); break;
} catch (ConfigInvalidException e) { } catch (ConfigInvalidException e) {
LOG.error(MessageFormat.format( LOG.error(MessageFormat.format(
JGitText.get().repositoryConfigFileInvalid, JGitText.get().repositoryConfigFileInvalid,
userConfig.getFile().getAbsolutePath(), userConfig, e.getMessage()));
e.getMessage())); break;
} }
} }
} }

View File

@ -42,13 +42,18 @@
*/ */
package org.eclipse.jgit.util; package org.eclipse.jgit.util;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_CORE_SECTION;
import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_SUPPORTSATOMICFILECREATION;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.PrintStream; import java.io.PrintStream;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermission;
@ -65,10 +70,9 @@
import org.eclipse.jgit.errors.CommandFailedException; import org.eclipse.jgit.errors.CommandFailedException;
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -85,7 +89,7 @@ public class FS_POSIX extends FS {
private volatile boolean supportsUnixNLink = true; private volatile boolean supportsUnixNLink = true;
private volatile AtomicFileCreation supportsAtomicCreateNewFile = AtomicFileCreation.UNDEFINED; private volatile AtomicFileCreation supportsAtomicFileCreation = AtomicFileCreation.UNDEFINED;
private enum AtomicFileCreation { private enum AtomicFileCreation {
SUPPORTED, NOT_SUPPORTED, UNDEFINED SUPPORTED, NOT_SUPPORTED, UNDEFINED
@ -110,37 +114,6 @@ protected FS_POSIX(FS src) {
} }
} }
private void determineAtomicFileCreationSupport() {
// @TODO: enhance SystemReader to support this without copying code
AtomicFileCreation ret = getAtomicFileCreationSupportOption(
SystemReader.getInstance().openUserConfig(null, this));
if (ret == AtomicFileCreation.UNDEFINED
&& StringUtils.isEmptyOrNull(SystemReader.getInstance()
.getenv(Constants.GIT_CONFIG_NOSYSTEM_KEY))) {
ret = getAtomicFileCreationSupportOption(
SystemReader.getInstance().openSystemConfig(null, this));
}
supportsAtomicCreateNewFile = ret;
}
private AtomicFileCreation getAtomicFileCreationSupportOption(
FileBasedConfig config) {
try {
config.load();
String value = config.getString(ConfigConstants.CONFIG_CORE_SECTION,
null,
ConfigConstants.CONFIG_KEY_SUPPORTSATOMICFILECREATION);
if (value == null) {
return AtomicFileCreation.UNDEFINED;
}
return StringUtils.toBoolean(value)
? AtomicFileCreation.SUPPORTED
: AtomicFileCreation.NOT_SUPPORTED;
} catch (IOException | ConfigInvalidException e) {
return AtomicFileCreation.SUPPORTED;
}
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public FS newInstance() { public FS newInstance() {
@ -355,10 +328,24 @@ public File findHook(Repository repository, String hookName) {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public boolean supportsAtomicCreateNewFile() { public boolean supportsAtomicCreateNewFile() {
if (supportsAtomicCreateNewFile == AtomicFileCreation.UNDEFINED) { if (supportsAtomicFileCreation == AtomicFileCreation.UNDEFINED) {
determineAtomicFileCreationSupport(); try {
StoredConfig config = SystemReader.getInstance().getUserConfig();
String value = config.getString(CONFIG_CORE_SECTION, null,
CONFIG_KEY_SUPPORTSATOMICFILECREATION);
if (value != null) {
supportsAtomicFileCreation = StringUtils.toBoolean(value)
? AtomicFileCreation.SUPPORTED
: AtomicFileCreation.NOT_SUPPORTED;
} else {
supportsAtomicFileCreation = AtomicFileCreation.SUPPORTED;
}
} catch (IOException | ConfigInvalidException e) {
LOG.warn(JGitText.get().assumeAtomicCreateNewFile, e);
supportsAtomicFileCreation = AtomicFileCreation.SUPPORTED;
}
} }
return supportsAtomicCreateNewFile == AtomicFileCreation.SUPPORTED; return supportsAtomicFileCreation == AtomicFileCreation.SUPPORTED;
} }
@Override @Override
@ -422,7 +409,7 @@ public boolean createNewFile(File lock) throws IOException {
* An implementation of the File#createNewFile() semantics which can create * An implementation of the File#createNewFile() semantics which can create
* a unique file atomically also on NFS. If the config option * a unique file atomically also on NFS. If the config option
* {@code core.supportsAtomicCreateNewFile = true} (which is the default) * {@code core.supportsAtomicCreateNewFile = true} (which is the default)
* then simply File#createNewFile() is called. * then simply Files#createFile() is called.
* *
* But if {@code core.supportsAtomicCreateNewFile = false} then after * But if {@code core.supportsAtomicCreateNewFile = false} then after
* successful creation of the lock file a hard link to that lock file is * successful creation of the lock file a hard link to that lock file is
@ -443,14 +430,17 @@ public boolean createNewFile(File lock) throws IOException {
*/ */
@Override @Override
public LockToken createNewFileAtomic(File file) throws IOException { public LockToken createNewFileAtomic(File file) throws IOException {
if (!file.createNewFile()) { Path path;
try {
path = file.toPath();
Files.createFile(path);
} catch (FileAlreadyExistsException | InvalidPathException e) {
return token(false, null); return token(false, null);
} }
if (supportsAtomicCreateNewFile() || !supportsUnixNLink) { if (supportsAtomicCreateNewFile() || !supportsUnixNLink) {
return token(true, null); return token(true, null);
} }
Path link = null; Path link = null;
Path path = file.toPath();
try { try {
link = Files.createLink(Paths.get(uniqueLinkPath(file)), path); link = Files.createLink(Paths.get(uniqueLinkPath(file)), path);
Integer nlink = (Integer) (Files.getAttribute(path, Integer nlink = (Integer) (Files.getAttribute(path,

View File

@ -55,6 +55,7 @@
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.InvalidPathException; import java.nio.file.InvalidPathException;
import java.nio.file.LinkOption; import java.nio.file.LinkOption;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption; import java.nio.file.StandardOpenOption;
@ -677,9 +678,14 @@ static Instant lastModifiedInstant(Path path) {
try { try {
return Files.getLastModifiedTime(path, LinkOption.NOFOLLOW_LINKS) return Files.getLastModifiedTime(path, LinkOption.NOFOLLOW_LINKS)
.toInstant(); .toInstant();
} catch (NoSuchFileException e) {
LOG.debug(
"Cannot read lastModifiedInstant since path {} does not exist", //$NON-NLS-1$
path);
return Instant.EPOCH;
} catch (IOException e) { } catch (IOException e) {
LOG.error(MessageFormat LOG.error(MessageFormat
.format(JGitText.get().readLastModifiedFailed, path)); .format(JGitText.get().readLastModifiedFailed, path), e);
return Instant.ofEpochMilli(path.toFile().lastModified()); return Instant.ofEpochMilli(path.toFile().lastModified());
} }
} }

View File

@ -47,6 +47,7 @@
package org.eclipse.jgit.util; package org.eclipse.jgit.util;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.security.AccessController; import java.security.AccessController;
@ -56,12 +57,17 @@
import java.util.Locale; import java.util.Locale;
import java.util.TimeZone; import java.util.TimeZone;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.errors.CorruptObjectException; import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectChecker; import org.eclipse.jgit.lib.ObjectChecker;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.time.MonotonicClock; import org.eclipse.jgit.util.time.MonotonicClock;
import org.eclipse.jgit.util.time.MonotonicSystemClock; import org.eclipse.jgit.util.time.MonotonicSystemClock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Interface to read values from the system. * Interface to read values from the system.
@ -72,6 +78,10 @@
* </p> * </p>
*/ */
public abstract class SystemReader { public abstract class SystemReader {
private final static Logger LOG = LoggerFactory
.getLogger(SystemReader.class);
private static final SystemReader DEFAULT; private static final SystemReader DEFAULT;
private static Boolean isMacOS; private static Boolean isMacOS;
@ -87,6 +97,10 @@ public abstract class SystemReader {
private static class Default extends SystemReader { private static class Default extends SystemReader {
private volatile String hostname; private volatile String hostname;
private volatile FileBasedConfig systemConfig;
private volatile FileBasedConfig userConfig;
@Override @Override
public String getenv(String variable) { public String getenv(String variable) {
return System.getenv(variable); return System.getenv(variable);
@ -99,28 +113,69 @@ public String getProperty(String key) {
@Override @Override
public FileBasedConfig openSystemConfig(Config parent, FS fs) { public FileBasedConfig openSystemConfig(Config parent, FS fs) {
File configFile = fs.getGitSystemConfig(); if (systemConfig == null) {
if (configFile == null) { systemConfig = createSystemConfig(parent, fs);
return new FileBasedConfig(null, fs) {
@Override
public void load() {
// empty, do not load
}
@Override
public boolean isOutdated() {
// regular class would bomb here
return false;
}
};
} }
return new FileBasedConfig(parent, configFile, fs); return systemConfig;
}
protected FileBasedConfig createSystemConfig(Config parent, FS fs) {
if (StringUtils.isEmptyOrNull(getenv(Constants.GIT_CONFIG_NOSYSTEM_KEY))) {
File configFile = fs.getGitSystemConfig();
if (configFile != null) {
return new FileBasedConfig(parent, configFile, fs);
}
}
return new FileBasedConfig(null, fs) {
@Override
public void load() {
// empty, do not load
}
@Override
public boolean isOutdated() {
// regular class would bomb here
return false;
}
};
} }
@Override @Override
public FileBasedConfig openUserConfig(Config parent, FS fs) { public FileBasedConfig openUserConfig(Config parent, FS fs) {
final File home = fs.userHome(); if (userConfig == null) {
return new FileBasedConfig(parent, new File(home, ".gitconfig"), fs); //$NON-NLS-1$ File home = fs.userHome();
userConfig = new FileBasedConfig(parent,
new File(home, ".gitconfig"), fs); //$NON-NLS-1$
}
return userConfig;
}
@Override
public StoredConfig getSystemConfig()
throws IOException, ConfigInvalidException {
if (systemConfig == null) {
systemConfig = createSystemConfig(null, FS.DETECTED);
}
if (systemConfig.isOutdated()) {
LOG.debug("loading system config {}", systemConfig); //$NON-NLS-1$
systemConfig.load();
}
return systemConfig;
}
@Override
public StoredConfig getUserConfig()
throws IOException, ConfigInvalidException {
if (userConfig == null) {
userConfig = openUserConfig(getSystemConfig(), FS.DETECTED);
} else {
getSystemConfig();
}
if (userConfig.isOutdated()) {
LOG.debug("loading user config {}", userConfig); //$NON-NLS-1$
userConfig.load();
}
return userConfig;
} }
@Override @Override
@ -149,19 +204,19 @@ public int getTimezone(long when) {
} }
} }
private static SystemReader INSTANCE = DEFAULT; private static volatile SystemReader INSTANCE = DEFAULT;
/** /**
* Get time since epoch, with up to millisecond resolution. * Get the current SystemReader instance
* *
* @return time since epoch, with up to millisecond resolution. * @return the current SystemReader instance.
*/ */
public static SystemReader getInstance() { public static SystemReader getInstance() {
return INSTANCE; return INSTANCE;
} }
/** /**
* Set the new instance to use when accessing properties. * Set a new SystemReader instance to use when accessing properties.
* *
* @param newReader * @param newReader
* the new instance to use when accessing properties, or null for * the new instance to use when accessing properties, or null for
@ -225,7 +280,10 @@ protected final void setPlatformChecker() {
public abstract String getProperty(String key); public abstract String getProperty(String key);
/** /**
* Open the git configuration found in the user home * Open the git configuration found in the user home. Use
* {@link #getUserConfig()} to get the current git configuration in the user
* home since it manages automatic reloading when the gitconfig file was
* modified and avoids unnecessary reloads.
* *
* @param parent * @param parent
* a config with values not found directly in the returned config * a config with values not found directly in the returned config
@ -237,7 +295,10 @@ protected final void setPlatformChecker() {
public abstract FileBasedConfig openUserConfig(Config parent, FS fs); public abstract FileBasedConfig openUserConfig(Config parent, FS fs);
/** /**
* Open the gitconfig configuration found in the system-wide "etc" directory * Open the gitconfig configuration found in the system-wide "etc"
* directory. Use {@link #getSystemConfig()} to get the current system-wide
* git configuration since it manages automatic reloading when the gitconfig
* file was modified and avoids unnecessary reloads.
* *
* @param parent * @param parent
* a config with values not found directly in the returned * a config with values not found directly in the returned
@ -250,6 +311,38 @@ protected final void setPlatformChecker() {
*/ */
public abstract FileBasedConfig openSystemConfig(Config parent, FS fs); public abstract FileBasedConfig openSystemConfig(Config parent, FS fs);
/**
* Get the git configuration found in the user home. The configuration will
* be reloaded automatically if the configuration file was modified. Also
* reloads the system config if the system config file was modified. If the
* configuration file wasn't modified returns the cached configuration.
*
* @return the git configuration found in the user home
* @throws ConfigInvalidException
* if configuration is invalid
* @throws IOException
* if something went wrong when reading files
* @since 5.1.9
*/
public abstract StoredConfig getUserConfig()
throws IOException, ConfigInvalidException;
/**
* Get the gitconfig configuration found in the system-wide "etc" directory.
* The configuration will be reloaded automatically if the configuration
* file was modified otherwise returns the cached system level config.
*
* @return the gitconfig configuration found in the system-wide "etc"
* directory
* @throws ConfigInvalidException
* if configuration is invalid
* @throws IOException
* if something went wrong when reading files
* @since 5.1.9
*/
public abstract StoredConfig getSystemConfig()
throws IOException, ConfigInvalidException;
/** /**
* Get the current system time * Get the current system time
* *

View File

@ -184,7 +184,7 @@
<jgit-last-release-version>5.1.0.201809111528-r</jgit-last-release-version> <jgit-last-release-version>5.1.0.201809111528-r</jgit-last-release-version>
<apache-sshd-version>2.0.0</apache-sshd-version> <apache-sshd-version>2.0.0</apache-sshd-version>
<jsch-version>0.1.54</jsch-version> <jsch-version>0.1.55</jsch-version>
<jzlib-version>1.1.1</jzlib-version> <jzlib-version>1.1.1</jzlib-version>
<javaewah-version>1.1.6</javaewah-version> <javaewah-version>1.1.6</javaewah-version>
<junit-version>4.12</junit-version> <junit-version>4.12</junit-version>
@ -195,8 +195,8 @@
<servlet-api-version>3.1.0</servlet-api-version> <servlet-api-version>3.1.0</servlet-api-version>
<jetty-version>9.4.11.v20180605</jetty-version> <jetty-version>9.4.11.v20180605</jetty-version>
<japicmp-version>0.14.1</japicmp-version> <japicmp-version>0.14.1</japicmp-version>
<httpclient-version>4.5.5</httpclient-version> <httpclient-version>4.5.6</httpclient-version>
<httpcore-version>4.4.9</httpcore-version> <httpcore-version>4.4.10</httpcore-version>
<slf4j-version>1.7.2</slf4j-version> <slf4j-version>1.7.2</slf4j-version>
<log4j-version>1.2.15</log4j-version> <log4j-version>1.2.15</log4j-version>
<maven-javadoc-plugin-version>3.1.0</maven-javadoc-plugin-version> <maven-javadoc-plugin-version>3.1.0</maven-javadoc-plugin-version>