From: Matthias Sohn Date: Mon, 19 Aug 2019 21:41:04 +0000 (+0200) Subject: Merge branch 'stable-5.2' into stable-5.3 X-Git-Tag: v5.3.3.201908210735-r~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18fb58ae05aafb9d7c831e5c4c3c0d375e7492e8;p=jgit.git Merge branch 'stable-5.2' into stable-5.3 * stable-5.2: 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: If0c5010a2cf151ebebb2f2088fac3ee02c5007b9 Signed-off-by: Matthias Sohn --- 18fb58ae05aafb9d7c831e5c4c3c0d375e7492e8 diff --cc org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index aad029ccfc,78bf778cc8..017e2c7aa3 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@@ -653,10 -659,12 +651,10 @@@ public class SmartClientSmartServerTes @Test public void testInitialClone_RedirectTooOften() throws Exception { - FileBasedConfig userConfig = SystemReader.getInstance() - .openUserConfig(null, FS.DETECTED); + StoredConfig userConfig = SystemReader.getInstance() + .getUserConfig(); userConfig.setInt("http", null, "maxRedirects", 3); userConfig.save(); - Repository dst = createBareRepository(); - assertFalse(dst.hasObject(A_txt)); URIish cloneFrom = extendPath(redirectURI, "/response/4/302"); String remoteUri = cloneFrom.toString(); @@@ -692,21 -699,22 +690,21 @@@ @Test public void testInitialClone_RedirectOnPostAllowed() throws Exception { - FileBasedConfig userConfig = SystemReader.getInstance() - .openUserConfig(null, FS.DETECTED); + StoredConfig userConfig = SystemReader.getInstance() + .getUserConfig(); userConfig.setString("http", null, "followRedirects", "true"); userConfig.save(); - Repository dst = createBareRepository(); - assertFalse(dst.hasObject(A_txt)); URIish cloneFrom = extendPath(remoteURI, "/post"); - try (Transport t = Transport.open(dst, cloneFrom)) { + try (Repository dst = createBareRepository(); + Transport t = Transport.open(dst, cloneFrom)) { + assertFalse(dst.getObjectDatabase().has(A_txt)); t.fetch(NullProgressMonitor.INSTANCE, mirror(master)); + assertTrue(dst.getObjectDatabase().has(A_txt)); + assertEquals(B, dst.exactRef(master).getObjectId()); + fsck(dst, B); } - assertTrue(dst.hasObject(A_txt)); - assertEquals(B, dst.exactRef(master).getObjectId()); - fsck(dst, B); - List requests = getRequests(); assertEquals(3, requests.size()); diff --cc org.eclipse.jgit.lfs/.settings/.api_filters index 0000000000,95a45574ec..371f35376d mode 000000,100644..100644 --- a/org.eclipse.jgit.lfs/.settings/.api_filters +++ b/org.eclipse.jgit.lfs/.settings/.api_filters @@@ -1,0 -1,11 +1,11 @@@ + + + + + - - ++ ++ + + + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 1a6a0fcaa5,0000000000..86653bef02 mode 100644,000000..100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@@ -1,89 -1,0 +1,92 @@@ - ++ ++ ++ ++ + - ++ + + + + + + + + + + + + + + + + + + - - - ++ ++ ++ + + + + + + - - ++ ++ + + + + + + + + + + + + + + + + + + + + + - - - - - - ++ ++ ++ ++ ++ ++ + + - - ++ ++ + + + + + + + + + + + + + + + + + + - ++ + - ++ + + + + - ++ diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 31981f2761,0000000000..6beb42e33a mode 100644,000000..100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@@ -1,8 -1,0 +1,8 @@@ +target "jgit-4.10" with source configurePhase + +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" ++include "orbit/R20190602212107-2019-06.tpd" + +location "http://download.eclipse.org/releases/2018-12/" { + org.eclipse.osgi lazy +} diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target index 14cd0d7919,0000000000..0857af3979 mode 100644,000000..100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.target @@@ -1,92 -1,0 +1,92 @@@ + + + - ++ + + + + + + + + + + + + + + + + + + + + + - - ++ ++ + + + + + + - - ++ ++ + + + + + + + + + + + + + + + + + + + + + - - - - - - ++ ++ ++ ++ ++ ++ + + - - ++ ++ + + + + + + + + + + + + + + + + + + - ++ + + + + + + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd index 05002f2349,0000000000..4fc23eda87 mode 100644,000000..100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11-staging.tpd @@@ -1,8 -1,0 +1,8 @@@ +target "jgit-4.11-staging" with source configurePhase + +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" ++include "orbit/R20190602212107-2019-06.tpd" + +location "http://download.eclipse.org/staging/2019-03/" { + org.eclipse.osgi lazy +} diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index f8641ca454,997d9c9832..05488b9c3d --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@@ -1,30 -1,30 +1,30 @@@ - - ++ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 81eb219037,8b3dd0b476..1a2c9a3a16 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@@ -1,7 -1,7 +1,7 @@@ target "jgit-4.6" with source configurePhase -include "projects/jetty-9.4.11.tpd" +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" + include "orbit/R20190602212107-2019-06.tpd" location "http://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 427f9dcf11,03c9a8b528..e82222a0c5 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@@ -1,30 -1,30 +1,30 @@@ - - ++ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index 10a4eb7b6a,e93fc46b59..fc1b046edd --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@@ -1,7 -1,7 +1,7 @@@ target "jgit-4.7" with source configurePhase -include "projects/jetty-9.4.11.tpd" +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" + include "orbit/R20190602212107-2019-06.tpd" location "http://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index fe641efa5c,e29620cc11..0b353db260 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@@ -1,30 -1,30 +1,30 @@@ - - ++ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index daa24dd63c,ba6337dbf9..a8f837e9ca --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@@ -1,7 -1,7 +1,7 @@@ target "jgit-4.8" with source configurePhase -include "projects/jetty-9.4.11.tpd" +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" + include "orbit/R20190602212107-2019-06.tpd" location "http://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 4f63f66355,82a64ce3d5..94a752c74c --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@@ -1,30 -1,30 +1,30 @@@ - - ++ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index d024dca851,d5beea3616..f91f53eb8b --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@@ -1,7 -1,7 +1,7 @@@ target "jgit-4.9" with source configurePhase -include "projects/jetty-9.4.11.tpd" +include "projects/jetty-9.4.14.tpd" - include "orbit/R20190226160451-2019-03.tpd" + include "orbit/R20190602212107-2019-06.tpd" location "http://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --cc org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd index 0000000000,b503092954..65d5c9f1f5 mode 000000,100644..100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20190602212107-2019-06.tpd @@@ -1,0 -1,58 +1,64 @@@ + 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.bouncycastle.bcpg [1.60.0.v20181210-2057,1.60.0.v20181210-2057] ++ org.bouncycastle.bcpg.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057] ++ org.bouncycastle.bcpkix [1.60.0.v20181210-2057,1.60.0.v20181210-2057] ++ org.bouncycastle.bcpkix.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057] ++ org.bouncycastle.bcprov [1.60.0.v20181210-2057,1.60.0.v20181210-2057] ++ org.bouncycastle.bcprov.source [1.60.0.v20181210-2057,1.60.0.v20181210-2057] + 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.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613] ++ org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613] + 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] + } diff --cc org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java index 716711e067,eda8afb10f..eda0fae247 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java @@@ -48,8 -51,9 +51,10 @@@ import java.io.IOException import java.io.InputStreamReader; import java.io.PrintStream; import java.nio.charset.Charset; +import java.nio.file.AccessDeniedException; + import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; + import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.PosixFilePermission; diff --cc pom.xml index 275d1d634a,732308b7cc..afaf890875 --- a/pom.xml +++ b/pom.xml @@@ -182,9 -182,9 +182,9 @@@ yyyyMMddHHmm ${project.build.directory}/META-INF/MANIFEST.MF - 5.1.0.201809111528-r + 5.2.0.201812061821-r 2.0.0 - 0.1.54 + 0.1.55 1.1.1 1.1.6 4.12