diff options
217 files changed, 7608 insertions, 2780 deletions
@@ -11,10 +11,11 @@ build --tool_java_language_version=11 build --tool_java_runtime_version=remotejdk_11 # Builds and executes on RBE using remotejdk_11 -build:remote --java_language_version=11 -build:remote --java_runtime_version=remotejdk_11 -build:remote --tool_java_language_version=11 -build:remote --tool_java_runtime_version=remotejdk_11 +build:remote11 --java_language_version=11 +build:remote11 --java_runtime_version=remotejdk_11 +build:remote11 --tool_java_language_version=11 +build:remote11 --tool_java_runtime_version=remotejdk_11 +build:remote11 --config=remote # Builds using remote_jdk17, executes using remote_jdk11 or local_jdk build:java17 --java_language_version=17 @@ -27,6 +28,7 @@ build:remote17 --java_language_version=17 build:remote17 --java_runtime_version=remotejdk_17 build:remote17 --tool_java_language_version=17 build:remote17 --tool_java_runtime_version=remotejdk_17 +build:remote17 --config=remote test --build_tests_only test --test_output=errors diff --git a/.bazelversion b/.bazelversion index 0062ac9718..6abaeb2f90 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.0.0 +6.2.0 @@ -17,3 +17,4 @@ Shawn Pearce <spearce@spearce.org> Shawn O. Pearce <sop Shawn Pearce <spearce@spearce.org> Shawn Pearce <sop@google.com> Shawn Pearce <spearce@spearce.org> Shawn O. Pearce <spearce@spearce.org> Terry Parker <tparker@google.com> tparker <tparker@google.com> +Thomas Wolf <twolf@apache.org> Thomas Wolf <thomas.wolf@paranor.ch> diff --git a/Documentation/config-options.md b/Documentation/config-options.md index 38ce324df0..9075a5903d 100644 --- a/Documentation/config-options.md +++ b/Documentation/config-options.md @@ -50,6 +50,12 @@ For details on native git options see also the official [git config documentatio | `core.trustPackedRefsStat` | `unset` | ⃞ | Whether to trust the file attributes (Java equivalent of stat command on *nix) of the packed-refs file. If `never` JGit will ignore the file attributes of the packed-refs file and always read it. If `always` JGit will trust the file attributes of the packed-refs file and will only read it if a file attribute has changed. `after_open` behaves the same as `always`, except that the packed-refs file is opened and closed before its file attributes are considered. An open/close of the packed-refs file is known to refresh its file attributes, at least on some NFS clients. If `unset`, JGit will use the behavior described in `trustFolderStat`. | | `core.worktree` | Root directory of the working tree if it is not the parent directory of the `.git` directory | ✅ | The path to the root of the working tree. | +## __fetch__ options + +| option | default | git option | description | +|---------|---------|------------|-------------| +| `fetch.useNegotiationTip` | `false` | ✅ | When enabled it restricts the client negotiation on unrelated branches i.e. only send haves for the refs that the client is interested in fetching. | + ## __gc__ options | option | default | git option | description | @@ -117,4 +123,10 @@ Proxy configuration uses the standard Java mechanisms via class `java.net.ProxyS | option | default | git option | description | |---------|---------|------------|-------------| -| `repack.packKeptObjects` | `true` when `pack.buildBitmaps` is set, `false` otherwise | ✅ | Include objects in packs locked by a `.keep` file when repacking. |
\ No newline at end of file +| `repack.packKeptObjects` | `true` when `pack.buildBitmaps` is set, `false` otherwise | ✅ | Include objects in packs locked by a `.keep` file when repacking. | + +## Java System Properties + +| system property | default | description | +|-----------------|---------|-------------| +| `REVWALK_USE_PRIORITY_QUEUE` | `false` | If set to `true` `RevWalk` uses `DateRevPriorityQueue` which is faster, otherwise it uses the old `DateRevQueue`. | @@ -24,20 +24,20 @@ register_toolchains("//tools:error_prone_warnings_toolchain_java11_definition") register_toolchains("//tools:error_prone_warnings_toolchain_java17_definition") -JMH_VERS = "1.35" +JMH_VERS = "1.37" maven_jar( name = "jmh-core", artifact = "org.openjdk.jmh:jmh-core:" + JMH_VERS, attach_source = False, - sha1 = "c14d712be8e423969fcd344bc801cf5d3ea3b62a", + sha1 = "896f27e49105b35ea1964319c83d12082e7a79ef", ) maven_jar( name = "jmh-annotations", artifact = "org.openjdk.jmh:jmh-generator-annprocess:" + JMH_VERS, attach_source = False, - sha1 = "50fba446d32d22f95f51a391f3450e03af006754", + sha1 = "da93888682df163144edf9b13d2b78e54166063a", ) maven_jar( @@ -74,8 +74,8 @@ maven_jar( maven_jar( name = "javaewah", - artifact = "com.googlecode.javaewah:JavaEWAH:1.1.13", - sha1 = "32cd724a42dc73f99ca08453d11a4bb83e0034c7", + artifact = "com.googlecode.javaewah:JavaEWAH:1.2.3", + sha1 = "13a27c856e0c8808cee9a64032c58eee11c3adc9", ) maven_jar( @@ -90,36 +90,36 @@ maven_jar( sha1 = "51cf043c87253c9f58b539c9f7e44c8894223850", ) -SSHD_VERS = "2.9.2" +SSHD_VERS = "2.10.0" maven_jar( name = "sshd-osgi", artifact = "org.apache.sshd:sshd-osgi:" + SSHD_VERS, - sha1 = "bac0415734519b2fe433fea196017acf7ed32660", + sha1 = "03677ac1da780b7bdb682da50b762d79ea0d940d", ) maven_jar( name = "sshd-sftp", artifact = "org.apache.sshd:sshd-sftp:" + SSHD_VERS, - sha1 = "7f9089c87b3b44f19998252fd3b68637e3322920", + sha1 = "88707339ac0693d48df0ec1bafb84c78d792ed08", ) maven_jar( name = "jna", - artifact = "net.java.dev.jna:jna:5.12.1", - sha1 = "b1e93a735caea94f503e95e6fe79bf9cdc1e985d", + artifact = "net.java.dev.jna:jna:5.13.0", + sha1 = "1200e7ebeedbe0d10062093f32925a912020e747", ) maven_jar( name = "jna-platform", - artifact = "net.java.dev.jna:jna-platform:5.12.1", - sha1 = "097406a297c852f4a41e688a176ec675f72e8329", + artifact = "net.java.dev.jna:jna-platform:5.13.0", + sha1 = "88e9a306715e9379f3122415ef4ae759a352640d", ) maven_jar( name = "commons-codec", - artifact = "commons-codec:commons-codec:1.14", - sha1 = "3cb1181b2141a7e752f5bdc998b7ef1849f726cf", + artifact = "commons-codec:commons-codec:1.15", + sha1 = "49d94806b6e3dc933dacbd8acb0fdbab8ebd1e5d", ) maven_jar( @@ -130,26 +130,26 @@ maven_jar( maven_jar( name = "log-api", - artifact = "org.slf4j:slf4j-api:1.7.30", - sha1 = "b5a4b6d16ab13e34a88fae84c35cd5d68cac922c", + artifact = "org.slf4j:slf4j-api:1.7.36", + sha1 = "6c62681a2f655b49963a5983b8b0950a6120ae14", ) maven_jar( name = "slf4j-simple", - artifact = "org.slf4j:slf4j-simple:1.7.30", - sha1 = "e606eac955f55ecf1d8edcccba04eb8ac98088dd", + artifact = "org.slf4j:slf4j-simple:1.7.36", + sha1 = "a41f9cfe6faafb2eb83a1c7dd2d0dfd844e2a936", ) maven_jar( name = "servlet-api", - artifact = "javax.servlet:javax.servlet-api:4.0.0", - sha1 = "60200affc2fe0165136ed3690faf00b66aed581a", + artifact = "jakarta.servlet:jakarta.servlet-api:4.0.4", + sha1 = "b8a1142e04838fe54194049c6e7a18dae8f9b960", ) maven_jar( name = "commons-compress", - artifact = "org.apache.commons:commons-compress:1.22", - sha1 = "691a8b4e6cf4248c3bc72c8b719337d5cb7359fa", + artifact = "org.apache.commons:commons-compress:1.23.0", + sha1 = "4af2060ea9b0c8b74f1854c6cafe4d43cfc161fc", ) maven_jar( @@ -184,8 +184,8 @@ maven_jar( maven_jar( name = "assertj-core", - artifact = "org.assertj:assertj-core:3.20.2", - sha1 = "66f1f0ebd6db2b24e4a731979171da16ba919cd5", + artifact = "org.assertj:assertj-core:3.24.2", + sha1 = "ebbf338e33f893139459ce5df023115971c2786f", ) BYTE_BUDDY_VERSION = "1.12.18" @@ -214,83 +214,83 @@ maven_jar( sha1 = "b3add478d4382b78ea20b1671390a858002feb6c", ) -JETTY_VER = "10.0.13" +JETTY_VER = "10.0.15" maven_jar( name = "jetty-servlet", artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, - sha1 = "a6ee6e48e98377863aa80f41ea979df678b17966", - src_sha1 = "5a01db2e1bae632879e9b90e845ae946059b46c9", + sha1 = "17e21100d9eabae2c0f560ab2c1d5f0edfc4a57b", + src_sha1 = "989ecc16914e7c8f9f78715dd97d0c511d77a99f", ) maven_jar( name = "jetty-security", artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, - sha1 = "6d4c88cf068709d9f2499ca417b23f3f835b0c43", - src_sha1 = "887e7a7c457e149df9c23db89c7d2425c4444ccf", + sha1 = "ae9c2fd327090fc749a6656109adf88f84f05854", + src_sha1 = "1cae575fc9f3d9271507642606603cca7dc753e8", ) maven_jar( name = "jetty-server", artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, - sha1 = "f472705ebfce7e9a5b6cb8cbb84e73767e35fad7", - src_sha1 = "2689f8e616282b19f34d43f89800f67490ae65fa", + sha1 = "d1e941f30300d64b122d5346f1599ecaa8e270ba", + src_sha1 = "7b04c7d3dc702608306935607bf73ac871816010", ) maven_jar( name = "jetty-http", artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, - sha1 = "b3dc7ec1da090106031dd36cb1e2637a7fb6ce1c", - src_sha1 = "1bbb620e34218584bfdf11542e2b46781437335d", + sha1 = "53c4702201c33501bc37a982e5325b5f11084a4e", + src_sha1 = "2cf03c695ea19c1af5668f5c97dac59e3027eb55", ) maven_jar( name = "jetty-io", artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, - sha1 = "be9d7f226022b02e174a83d597d088e22e12d365", - src_sha1 = "48f5b1ce8570a9d560e62c39170e754288a1d290", + sha1 = "4481d9593bb89c4da016e49463b0d477faca06dc", + src_sha1 = "c9f241cce63ac929d4b8bd859c761ba83f4a3124", ) maven_jar( name = "jetty-util", artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, - sha1 = "35caf3afb3cca22ca4bc36908bf82e6d973c5be4", - src_sha1 = "9d7c19deb76c0247ad0d25afce6e4c0d681d2af0", + sha1 = "eb8901d419e83f2f06809e0cdceaf38b06426f01", + src_sha1 = "757ee2bd100c5bd20aebc7e2fdc4ceb99f23b451", ) maven_jar( name = "jetty-util-ajax", artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER, - sha1 = "bc52bc38cb76b5c260ec109661ebcb02393d83a7", - src_sha1 = "b229198672cfb765ce7571e5e0e855e01170f881", + sha1 = "0cde62dd87845dd6c0c7f07db6c901e7d020653b", + src_sha1 = "135448f8b3b3b06f7f3312d222992525ae4bdd25", ) -BOUNCYCASTLE_VER = "1.72" +BOUNCYCASTLE_VER = "1.73" maven_jar( name = "bcpg", artifact = "org.bouncycastle:bcpg-jdk18on:" + BOUNCYCASTLE_VER, - sha1 = "1a36a1740d07869161f6f0d01fae8d72dd1d8320", - src_sha1 = "fe19ed35a28b345d00459de55cd20ad9e1385a4f", + sha1 = "2838f8c35e6e716349ce780c9c88271cab32065d", + src_sha1 = "3ea8d8e88569024cb37c303384d33f12e8be1ca3", ) maven_jar( name = "bcprov", artifact = "org.bouncycastle:bcprov-jdk18on:" + BOUNCYCASTLE_VER, - sha1 = "d8dc62c28a3497d29c93fee3e71c00b27dff41b4", - src_sha1 = "308b5a8a89c29169390210b7b8e2b2534b27ff19", + sha1 = "4bd3de48e5153059fe3f80cbcf86ea221795ee55", + src_sha1 = "665f03dc0b10ef2fc90a11c28e48c84a3a9a7323", ) maven_jar( name = "bcutil", artifact = "org.bouncycastle:bcutil-jdk18on:" + BOUNCYCASTLE_VER, - sha1 = "41f19a69ada3b06fa48781120d8bebe1ba955c77", - src_sha1 = "fc16dc9eb28a2ee6cbe35ecda6ec7e050ddf3cba", + sha1 = "073a680acd04b249a6773f49200092cadb670bf0", + src_sha1 = "573ebc8e83bc846e815e68e4c624f2d0aef941b9", ) maven_jar( name = "bcpkix", artifact = "org.bouncycastle:bcpkix-jdk18on:" + BOUNCYCASTLE_VER, - sha1 = "bb3fdb5162ccd5085e8d7e57fada4d8eaa571f5a", - src_sha1 = "6fa7015a0be76b270e911bf426abf8efd1c5e42d", + sha1 = "fd41dae0f564a93888ed5ade426281de94824717", + src_sha1 = "e11d418a87536d6f5a9537f7cb1f15a3e5c505e9", ) diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index 3ed4d95c30..9659eb2732 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -5,13 +5,13 @@ Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ant.test Bundle-SymbolicName: org.eclipse.jgit.ant.test Bundle-Vendor: %Bundle-Vendor -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.ant.tasks;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.ant.tasks;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index 61e1b57fbe..bd0c93c795 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant.test</artifactId> diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index 1cb6aca1ba..93fdd8d05c 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ant Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)" + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)" Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.ant;version="6.5.1", - org.eclipse.jgit.ant.tasks;version="6.5.1"; +Export-Package: org.eclipse.jgit.ant;version="6.6.2", + org.eclipse.jgit.ant.tasks;version="6.6.2"; uses:="org.apache.tools.ant, org.apache.tools.ant.types" diff --git a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF index 9dc6f642ce..b4e80a3432 100644 --- a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ant - Sources Bundle-SymbolicName: org.eclipse.jgit.ant.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index df42c00a65..5d9d889e61 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant</artifactId> diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF index 446b1d5c70..7f72ee2e76 100644 --- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.archive Bundle-SymbolicName: org.eclipse.jgit.archive -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -13,17 +13,17 @@ Import-Package: org.apache.commons.compress.archivers;version="[1.4,2.0)", org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)", org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)", org.apache.commons.compress.compressors.xz;version="[1.4,2.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.osgi.framework;version="[1.3.0,2.0.0)" Bundle-ActivationPolicy: lazy Bundle-Activator: org.eclipse.jgit.archive.FormatActivator -Export-Package: org.eclipse.jgit.archive;version="6.5.1"; +Export-Package: org.eclipse.jgit.archive;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.api, org.apache.commons.compress.archivers, org.osgi.framework", - org.eclipse.jgit.archive.internal;version="6.5.1";x-internal:=true + org.eclipse.jgit.archive.internal;version="6.6.2";x-internal:=true diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF index 2a1ba49f0c..2ab44a7404 100644 --- a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.archive - Sources Bundle-SymbolicName: org.eclipse.jgit.archive.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml index 615b932817..06e9559b4f 100644 --- a/org.eclipse.jgit.archive/pom.xml +++ b/org.eclipse.jgit.archive/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.archive</artifactId> diff --git a/org.eclipse.jgit.benchmarks/.classpath b/org.eclipse.jgit.benchmarks/.classpath index 8dcf94ed9c..01d71610e6 100644 --- a/org.eclipse.jgit.benchmarks/.classpath +++ b/org.eclipse.jgit.benchmarks/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" output="target/classes" path="src"> + <classpathentry including="**/*.java" kind="src" output="target/classes" path="src"> <attributes> <attribute name="optional" value="true"/> <attribute name="maven.pomderived" value="true"/> @@ -19,18 +19,7 @@ <classpathentry kind="src" path=".apt_generated"> <attributes> <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - <attribute name="ignore_optional_problems" value="true"/> - <attribute name="m2e-apt" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - <attribute name="ignore_optional_problems" value="true"/> - <attribute name="m2e-apt" value="true"/> </attributes> </classpathentry> <classpathentry kind="output" path="target/classes"/> -</classpath>
\ No newline at end of file +</classpath> diff --git a/org.eclipse.jgit.benchmarks/.factorypath b/org.eclipse.jgit.benchmarks/.factorypath deleted file mode 100644 index c631d4ac84..0000000000 --- a/org.eclipse.jgit.benchmarks/.factorypath +++ /dev/null @@ -1,29 +0,0 @@ -<factorypath> - <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-generator-annprocess/1.32/jmh-generator-annprocess-1.32.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/openjdk/jmh/jmh-core/1.32/jmh-core-1.32.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_core/2.9.0/error_prone_core-2.9.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotation/2.9.0/error_prone_annotation-2.9.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_type_annotations/2.9.0/error_prone_type_annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_check_api/2.9.0/error_prone_check_api-2.9.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/io/github/java-diff-utils/java-diff-utils/4.0/java-diff-utils-4.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jgit/org.eclipse.jgit/4.4.1.201607150455-r/org.eclipse.jgit-4.4.1.201607150455-r.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/github/kevinstern/software-and-algorithms/1.0/software-and-algorithms-1.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/github/ben-manes/caffeine/caffeine/2.8.8/caffeine-2.8.8.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/pcollections/pcollections/2.1.2/pcollections-2.1.2.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/auto-common/1.1.2/auto-common-1.1.2.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/dataflow-errorprone/3.15.0/dataflow-errorprone-3.15.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar" enabled="true" runInBatchMode="false"/> - <factorypathentry kind="VARJAR" id="M2_REPO/com/google/auto/service/auto-service-annotations/1.0-rc6/auto-service-annotations-1.0-rc6.jar" enabled="true" runInBatchMode="false"/> -</factorypath> diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml index ae9c6a3236..d96fe48171 100644 --- a/org.eclipse.jgit.benchmarks/pom.xml +++ b/org.eclipse.jgit.benchmarks/pom.xml @@ -14,7 +14,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.eclipse.jgit</groupId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> <artifactId>org.eclipse.jgit.benchmarks</artifactId> <packaging>jar</packaging> @@ -23,7 +23,7 @@ <properties> <java.version>11</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <jmh.version>1.35</jmh.version> + <jmh.version>1.37</jmh.version> <uberjar.name>benchmarks</uberjar.name> </properties> diff --git a/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/revwalk/DateRevQueueBenchmark.java b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/revwalk/DateRevQueueBenchmark.java new file mode 100644 index 0000000000..71075a8b4c --- /dev/null +++ b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/revwalk/DateRevQueueBenchmark.java @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2023, GerritForge Ltd + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.revwalk; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; + +import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.util.FileUtils; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.TearDown; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +@State(Scope.Thread) +public class DateRevQueueBenchmark { + + ThreadLocalRandom commitsIndex = ThreadLocalRandom.current(); + + @State(Scope.Benchmark) + public static class BenchmarkState { + + @Param({ "5", "10", "50", "100", "500", "1000", "5000", "10000", + "50000", "100000", "500000" }) + int numCommits; + + @Param({ "true", "false" }) + boolean usePriorityQueue; + + int low, count; + + RevCommit[] commits = new RevCommit[numCommits]; + + private Path testDir; + + private TestRepository<Repository> repoUtil; + + DateRevQueue queue; + + @Setup + public void setupBenchmark() throws Exception { + testDir = Files.createTempDirectory("testrepos"); + String repoName = "commits-" + numCommits + "-usePriorityQueue-" + + usePriorityQueue; + Path workDir = testDir.resolve(repoName); + Git git = Git.init().setDirectory(workDir.toFile()).call(); + repoUtil = new TestRepository<>(git.getRepository()); + + RevCommit parent = repoUtil.commit().create(); + commits = new RevCommit[numCommits]; + commits[0] = parent; + for (int i = 1; i < numCommits; i++) { + parent = repoUtil.parseBody(repoUtil.commit(i, parent)); + commits[i] = parent; + if (i % 10000 == 0) { + System.out.println(" " + i + " done"); + } + } + + if (usePriorityQueue) { + queue = new DateRevPriorityQueue(false); + } else { + queue = new DateRevQueue(false); + } + + low = 9 * numCommits / 10; + ThreadLocalRandom random = ThreadLocalRandom.current(); + // add 90% * numCommits commits, benchmark adding commits from + // 90-100% + for (int i = 0; i < low; i++) { + RevCommit commit = commits[random.nextInt(numCommits)]; + queue.add(commit); + ++count; + } + } + + @TearDown(Level.Invocation) + public void check() { + // if queue is full remove 10% of its entries + if (++count == numCommits) { + do { + queue.next(); + } while (--count > low); + } + } + + @TearDown + public void teardown() throws IOException { + repoUtil.close(); + FileUtils.delete(testDir.toFile(), + FileUtils.RECURSIVE | FileUtils.RETRY); + } + } + + @Benchmark + @BenchmarkMode({ Mode.AverageTime }) + @OutputTimeUnit(TimeUnit.NANOSECONDS) + @Warmup(iterations = 2, time = 100, timeUnit = TimeUnit.MILLISECONDS) + @Measurement(iterations = 10, time = 10, timeUnit = TimeUnit.SECONDS) + public void testDataRevQueue(BenchmarkState state) throws Exception { + RevCommit commit = state.commits[commitsIndex + .nextInt(state.numCommits)]; + state.queue.add(commit); + } + + public static void main(String[] args) throws RunnerException { + Options opt = new OptionsBuilder() + .include(DateRevQueueBenchmark.class.getSimpleName()).forks(1) + .jvmArgs("-ea").build(); + new Runner(opt).run(); + } + +} diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml index 34d2d7f2c6..868802cc60 100644 --- a/org.eclipse.jgit.coverage/pom.xml +++ b/org.eclipse.jgit.coverage/pom.xml @@ -14,7 +14,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -27,88 +27,88 @@ <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ant</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.archive</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.apache</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.server</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.server</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.pgm</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ui</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ssh.apache</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ant.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.pgm.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.server.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> </dependencies> diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF index 175eaba8a9..f70a9459ad 100644 --- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.gpg.bc.test Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -12,9 +12,9 @@ Import-Package: org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)", org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)", org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)", org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)", - org.eclipse.jgit.gpg.bc.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.gpg.bc.internal.keys;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.sha1;version="[6.5.1,6.6.0)", + org.eclipse.jgit.gpg.bc.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.gpg.bc.internal.keys;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.sha1;version="[6.6.2,6.7.0)", org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml index 92175924c5..2e6d7c8ad9 100644 --- a/org.eclipse.jgit.gpg.bc.test/pom.xml +++ b/org.eclipse.jgit.gpg.bc.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.gpg.bc.test</artifactId> diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF index 23ff36d46e..1df6959ec4 100644 --- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF @@ -3,10 +3,10 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.gpg.bc Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true -Fragment-Host: org.eclipse.jgit;bundle-version="[6.5.1,6.6.0)" +Fragment-Host: org.eclipse.jgit;bundle-version="[6.6.2,6.7.0)" Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)", org.bouncycastle.asn1.cryptlib;version="[1.69.0,2.0.0)", @@ -29,9 +29,9 @@ Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)", org.bouncycastle.util;version="[1.69.0,2.0.0)", org.bouncycastle.util.encoders;version="[1.69.0,2.0.0)", org.bouncycastle.util.io;version="[1.69.0,2.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.gpg.bc;version="6.5.1", - org.eclipse.jgit.gpg.bc.internal;version="6.5.1";x-friends:="org.eclipse.jgit.gpg.bc.test", - org.eclipse.jgit.gpg.bc.internal.keys;version="6.5.1";x-friends:="org.eclipse.jgit.gpg.bc.test" +Export-Package: org.eclipse.jgit.gpg.bc;version="6.6.2", + org.eclipse.jgit.gpg.bc.internal;version="6.6.2";x-friends:="org.eclipse.jgit.gpg.bc.test", + org.eclipse.jgit.gpg.bc.internal.keys;version="6.6.2";x-friends:="org.eclipse.jgit.gpg.bc.test" diff --git a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF index 6604381353..5d97eb9832 100644 --- a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.gpg.bc - Sources Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml index 59484ac982..b44db9f068 100644 --- a/org.eclipse.jgit.gpg.bc/pom.xml +++ b/org.eclipse.jgit.gpg.bc/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.gpg.bc</artifactId> diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF index 0d798b68b3..d28b70068c 100644 --- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.apache Bundle-SymbolicName: org.eclipse.jgit.http.apache -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor @@ -25,11 +25,11 @@ Import-Package: org.apache.http;version="[4.3.0,5.0.0)", org.apache.http.impl.conn;version="[4.4.0,5.0.0)", org.apache.http.params;version="[4.3.0,5.0.0)", org.apache.http.ssl;version="[4.3.0,5.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)" -Export-Package: org.eclipse.jgit.transport.http.apache;version="6.5.1"; + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)" +Export-Package: org.eclipse.jgit.transport.http.apache;version="6.6.2"; uses:="org.apache.http.client, org.eclipse.jgit.transport.http, org.apache.http.entity, diff --git a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF index 4556a0eb78..20b3c64589 100644 --- a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.http.apache - Sources Bundle-SymbolicName: org.eclipse.jgit.http.apache.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml index d9a3370756..ef7bf9922b 100644 --- a/org.eclipse.jgit.http.apache/pom.xml +++ b/org.eclipse.jgit.http.apache/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.apache</artifactId> diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index 4fd2f50196..43c28793c2 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.server Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.http.server;version="6.5.1", - org.eclipse.jgit.http.server.glue;version="6.5.1"; +Export-Package: org.eclipse.jgit.http.server;version="6.6.2", + org.eclipse.jgit.http.server.glue;version="6.6.2"; uses:="javax.servlet,javax.servlet.http", - org.eclipse.jgit.http.server.resolver;version="6.5.1"; + org.eclipse.jgit.http.server.resolver;version="6.6.2"; uses:="org.eclipse.jgit.transport.resolver, org.eclipse.jgit.lib, org.eclipse.jgit.transport, @@ -18,14 +18,14 @@ Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: javax.servlet;version="[2.5.0,5.0.0)", javax.servlet.http;version="[2.5.0,5.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.dfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.parser;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.resolver;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)" + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.dfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.parser;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.resolver;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)" diff --git a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF index f51e928ff5..4c3d78338a 100644 --- a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.http.server - Sources Bundle-SymbolicName: org.eclipse.jgit.http.server.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index ee395aee4d..648575b22d 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.server</artifactId> @@ -42,8 +42,8 @@ </dependency> <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> <scope>provided</scope> </dependency> </dependencies> diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index e8beaab2e1..c589d8eb93 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.test Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -26,26 +26,26 @@ Import-Package: javax.servlet;version="[2.5.0,5.0.0)", org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.http.server;version="[6.5.1,6.6.0)", - org.eclipse.jgit.http.server.glue;version="[6.5.1,6.6.0)", - org.eclipse.jgit.http.server.resolver;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.dfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.reftable;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http.apache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.resolver;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.http.server;version="[6.6.2,6.7.0)", + org.eclipse.jgit.http.server.glue;version="[6.6.2,6.7.0)", + org.eclipse.jgit.http.server.resolver;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.dfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.reftable;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http.apache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.resolver;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest;version="[1.1.0,3.0.0)", org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.http.test/build.properties b/org.eclipse.jgit.http.test/build.properties index a12a660466..0dc5baea36 100644 --- a/org.eclipse.jgit.http.test/build.properties +++ b/org.eclipse.jgit.http.test/build.properties @@ -4,4 +4,4 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.properties -additional.bundles = org.slf4j.binding.simple +additional.bundles = slf4j.simple diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 70ddc71060..a5e677b9ee 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.test</artifactId> diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java index 0ea15d39e5..cda2b32529 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.net.URI; import java.util.HashMap; import java.util.List; +import java.util.Map; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -84,8 +85,15 @@ public class SetAdditionalHeadersTest extends AllFactoriesHttpTestCase { HashMap<String, String> headers = new HashMap<>(); headers.put("Cookie", "someTokenValue=23gBog34"); headers.put("AnotherKey", "someValue"); - ((TransportHttp) t).setAdditionalHeaders(headers); + + @SuppressWarnings("resource") + TransportHttp th = (TransportHttp) t; + th.setAdditionalHeaders(headers); t.openFetch(); + + Map<String, String> h = th.getAdditionalHeaders(); + assertEquals("someTokenValue=23gBog34", h.get("Cookie")); + assertEquals("someValue", h.get("AnotherKey")); } List<AccessEvent> requests = getRequests(); diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 19aa7675b3..98533a4479 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit.http Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy @@ -21,17 +21,17 @@ Import-Package: javax.servlet;version="[2.5.0,5.0.0)", org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.ssl;version="[10.0.0,11.0.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.http.server;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.resolver;version="[6.5.1,6.6.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.http.server;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.resolver;version="[6.6.2,6.7.0)", org.junit;version="[4.13,5.0.0)", org.slf4j.helpers;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.junit.http;version="6.5.1"; +Export-Package: org.eclipse.jgit.junit.http;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.junit, javax.servlet.http, diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF index 13755c7f91..d2a0690963 100644 --- a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit.http - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.http.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index b1699d5273..6618b63e95 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit.http</artifactId> diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index 15df0bb650..8729675924 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF @@ -3,46 +3,46 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit.ssh Bundle-SymbolicName: org.eclipse.jgit.junit.ssh -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.apache.sshd.common;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys;version="[2.9.2,2.10.0)", - org.apache.sshd.common.file.virtualfs;version="[2.9.2,2.10.0)", - org.apache.sshd.common.helpers;version="[2.9.2,2.10.0)", - org.apache.sshd.common.io;version="[2.9.2,2.10.0)", - org.apache.sshd.common.kex;version="[2.9.2,2.10.0)", - org.apache.sshd.common.keyprovider;version="[2.9.2,2.10.0)", - org.apache.sshd.common.session;version="[2.9.2,2.10.0)", - org.apache.sshd.common.signature;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.buffer;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.logging;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.security;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.threads;version="[2.9.2,2.10.0)", - org.apache.sshd.core;version="[2.9.2,2.10.0)", - org.apache.sshd.server;version="[2.9.2,2.10.0)", - org.apache.sshd.server.auth;version="[2.9.2,2.10.0)", - org.apache.sshd.server.auth.gss;version="[2.9.2,2.10.0)", - org.apache.sshd.server.auth.keyboard;version="[2.9.2,2.10.0)", - org.apache.sshd.server.auth.password;version="[2.9.2,2.10.0)", - org.apache.sshd.server.command;version="[2.9.2,2.10.0)", - org.apache.sshd.server.session;version="[2.9.2,2.10.0)", - org.apache.sshd.server.shell;version="[2.9.2,2.10.0)", - org.apache.sshd.server.subsystem;version="[2.9.2,2.10.0)", - org.apache.sshd.sftp;version="[2.9.2,2.10.0)", - org.apache.sshd.sftp.server;version="[2.9.2,2.10.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", +Import-Package: org.apache.sshd.common;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys;version="[2.10.0,2.11.0)", + org.apache.sshd.common.file.virtualfs;version="[2.10.0,2.11.0)", + org.apache.sshd.common.helpers;version="[2.10.0,2.11.0)", + org.apache.sshd.common.io;version="[2.10.0,2.11.0)", + org.apache.sshd.common.kex;version="[2.10.0,2.11.0)", + org.apache.sshd.common.keyprovider;version="[2.10.0,2.11.0)", + org.apache.sshd.common.session;version="[2.10.0,2.11.0)", + org.apache.sshd.common.signature;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.buffer;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.logging;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.security;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.threads;version="[2.10.0,2.11.0)", + org.apache.sshd.core;version="[2.10.0,2.11.0)", + org.apache.sshd.server;version="[2.10.0,2.11.0)", + org.apache.sshd.server.auth;version="[2.10.0,2.11.0)", + org.apache.sshd.server.auth.gss;version="[2.10.0,2.11.0)", + org.apache.sshd.server.auth.keyboard;version="[2.10.0,2.11.0)", + org.apache.sshd.server.auth.password;version="[2.10.0,2.11.0)", + org.apache.sshd.server.command;version="[2.10.0,2.11.0)", + org.apache.sshd.server.session;version="[2.10.0,2.11.0)", + org.apache.sshd.server.shell;version="[2.10.0,2.11.0)", + org.apache.sshd.server.subsystem;version="[2.10.0,2.11.0)", + org.apache.sshd.sftp;version="[2.10.0,2.11.0)", + org.apache.sshd.sftp.server;version="[2.10.0,2.11.0)", + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.junit.ssh;version="6.5.1" +Export-Package: org.eclipse.jgit.junit.ssh;version="6.6.2" diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF index a0b8e72ea5..1bb45a1e16 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit.ssh - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.ssh.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml index 50e6e8460c..1d01ec3e29 100644 --- a/org.eclipse.jgit.junit.ssh/pom.xml +++ b/org.eclipse.jgit.junit.ssh/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit.ssh</artifactId> diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index 479035cd23..f195156432 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -3,35 +3,35 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.dircache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.merge;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="6.5.1", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.time;version="[6.5.1,6.6.0)", +Import-Package: org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.dircache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.merge;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="6.6.2", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.time;version="[6.6.2,6.7.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)", org.junit.runners.model;version="[4.13,5.0.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.junit;version="6.5.1"; +Export-Package: org.eclipse.jgit.junit;version="6.6.2"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, @@ -44,4 +44,4 @@ Export-Package: org.eclipse.jgit.junit;version="6.5.1"; org.junit.runners.model, org.junit.runner, org.eclipse.jgit.util.time", - org.eclipse.jgit.junit.time;version="6.5.1";uses:="org.eclipse.jgit.util.time" + org.eclipse.jgit.junit.time;version="6.6.2";uses:="org.eclipse.jgit.util.time" diff --git a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF index 388479a45e..a420be6410 100644 --- a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index a320406070..a86842ba72 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit</artifactId> diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF index af52de0ad8..432a9f8f9d 100644 --- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.server.test Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -26,24 +26,24 @@ Import-Package: javax.servlet;version="[3.1.0,5.0.0)", org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.server;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.server.fs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.test;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.server;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.server.fs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.test;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml index 747f06a2bc..53d2e0e2df 100644 --- a/org.eclipse.jgit.lfs.server.test/pom.xml +++ b/org.eclipse.jgit.lfs.server.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.server.test</artifactId> diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF index 20b9d106ca..247fcfe23e 100644 --- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF @@ -3,19 +3,19 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.server Bundle-SymbolicName: org.eclipse.jgit.lfs.server -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.lfs.server;version="6.5.1"; +Export-Package: org.eclipse.jgit.lfs.server;version="6.6.2"; uses:="javax.servlet.http, org.eclipse.jgit.lfs.lib", - org.eclipse.jgit.lfs.server.fs;version="6.5.1"; + org.eclipse.jgit.lfs.server.fs;version="6.6.2"; uses:="javax.servlet, javax.servlet.http, org.eclipse.jgit.lfs.server, org.eclipse.jgit.lfs.lib", - org.eclipse.jgit.lfs.server.internal;version="6.5.1";x-internal:=true, - org.eclipse.jgit.lfs.server.s3;version="6.5.1"; + org.eclipse.jgit.lfs.server.internal;version="6.6.2";x-internal:=true, + org.eclipse.jgit.lfs.server.s3;version="6.6.2"; uses:="org.eclipse.jgit.lfs.server, org.eclipse.jgit.lfs.lib" Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -24,15 +24,15 @@ Import-Package: com.google.gson;version="[2.8.0,3.0.0)", javax.servlet.annotation;version="[3.1.0,5.0.0)", javax.servlet.http;version="[3.1.0,5.0.0)", org.apache.http;version="[4.3.0,5.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http.apache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http.apache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF index 93eeea5a8b..1214dafa8b 100644 --- a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.lfs.server - Sources Bundle-SymbolicName: org.eclipse.jgit.lfs.server.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml index 6b99508c9e..623ec95c80 100644 --- a/org.eclipse.jgit.lfs.server/pom.xml +++ b/org.eclipse.jgit.lfs.server/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.server</artifactId> @@ -52,8 +52,8 @@ </dependency> <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> <scope>provided</scope> </dependency> diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF index c1cdf3bfbd..86839773fd 100644 --- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF @@ -3,27 +3,27 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.test Bundle-SymbolicName: org.eclipse.jgit.lfs.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.attributes;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.dfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", +Import-Package: org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.attributes;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.dfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" -Export-Package: org.eclipse.jgit.lfs.test;version="6.5.1";x-friends:="org.eclipse.jgit.lfs.server.test" +Export-Package: org.eclipse.jgit.lfs.test;version="6.6.2";x-friends:="org.eclipse.jgit.lfs.server.test" diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml index a30bd541f9..092d2c038f 100644 --- a/org.eclipse.jgit.lfs.test/pom.xml +++ b/org.eclipse.jgit.lfs.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.test</artifactId> diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF index fb8993b384..9f24a8188d 100644 --- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF @@ -3,32 +3,32 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs Bundle-SymbolicName: org.eclipse.jgit.lfs -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.lfs;version="6.5.1", - org.eclipse.jgit.lfs.errors;version="6.5.1", - org.eclipse.jgit.lfs.internal;version="6.5.1";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server", - org.eclipse.jgit.lfs.lib;version="6.5.1" +Export-Package: org.eclipse.jgit.lfs;version="6.6.2", + org.eclipse.jgit.lfs.errors;version="6.6.2", + org.eclipse.jgit.lfs.internal;version="6.6.2";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server", + org.eclipse.jgit.lfs.lib;version="6.6.2" Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: com.google.gson;version="[2.8.2,3.0.0)", com.google.gson.stream;version="[2.8.2,3.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)";resolution:=optional, - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.attributes;version="[6.5.1,6.6.0)", - org.eclipse.jgit.diff;version="[6.5.1,6.6.0)", - org.eclipse.jgit.dircache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.hooks;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)" + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)";resolution:=optional, + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.attributes;version="[6.6.2,6.7.0)", + org.eclipse.jgit.diff;version="[6.6.2,6.7.0)", + org.eclipse.jgit.dircache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.hooks;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)" diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF index 8525bf5243..decae54132 100644 --- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.lfs - Sources Bundle-SymbolicName: org.eclipse.jgit.lfs.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml index 0279b22d9d..178990fe9f 100644 --- a/org.eclipse.jgit.lfs/pom.xml +++ b/org.eclipse.jgit.lfs/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml index 062b3a49d4..d5db5b2a86 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml index 213017822b..9c9eb31e16 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml index 74758c66c3..b38d002829 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.gpg.bc" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml index ccf9325791..5770ced0ba 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml index 415b11150e..384add81dc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.http.apache" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml index d48944dfb1..104793bcc1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml index 5d3b1c4b36..7b95d3bc33 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.junit" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -24,7 +24,7 @@ <requires> <import plugin="com.jcraft.jsch"/> - <import plugin="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml index 4f3be7a2a4..8cd1c4921d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml index beb0f9b595..0c1cbd025b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.lfs" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml index 35276dd765..6a6fdef263 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml index 6ccd1000a9..c3be1494d7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.pgm" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -35,9 +35,9 @@ version="0.0.0"/> <requires> - <import feature="org.eclipse.jgit" version="6.5.1" match="equivalent"/> - <import feature="org.eclipse.jgit.lfs" version="6.5.1" match="equivalent"/> - <import feature="org.eclipse.jgit.ssh.apache" version="6.5.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="6.6.2" match="equivalent"/> + <import feature="org.eclipse.jgit.lfs" version="6.6.2" match="equivalent"/> + <import feature="org.eclipse.jgit.ssh.apache" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml index ef1b0b8b05..176ca747e5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml index fdea960867..fbdddd9546 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml @@ -39,6 +39,9 @@ <bundle id="org.eclipse.jgit.ui" version="0.0.0"> <category name="JGit-additional-bundles"/> </bundle> + <bundle id="assertj-core"> + <category name="JGit-dependency-bundles"/> + </bundle> <bundle id="com.google.gson"> <category name="JGit-dependency-bundles"/> </bundle> @@ -69,10 +72,10 @@ <bundle id="com.sun.jna.platform.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="javaewah"> + <bundle id="com.googlecode.javaewah.JavaEWAH"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="javaewah.source"> + <bundle id="com.googlecode.javaewah.JavaEWAH.source"> <category name="JGit-dependency-bundles"/> </bundle> <bundle id="jakarta.servlet-api"> @@ -114,16 +117,16 @@ <bundle id="org.apache.ant.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.apache.commons.codec"> + <bundle id="org.apache.commons.commons-codec"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.apache.commons.codec.source"> + <bundle id="org.apache.commons.commons-codec.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.apache.commons.compress"> + <bundle id="org.apache.commons.commons-compress"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.apache.commons.compress.source"> + <bundle id="org.apache.commons.commons-compress.source"> <category name="JGit-dependency-bundles"/> </bundle> <bundle id="org.apache.commons.logging"> @@ -156,28 +159,28 @@ <bundle id="org.apache.sshd.sftp.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcpg"> + <bundle id="bcpg"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcpg.source"> + <bundle id="bcpg.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcpkix"> + <bundle id="bcpkix"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcpkix.source"> + <bundle id="bcpkix.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcprov"> + <bundle id="bcprov"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcprov.source"> + <bundle id="bcprov.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcutil"> + <bundle id="bcutil"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.bouncycastle.bcutil.source"> + <bundle id="bcutil.source"> <category name="JGit-dependency-bundles"/> </bundle> <bundle id="org.kohsuke.args4j"> @@ -186,16 +189,16 @@ <bundle id="org.kohsuke.args4j.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.slf4j.api"> + <bundle id="slf4j.api"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.slf4j.api.source"> + <bundle id="slf4j.api.source"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.slf4j.binding.simple"> + <bundle id="slf4j.simple"> <category name="JGit-dependency-bundles"/> </bundle> - <bundle id="org.slf4j.binding.simple.source"> + <bundle id="slf4j.simple.source"> <category name="JGit-dependency-bundles"/> </bundle> <bundle id="org.tukaani.xz"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index f45cb5a70e..ae31d3ad81 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.repository</artifactId> @@ -107,4 +107,37 @@ <version>${project.version}</version> </dependency> </dependencies> + + <profiles> + <profile> + <id>gpg-sign</id> + <build> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-gpg-plugin</artifactId> + <executions> + <execution> + <id>pgpsigner</id> + <phase>package</phase> + <goals> + <goal>sign-p2-artifacts</goal> + </goals> + <configuration> + <keyname>E3E144E1</keyname> <!-- JGit public key --> + <skipIfJarsigned>true</skipIfJarsigned> <!-- Sign if not already JAR-signed. --> + <forceSignature> + <bundle>bcpg</bundle> + <bundle>bcpkix</bundle> + <bundle>bcprov</bundle> + <bundle>bcutil</bundle> + </forceSignature> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml index 7075f20e0b..2989aa80f0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.source" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml index e49802b59f..fc45feb0ae 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> @@ -30,7 +30,7 @@ <dependency> <groupId>org.eclipse.jgit.feature</groupId> <artifactId>org.eclipse.jgit</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </dependency> </dependencies> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml index c9514f4d90..e838d1f812 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.ssh.apache" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml index 60e984c48d..b93597f319 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml index f39c18a4eb..126c5ba921 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.ssh.jsch" label="%featureName" - version="6.5.1.qualifier" + version="6.6.2.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="6.5.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="6.6.2" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml index 80e21c1324..8f72b4e095 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF index 8b87530c28..7c4a732d99 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF @@ -2,4 +2,4 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: JGit Target Platform Bundle Bundle-SymbolicName: org.eclipse.jgit.target -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index 38e9839cec..33b800b9b9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.21" sequenceNumber="1753133259"> +<target name="jgit-4.21" sequenceNumber="1753139229"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2021-12/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index 9e7f4ac24c..dbd8055ca3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2021-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target index b07928441e..e14dd30130 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.22" sequenceNumber="1677748416"> +<target name="jgit-4.22" sequenceNumber="1686300729"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2021-12/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd index 61a16da2aa..2f8f60ec9d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd @@ -1,7 +1,7 @@ target "jgit-4.22" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2021-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target index e85e43d50d..5455f076ec 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.23" sequenceNumber="1677748416"> +<target name="jgit-4.23" sequenceNumber="1686300730"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2022-03/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd index fde3bb65ec..a4a1c52875 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd @@ -1,7 +1,7 @@ target "jgit-4.23" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2022-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target index 51d8fd5995..c383bce284 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.24" sequenceNumber="1677748416"> +<target name="jgit-4.24" sequenceNumber="1686300729"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2022-06/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd index 6c480c3ca9..980e7f99b9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd @@ -1,7 +1,7 @@ target "jgit-4.24" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2022-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target index b7260bffbe..185b543b03 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.25" sequenceNumber="1677748416"> +<target name="jgit-4.25" sequenceNumber="1686300730"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2022-09/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd index 4542b13258..c6f636efbe 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.tpd @@ -1,7 +1,7 @@ target "jgit-4.25" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2022-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target index 57c9d0d41e..811eb849d8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target @@ -1,93 +1,262 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.26" sequenceNumber="1677748097"> +<target name="jgit-4.26" sequenceNumber="1686300730"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.http" version="10.0.13"/> - <unit id="org.eclipse.jetty.io" version="10.0.13"/> - <unit id="org.eclipse.jetty.security" version="10.0.13"/> - <unit id="org.eclipse.jetty.server" version="10.0.13"/> - <unit id="org.eclipse.jetty.servlet" version="10.0.13"/> - <unit id="org.eclipse.jetty.util" version="10.0.13"/> - <unit id="org.eclipse.jetty.util.ajax" version="10.0.13"/> - <repository id="jetty-10.0.x" location="https://download.eclipse.org/oomph/jetty/release/10.0.13/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="jakarta.servlet-api" version="4.0.0"/> - <unit id="jakarta.servlet-api.source" version="4.0.0"/> - <repository id="jetty-10.0.6" location="https://download.eclipse.org/eclipse/jetty/10.0.6/"/> - </location> - <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="com.google.gson" version="2.10.1.v20230109-0753"/> - <unit id="com.google.gson.source" version="2.10.1.v20230109-0753"/> <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> - <unit id="com.sun.jna" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.source" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/> - <unit id="com.sun.jna.platform.source" version="5.12.1.v20221103-2317"/> - <unit id="javaewah" version="1.1.13.v20211029-0839"/> - <unit id="javaewah.source" version="1.1.13.v20211029-0839"/> - <unit id="net.bytebuddy.byte-buddy" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy.source" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent" version="1.12.18.v20221114-2102"/> - <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.12.18.v20221114-2102"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> - <unit id="org.apache.commons.codec" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.codec.source" version="1.14.0.v20221112-0806"/> - <unit id="org.apache.commons.compress" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.compress.source" version="1.22.0.v20221207-1049"/> - <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> - <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20221207-1049"/> - <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> - <unit id="org.apache.sshd.osgi" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.osgi.source" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp" version="2.9.2.v20221117-1942"/> - <unit id="org.apache.sshd.sftp.source" version="2.9.2.v20221117-1942"/> - <unit id="org.assertj" version="3.20.2.v20210706-1104"/> - <unit id="org.assertj.source" version="3.20.2.v20210706-1104"/> - <unit id="org.bouncycastle.bcpg" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpg.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcprov.source" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil" version="1.72.0.v20221013-1810"/> - <unit id="org.bouncycastle.bcutil.source" version="1.72.0.v20221013-1810"/> - <unit id="org.hamcrest" version="2.2.0.v20210711-0821"/> - <unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.junit" version="4.13.2.v20211018-1956"/> <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> - <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> - <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> - <unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple" version="1.7.30.v20221112-0806"/> - <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20221112-0806"/> - <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> - <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> <repository location="https://download.eclipse.org/releases/2022-12/"/> </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd index 25a223ab60..1e2c19a80c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.tpd @@ -1,7 +1,7 @@ target "jgit-4.26" with source configurePhase -include "projects/jetty-10.0.x.tpd" -include "orbit/R20230302014618-2023-03.tpd" +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" location "https://download.eclipse.org/releases/2022-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target new file mode 100644 index 0000000000..a1e02e7cb2 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?pde?> +<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> +<target name="jgit-4.27" sequenceNumber="1686300730"> + <locations> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> + <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> + <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> + <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> + <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> + <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> + <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> + <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> + <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> + <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> + <unit id="org.junit" version="4.13.2.v20211018-1956"/> + <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> + <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> + <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> + <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> + <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.osgi" version="0.0.0"/> + <repository location="https://download.eclipse.org/releases/2023-03/"/> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + </locations> +</target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd new file mode 100644 index 0000000000..bbb4baf5ac --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.tpd @@ -0,0 +1,8 @@ +target "jgit-4.27" with source configurePhase + +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" + +location "https://download.eclipse.org/releases/2023-03/" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target new file mode 100644 index 0000000000..cd8f781a7b --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?pde?> +<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> +<target name="jgit-4.28" sequenceNumber="1686300646"> + <locations> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="com.jcraft.jsch" version="0.1.55.v20221112-0806"/> + <unit id="com.jcraft.jsch.source" version="0.1.55.v20221112-0806"/> + <unit id="com.jcraft.jzlib" version="1.1.3.v20220502-1820"/> + <unit id="com.jcraft.jzlib.source" version="1.1.3.v20220502-1820"/> + <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20220506-1020"/> + <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20220506-1020"/> + <unit id="org.apache.ant" version="1.10.12.v20211102-1452"/> + <unit id="org.apache.ant.source" version="1.10.12.v20211102-1452"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.14.v20230516-1249"/> + <unit id="org.apache.httpcomponents.httpcore" version="4.4.16.v20221207-1049"/> + <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.16.v20221207-1049"/> + <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> + <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> + <unit id="org.junit" version="4.13.2.v20211018-1956"/> + <unit id="org.junit.source" version="4.13.2.v20211018-1956"/> + <unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/> + <unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/> + <unit id="org.objenesis" version="3.3.0.v20221103-2317"/> + <unit id="org.objenesis.source" version="3.3.0.v20221103-2317"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.osgi" version="0.0.0"/> + <repository location="https://download.eclipse.org/staging/2023-06"/> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="xz"> + <dependencies> + <dependency> + <groupId>org.tukaani</groupId> + <artifactId>xz</artifactId> + <version>1.9</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="slf4j"> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.36</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd"> + <dependencies> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-osgi</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-sftp</artifactId> + <version>2.10.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jna"> + <dependencies> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>5.13.0</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="jetty"> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <version>10.0.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="javaewah"> + <dependencies> + <dependency> + <groupId>com.googlecode.javaewah</groupId> + <artifactId>JavaEWAH</artifactId> + <version>1.2.3</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="hamcrest"> + <dependencies> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="gson"> + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bytebuddy"> + <dependencies> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>1.12.18</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="bouncycastle"> + <dependencies> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcutil-jdk18on</artifactId> + <version>1.73</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="assertj"> + <dependencies> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="args4j"> + <dependencies> + <dependency> + <groupId>args4j</groupId> + <artifactId>args4j</artifactId> + <version>2.33</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + <location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="apache"> + <dependencies> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.15</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.23.0</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <type>jar</type> + </dependency> + </dependencies> + </location> + </locations> +</target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd new file mode 100644 index 0000000000..46185ca91f --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.tpd @@ -0,0 +1,8 @@ +target "jgit-4.28" with source configurePhase + +include "orbit/R20230531010532-2023-06.tpd" +include "maven/dependencies.tpd" + +location "https://download.eclipse.org/staging/2023-06" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd new file mode 100644 index 0000000000..cbb7d1e104 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd @@ -0,0 +1,251 @@ +target "dependencies" + + +maven apache + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "commons-codec" + artifactId = "commons-codec" + version = "1.15" + } + dependency { + groupId = "org.apache.commons" + artifactId = "commons-compress" + version = "1.23.0" + } + dependency { + groupId = "commons-logging" + artifactId = "commons-logging" + version = "1.2" + } +} + +maven args4j + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "args4j" + artifactId = "args4j" + version = "2.33" + } +} + +maven assertj + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.assertj" + artifactId = "assertj-core" + version = "3.24.2" + } +} + +maven bouncycastle + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.bouncycastle" + artifactId = "bcpg-jdk18on" + version = "1.73" + } + dependency { + groupId = "org.bouncycastle" + artifactId = "bcprov-jdk18on" + version = "1.73" + } + dependency { + groupId = "org.bouncycastle" + artifactId = "bcpkix-jdk18on" + version = "1.73" + } + dependency { + groupId = "org.bouncycastle" + artifactId = "bcutil-jdk18on" + version = "1.73" + } +} + +maven bytebuddy + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "net.bytebuddy" + artifactId = "byte-buddy" + version = "1.12.18" + } + dependency { + groupId = "net.bytebuddy" + artifactId = "byte-buddy-agent" + version = "1.12.18" + } +} + +maven gson + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "com.google.code.gson" + artifactId = "gson" + version = "2.10.1" + } +} + +maven hamcrest + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.hamcrest" + artifactId = "hamcrest" + version = "2.2" + } +} + +maven javaewah + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "com.googlecode.javaewah" + artifactId = "JavaEWAH" + version = "1.2.3" + } +} + +maven jetty + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-http" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-io" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-security" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-server" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-servlet" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-util" + version = "10.0.15" + } + dependency { + groupId = "org.eclipse.jetty" + artifactId = "jetty-util-ajax" + version = "10.0.15" + } + dependency { + groupId = "jakarta.servlet" + artifactId = "jakarta.servlet-api" + version = "4.0.4" + } +} + +maven jna + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "net.java.dev.jna" + artifactId = "jna" + version = "5.13.0" + } + dependency { + groupId = "net.java.dev.jna" + artifactId = "jna-platform" + version = "5.13.0" + } +} + +maven sshd + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.apache.sshd" + artifactId = "sshd-osgi" + version = "2.10.0" + } + dependency { + groupId = "org.apache.sshd" + artifactId = "sshd-sftp" + version = "2.10.0" + } +} + +maven slf4j + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.slf4j" + artifactId = "slf4j-api" + version = "1.7.36" + } + dependency { + groupId = "org.slf4j" + artifactId = "slf4j-simple" + version = "1.7.36" + } +} + +maven xz + scope = compile + dependencyDepth = none + missingManifest = error + includeSources +{ + dependency { + groupId = "org.tukaani" + artifactId = "xz" + version = "1.9" + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230302014618-2023-03.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230302014618-2023-03.tpd index ad29378af0..8578b2cdf5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230302014618-2023-03.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230302014618-2023-03.tpd @@ -2,68 +2,26 @@ target "R20230302014618-2023-03" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ location "https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository" { - com.google.gson [2.10.1.v20230109-0753,2.10.1.v20230109-0753] - com.google.gson.source [2.10.1.v20230109-0753,2.10.1.v20230109-0753] com.jcraft.jsch [0.1.55.v20221112-0806,0.1.55.v20221112-0806] com.jcraft.jsch.source [0.1.55.v20221112-0806,0.1.55.v20221112-0806] com.jcraft.jzlib [1.1.3.v20220502-1820,1.1.3.v20220502-1820] com.jcraft.jzlib.source [1.1.3.v20220502-1820,1.1.3.v20220502-1820] - com.sun.jna [5.12.1.v20221103-2317,5.12.1.v20221103-2317] - com.sun.jna.source [5.12.1.v20221103-2317,5.12.1.v20221103-2317] - com.sun.jna.platform [5.12.1.v20221103-2317,5.12.1.v20221103-2317] - com.sun.jna.platform.source [5.12.1.v20221103-2317,5.12.1.v20221103-2317] - javaewah [1.1.13.v20211029-0839,1.1.13.v20211029-0839] - javaewah.source [1.1.13.v20211029-0839,1.1.13.v20211029-0839] - net.bytebuddy.byte-buddy [1.12.18.v20221114-2102,1.12.18.v20221114-2102] - net.bytebuddy.byte-buddy.source [1.12.18.v20221114-2102,1.12.18.v20221114-2102] - net.bytebuddy.byte-buddy-agent [1.12.18.v20221114-2102,1.12.18.v20221114-2102] - net.bytebuddy.byte-buddy-agent.source [1.12.18.v20221114-2102,1.12.18.v20221114-2102] net.i2p.crypto.eddsa [0.3.0.v20220506-1020,0.3.0.v20220506-1020] net.i2p.crypto.eddsa.source [0.3.0.v20220506-1020,0.3.0.v20220506-1020] org.apache.ant [1.10.12.v20211102-1452,1.10.12.v20211102-1452] org.apache.ant.source [1.10.12.v20211102-1452,1.10.12.v20211102-1452] - org.apache.commons.codec [1.14.0.v20221112-0806,1.14.0.v20221112-0806] - org.apache.commons.codec.source [1.14.0.v20221112-0806,1.14.0.v20221112-0806] - org.apache.commons.compress [1.22.0.v20221207-1049,1.22.0.v20221207-1049] - org.apache.commons.compress.source [1.22.0.v20221207-1049,1.22.0.v20221207-1049] - 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.14.v20221207-1049,4.5.14.v20221207-1049] org.apache.httpcomponents.httpclient.source [4.5.14.v20221207-1049,4.5.14.v20221207-1049] org.apache.httpcomponents.httpcore [4.4.16.v20221207-1049,4.4.16.v20221207-1049] org.apache.httpcomponents.httpcore.source [4.4.16.v20221207-1049,4.4.16.v20221207-1049] - org.apache.sshd.osgi [2.9.2.v20221117-1942,2.9.2.v20221117-1942] - org.apache.sshd.osgi.source [2.9.2.v20221117-1942,2.9.2.v20221117-1942] - org.apache.sshd.sftp [2.9.2.v20221117-1942,2.9.2.v20221117-1942] - org.apache.sshd.sftp.source [2.9.2.v20221117-1942,2.9.2.v20221117-1942] - org.assertj [3.20.2.v20210706-1104,3.20.2.v20210706-1104] - org.assertj.source [3.20.2.v20210706-1104,3.20.2.v20210706-1104] - org.bouncycastle.bcpg [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcpg.source [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcpkix [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcpkix.source [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcprov [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcprov.source [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcutil [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.bouncycastle.bcutil.source [1.72.0.v20221013-1810,1.72.0.v20221013-1810] - org.hamcrest [2.2.0.v20210711-0821,2.2.0.v20210711-0821] - org.hamcrest.source [2.2.0.v20210711-0821,2.2.0.v20210711-0821] 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] org.junit [4.13.2.v20211018-1956,4.13.2.v20211018-1956] org.junit.source [4.13.2.v20211018-1956,4.13.2.v20211018-1956] - 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.mockito.mockito-core [4.8.1.v20221103-2317,4.8.1.v20221103-2317] org.mockito.mockito-core.source [4.8.1.v20221103-2317,4.8.1.v20221103-2317] org.objenesis [3.3.0.v20221103-2317,3.3.0.v20221103-2317] org.objenesis.source [3.3.0.v20221103-2317,3.3.0.v20221103-2317] - org.slf4j.api [1.7.30.v20221112-0806,1.7.30.v20221112-0806] - org.slf4j.api.source [1.7.30.v20221112-0806,1.7.30.v20221112-0806] - org.slf4j.binding.simple [1.7.30.v20221112-0806,1.7.30.v20221112-0806] - org.slf4j.binding.simple.source [1.7.30.v20221112-0806,1.7.30.v20221112-0806] - org.tukaani.xz [1.9.0.v20210624-1259,1.9.0.v20210624-1259] - org.tukaani.xz.source [1.9.0.v20210624-1259,1.9.0.v20210624-1259] } diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230531010532-2023-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230531010532-2023-06.tpd new file mode 100644 index 0000000000..089981c95e --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20230531010532-2023-06.tpd @@ -0,0 +1,27 @@ +target "R20230531010532-2023-06" with source configurePhase +// see https://download.eclipse.org/tools/orbit/downloads/ + +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20230531010532/repository" { + com.jcraft.jsch [0.1.55.v20221112-0806,0.1.55.v20221112-0806] + com.jcraft.jsch.source [0.1.55.v20221112-0806,0.1.55.v20221112-0806] + com.jcraft.jzlib [1.1.3.v20220502-1820,1.1.3.v20220502-1820] + com.jcraft.jzlib.source [1.1.3.v20220502-1820,1.1.3.v20220502-1820] + net.i2p.crypto.eddsa [0.3.0.v20220506-1020,0.3.0.v20220506-1020] + net.i2p.crypto.eddsa.source [0.3.0.v20220506-1020,0.3.0.v20220506-1020] + org.apache.ant [1.10.12.v20211102-1452,1.10.12.v20211102-1452] + org.apache.ant.source [1.10.12.v20211102-1452,1.10.12.v20211102-1452] + org.apache.httpcomponents.httpclient [4.5.14.v20230516-1249,4.5.14.v20230516-1249] + org.apache.httpcomponents.httpclient.source [4.5.14.v20230516-1249,4.5.14.v20230516-1249] + org.apache.httpcomponents.httpcore [4.4.16.v20221207-1049,4.4.16.v20221207-1049] + org.apache.httpcomponents.httpcore.source [4.4.16.v20221207-1049,4.4.16.v20221207-1049] + 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] + org.junit [4.13.2.v20211018-1956,4.13.2.v20211018-1956] + org.junit.source [4.13.2.v20211018-1956,4.13.2.v20211018-1956] + org.mockito.mockito-core [4.8.1.v20221103-2317,4.8.1.v20221103-2317] + org.mockito.mockito-core.source [4.8.1.v20221103-2317,4.8.1.v20221103-2317] + org.objenesis [3.3.0.v20221103-2317,3.3.0.v20221103-2317] + org.objenesis.source [3.3.0.v20221103-2317,3.3.0.v20221103-2317] +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml index 8945542428..86d2cbb9ae 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -16,7 +16,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.target</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd deleted file mode 100644 index e1afcff6bc..0000000000 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-10.0.x.tpd +++ /dev/null @@ -1,16 +0,0 @@ -target "jetty-10.0.x" with source configurePhase - -location jetty-10.0.x "https://download.eclipse.org/oomph/jetty/release/10.0.13/" { - org.eclipse.jetty.http [10.0.13,10.0.14] - org.eclipse.jetty.io [10.0.13,10.0.14] - org.eclipse.jetty.security [10.0.13,10.0.14] - org.eclipse.jetty.server [10.0.13,10.0.14] - org.eclipse.jetty.servlet [10.0.13,10.0.14] - org.eclipse.jetty.util [10.0.13,10.0.14] - org.eclipse.jetty.util.ajax [10.0.13,10.0.14] -} - -location jetty-10.0.6 "https://download.eclipse.org/eclipse/jetty/10.0.6/" { - jakarta.servlet-api [4.0.0, 5.0.0) - jakarta.servlet-api.source [4.0.0, 5.0.0) -}
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 93110d4d50..26e38582eb 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -16,7 +16,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> <packaging>pom</packaging> <name>JGit Tycho Parent</name> @@ -36,6 +36,10 @@ <id>repo.eclipse.org.cbi-snapshots</id> <url>https://repo.eclipse.org/content/repositories/cbi-snapshots/</url> </pluginRepository> + <pluginRepository> + <id>tycho-snapshots</id> + <url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url> + </pluginRepository> </pluginRepositories> <modules> @@ -171,7 +175,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.0.0</version> + <version>3.3.0</version> <executions> <execution> <id>enforce-maven</id> @@ -230,7 +234,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <version>3.2.0</version> + <version>3.3.1</version> <configuration> <encoding>ISO-8859-1</encoding> </configuration> @@ -300,28 +304,33 @@ <version>${tycho-version}</version> </plugin> <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-gpg-plugin</artifactId> + <version>${tycho-version}</version> + </plugin> + <plugin> <groupId>org.eclipse.cbi.maven.plugins</groupId> <artifactId>eclipse-jarsigner-plugin</artifactId> - <version>1.3.2</version> + <version>1.3.5</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>3.2.0</version> + <version>3.3.0</version> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> - <version>3.1.0</version> + <version>3.2.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> - <version>3.0.0-M1</version> + <version>3.1.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> - <version>3.0.0-M1</version> + <version>3.1.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index a309b710b2..598aa02f9c 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -3,30 +3,30 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.pgm.test Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.diff;version="[6.5.1,6.6.0)", - org.eclipse.jgit.dircache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.diffmergetool;version="6.5.1", - org.eclipse.jgit.internal.storage.file;version="6.5.1", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.merge;version="[6.5.1,6.6.0)", - org.eclipse.jgit.pgm;version="[6.5.1,6.6.0)", - org.eclipse.jgit.pgm.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.pgm.opt;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)", +Import-Package: org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.diff;version="[6.6.2,6.7.0)", + org.eclipse.jgit.dircache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.diffmergetool;version="6.6.2", + org.eclipse.jgit.internal.storage.file;version="6.6.2", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.merge;version="[6.6.2,6.7.0)", + org.eclipse.jgit.pgm;version="[6.6.2,6.7.0)", + org.eclipse.jgit.pgm.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.pgm.opt;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)", org.hamcrest.core;bundle-version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index 86d6cc986e..84887faa53 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm.test</artifactId> diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java index e8d61a520c..26d617dd81 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java @@ -9,24 +9,30 @@ */ package org.eclipse.jgit.pgm; +import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.lib.CLIRepositoryTestCase; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevCommit; import org.junit.Before; import org.junit.Test; public class TagTest extends CLIRepositoryTestCase { private Git git; + private RevCommit initialCommit; + @Override @Before public void setUp() throws Exception { super.setUp(); git = new Git(db); - git.commit().setMessage("initial commit").call(); + initialCommit = git.commit().setMessage("initial commit").call(); } @Test @@ -57,4 +63,39 @@ public class TagTest extends CLIRepositoryTestCase { assertEquals("fatal: error: tag 'test' not found", e.getMessage()); } } + + @Test + public void testContains() throws Exception { + /* c3 + * | + * v2 - c2 b2 - v1 + * | | + * c1 b1 + * \ / + * a + */ + try (TestRepository<Repository> r = new TestRepository<>( + db)) { + RevCommit b1 = r.commit(initialCommit); + RevCommit b2 = r.commit(b1); + RevCommit c1 = r.commit(initialCommit); + RevCommit c2 = r.commit(c1); + RevCommit c3 = r.commit(c2); + r.update("refs/tags/v1", r.tag("v1", b2)); + r.update("refs/tags/v2", r.tag("v1.1", c2)); + + assertArrayEquals( + new String[] { "v1", "v2", "" }, + execute("git tag --contains " + initialCommit.name())); + + assertArrayEquals(new String[] { "v1", "" }, + execute("git tag --contains " + b1.name())); + + assertArrayEquals(new String[] { "v2", "" }, + execute("git tag --contains " + c1.name())); + + assertArrayEquals(new String[] { "" }, + execute("git tag --contains " + c3.name())); + } + } } diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index 5399d7de4d..250acbb73b 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.pgm Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -14,49 +14,49 @@ Import-Package: javax.servlet;version="[3.1.0,5.0.0)", org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)", org.eclipse.jetty.util;version="[10.0.0,11.0.0)", org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.archive;version="[6.5.1,6.6.0)", - org.eclipse.jgit.awtui;version="[6.5.1,6.6.0)", - org.eclipse.jgit.blame;version="[6.5.1,6.6.0)", - org.eclipse.jgit.diff;version="[6.5.1,6.6.0)", - org.eclipse.jgit.dircache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.gitrepo;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.diffmergetool;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.io;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.reftable;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.server;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.server.fs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs.server.s3;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.merge;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.notes;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revplot;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http.apache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.resolver;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.ssh.jsch;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.sshd;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.archive;version="[6.6.2,6.7.0)", + org.eclipse.jgit.awtui;version="[6.6.2,6.7.0)", + org.eclipse.jgit.blame;version="[6.6.2,6.7.0)", + org.eclipse.jgit.diff;version="[6.6.2,6.7.0)", + org.eclipse.jgit.dircache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.gitrepo;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.diffmergetool;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.io;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.reftable;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.server;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.server.fs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs.server.s3;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.merge;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.notes;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revplot;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http.apache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.resolver;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.ssh.jsch;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.sshd;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)", org.kohsuke.args4j;version="[2.33.0,3.0.0)", org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)" -Export-Package: org.eclipse.jgit.console;version="6.5.1"; +Export-Package: org.eclipse.jgit.console;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util", - org.eclipse.jgit.pgm;version="6.5.1"; + org.eclipse.jgit.pgm;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util.io, org.eclipse.jgit.awtui, @@ -68,14 +68,14 @@ Export-Package: org.eclipse.jgit.console;version="6.5.1"; org.eclipse.jgit.treewalk, org.eclipse.jgit.api, javax.swing", - org.eclipse.jgit.pgm.debug;version="6.5.1"; + org.eclipse.jgit.pgm.debug;version="6.6.2"; uses:="org.eclipse.jgit.util.io, org.eclipse.jgit.pgm, org.eclipse.jetty.servlet", - org.eclipse.jgit.pgm.internal;version="6.5.1"; + org.eclipse.jgit.pgm.internal;version="6.6.2"; x-friends:="org.eclipse.jgit.pgm.test, org.eclipse.jgit.test", - org.eclipse.jgit.pgm.opt;version="6.5.1"; + org.eclipse.jgit.pgm.opt;version="6.6.2"; uses:="org.kohsuke.args4j, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 22414257c3..3a3b108d07 100644 --- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.pgm - Sources Bundle-SymbolicName: org.eclipse.jgit.pgm.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index a45c2b1c04..06975ff1f8 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm</artifactId> diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 15fe09639b..50ee809b98 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -255,6 +255,7 @@ unsupportedOperation=Unsupported operation: {0} untrackedFiles=Untracked files: updating=Updating {0}..{1} usage_Abbrev=Instead of using the default number of hexadecimal digits (which will vary according to the number of objects in the repository with a default of 7) of the abbreviated object name, use <n> digits, or as many digits as needed to form a unique object name. An <n> of 0 will suppress long format, only showing the closest tag. +usage_addRenormalize=Apply the "clean" process freshly to tracked files to forcibly add them again to the index. This implies -u. usage_Aggressive=This option will cause gc to more aggressively optimize the repository at the expense of taking much more time usage_AlwaysFallback=Show uniquely abbreviated commit object as fallback usage_bareClone=Make a bare Git repository. That is, instead of creating [DIRECTORY] and placing the administrative files in [DIRECTORY]/.git, make the [DIRECTORY] itself the $GIT_DIR. @@ -453,7 +454,7 @@ usage_resetMixed=Resets the index but not the working tree usage_runLfsStore=Run LFS Store in a given directory usage_S3NoSslVerify=Skip verification of Amazon server certificate and hostname usage_setTheGitRepositoryToOperateOn=set the git repository to operate on -usage_shallowExclude=Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. +usage_shallowExclude=Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. usage_shallowSince=Deepen or shorten the history of a shallow repository to include all reachable commits after <date>. usage_show=Display one commit usage_showRefNamesMatchingCommits=Show ref names matching commits @@ -470,6 +471,7 @@ usage_trustExitCode=git-difftool invokes a diff tool individually on each file. usage_noTrustExitCode=This option can be used to override --trust-exit-code setting. usage_notags=do not fetch tags usage_tagAnnotated=create an annotated tag, unsigned unless -s or -u are given, or config tag.gpgSign is true +usage_tagContains=Only list tags which contain the specified commit usage_tagDelete=delete tag usage_tagLocalUser=create a signed annotated tag using the specified GPG key ID usage_tagMessage=create an annotated tag with the given message, unsigned unless -s or -u are given, or config tag.gpgSign is true, or tar.forceSignAnnotated is true and -a is not given diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java index 460f24618e..ff0b55d1b8 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java @@ -22,6 +22,9 @@ import org.kohsuke.args4j.Option; @Command(common = true, usage = "usage_addFileContentsToTheIndex") class Add extends TextBuiltin { + @Option(name = "--renormalize", usage = "usage_addRenormalize") + private boolean renormalize = false; + @Option(name = "--update", aliases = { "-u" }, usage = "usage_onlyMatchAgainstAlreadyTrackedFiles") private boolean update = false; @@ -33,9 +36,13 @@ class Add extends TextBuiltin { protected void run() throws Exception { try (Git git = new Git(db)) { AddCommand addCmd = git.add(); - addCmd.setUpdate(update); - for (String p : filepatterns) + if (renormalize) { + update = true; + } + addCmd.setUpdate(update).setRenormalize(renormalize); + for (String p : filepatterns) { addCmd.addFilepattern(p); + } addCmd.call(); } catch (GitAPIException e) { throw die(e.getMessage(), e); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java index e2cd31d198..0603de18ac 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java @@ -33,6 +33,7 @@ import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.pgm.internal.VerificationUtils; +import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevTag; import org.eclipse.jgit.revwalk.RevWalk; import org.kohsuke.args4j.Argument; @@ -76,6 +77,11 @@ class Tag extends TextBuiltin { "--local-user" }, usage = "usage_tagVerify") private boolean verify; + @Option(name = "--contains", forbids = { "--delete", "--force", + "--annotate", "-m", "--sign", "--no-sign", + "--local-user" }, metaVar = "metaVar_commitish", usage = "usage_tagContains") + private RevCommit contains; + @Argument(index = 0, metaVar = "metaVar_name") private String tagName; @@ -142,6 +148,9 @@ class Tag extends TextBuiltin { } } else { ListTagCommand command = git.tagList(); + if (contains != null) { + command.setContains(contains); + } List<Ref> list = command.call(); for (Ref ref : list) { outw.println(Repository.shortenRefName(ref.getName())); diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF index cce648654c..84d97e27e7 100644 --- a/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF @@ -2,16 +2,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent;singleton:=true -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Fragment-Host: org.eclipse.jgit.ssh.apache;bundle-version="[6.5.1,6.6.0)" +Fragment-Host: org.eclipse.jgit.ssh.apache;bundle-version="[6.6.2,6.7.0)" Bundle-ActivationPolicy: lazy Automatic-Module-Name: org.eclipse.jgit.ssh.apache.agent Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.eclipse.jgit.transport.sshd;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)" +Import-Package: org.eclipse.jgit.transport.sshd;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)" Require-Bundle: com.sun.jna;bundle-version="[5.8.0,6.0.0)", com.sun.jna.platform;bundle-version="[5.8.0,6.0.0)" -Export-Package: org.eclipse.jgit.internal.transport.sshd.agent.connector;version="6.5.1";x-internal:=true +Export-Package: org.eclipse.jgit.internal.transport.sshd.agent.connector;version="6.6.2";x-internal:=true diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF index 303955422e..f0c3ec2865 100644 --- a/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ssh.apache.agent - Sources Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache.agent;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache.agent;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.apache.agent/bin/.project b/org.eclipse.jgit.ssh.apache.agent/bin/.project deleted file mode 100644 index 73358f4a6b..0000000000 --- a/org.eclipse.jgit.ssh.apache.agent/bin/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.jgit.ssh.apache.agent</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/org.eclipse.jgit.ssh.apache.agent/pom.xml b/org.eclipse.jgit.ssh.apache.agent/pom.xml index 200d5b7939..5b1ea044e0 100644 --- a/org.eclipse.jgit.ssh.apache.agent/pom.xml +++ b/org.eclipse.jgit.ssh.apache.agent/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId> @@ -28,7 +28,6 @@ </description> <properties> - <jna-version>5.8.0</jna-version> <translate-qualifier/> <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest> </properties> @@ -49,13 +48,11 @@ <dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId> - <version>${jna-version}</version> </dependency> <dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna-platform</artifactId> - <version>${jna-version}</version> </dependency> <dependency> diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index 22d957616c..cf7edd2ce2 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -3,34 +3,34 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.apache.test Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 -Import-Package: org.apache.sshd.client.config.hosts;version="[2.9.2,2.10.0)", - org.apache.sshd.common;version="[2.9.2,2.10.0)", - org.apache.sshd.common.auth;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys;version="[2.9.2,2.10.0)", - org.apache.sshd.common.helpers;version="[2.9.2,2.10.0)", - org.apache.sshd.common.kex;version="[2.9.2,2.10.0)", - org.apache.sshd.common.keyprovider;version="[2.9.2,2.10.0)", - org.apache.sshd.common.session;version="[2.9.2,2.10.0)", - org.apache.sshd.common.signature;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.net;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.security;version="[2.9.2,2.10.0)", - org.apache.sshd.core;version="[2.9.2,2.10.0)", - org.apache.sshd.server;version="[2.9.2,2.10.0)", - org.apache.sshd.server.forward;version="[2.9.2,2.10.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit.ssh;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.sshd;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.sshd.agent;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", +Import-Package: org.apache.sshd.client.config.hosts;version="[2.10.0,2.11.0)", + org.apache.sshd.common;version="[2.10.0,2.11.0)", + org.apache.sshd.common.auth;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys;version="[2.10.0,2.11.0)", + org.apache.sshd.common.helpers;version="[2.10.0,2.11.0)", + org.apache.sshd.common.kex;version="[2.10.0,2.11.0)", + org.apache.sshd.common.keyprovider;version="[2.10.0,2.11.0)", + org.apache.sshd.common.session;version="[2.10.0,2.11.0)", + org.apache.sshd.common.signature;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.net;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.security;version="[2.10.0,2.11.0)", + org.apache.sshd.core;version="[2.10.0,2.11.0)", + org.apache.sshd.server;version="[2.10.0,2.11.0)", + org.apache.sshd.server.forward;version="[2.10.0,2.11.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit.ssh;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.sshd;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.sshd.agent;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.ssh.apache.test/build.properties b/org.eclipse.jgit.ssh.apache.test/build.properties index 35d7145160..0e94aa00ef 100644 --- a/org.eclipse.jgit.ssh.apache.test/build.properties +++ b/org.eclipse.jgit.ssh.apache.test/build.properties @@ -3,4 +3,4 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.properties -additional.bundles = org.slf4j.binding.simple +additional.bundles = slf4j.simple diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml index ec553f31bc..9e19ec4669 100644 --- a/org.eclipse.jgit.ssh.apache.test/pom.xml +++ b/org.eclipse.jgit.ssh.apache.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId> diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF index a44ff2207a..22f07ad9ce 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF @@ -6,9 +6,9 @@ Bundle-SymbolicName: org.eclipse.jgit.ssh.apache Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.5.1";x-internal:=true; +Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.6.2";x-internal:=true; uses:="org.apache.sshd.client, org.apache.sshd.client.auth, org.apache.sshd.client.auth.keyboard, @@ -23,75 +23,75 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.5.1";x-inter org.apache.sshd.common.signature, org.apache.sshd.common.util.buffer, org.eclipse.jgit.transport", - org.eclipse.jgit.internal.transport.sshd.agent;version="6.5.1";x-internal:=true, - org.eclipse.jgit.internal.transport.sshd.auth;version="6.5.1";x-internal:=true, - org.eclipse.jgit.internal.transport.sshd.proxy;version="6.5.1";x-friends:="org.eclipse.jgit.ssh.apache.test", - org.eclipse.jgit.transport.sshd;version="6.5.1"; + org.eclipse.jgit.internal.transport.sshd.agent;version="6.6.2";x-internal:=true, + org.eclipse.jgit.internal.transport.sshd.auth;version="6.6.2";x-internal:=true, + org.eclipse.jgit.internal.transport.sshd.proxy;version="6.6.2";x-friends:="org.eclipse.jgit.ssh.apache.test", + org.eclipse.jgit.transport.sshd;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.apache.sshd.client.config.hosts, org.apache.sshd.common.keyprovider, org.eclipse.jgit.util, org.apache.sshd.client.session, org.apache.sshd.client.keyverifier", - org.eclipse.jgit.transport.sshd.agent;version="6.5.1" + org.eclipse.jgit.transport.sshd.agent;version="6.6.2" Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)", - org.apache.sshd.agent;version="[2.9.2,2.10.0)", - org.apache.sshd.client;version="[2.9.2,2.10.0)", - org.apache.sshd.client.auth;version="[2.9.2,2.10.0)", - org.apache.sshd.client.auth.keyboard;version="[2.9.2,2.10.0)", - org.apache.sshd.client.auth.password;version="[2.9.2,2.10.0)", - org.apache.sshd.client.auth.pubkey;version="[2.9.2,2.10.0)", - org.apache.sshd.client.channel;version="[2.9.2,2.10.0)", - org.apache.sshd.client.config.hosts;version="[2.9.2,2.10.0)", - org.apache.sshd.client.config.keys;version="[2.9.2,2.10.0)", - org.apache.sshd.client.future;version="[2.9.2,2.10.0)", - org.apache.sshd.client.keyverifier;version="[2.9.2,2.10.0)", - org.apache.sshd.client.session;version="[2.9.2,2.10.0)", - org.apache.sshd.client.session.forward;version="[2.9.2,2.10.0)", - org.apache.sshd.common;version="[2.9.2,2.10.0)", - org.apache.sshd.common.auth;version="[2.9.2,2.10.0)", - org.apache.sshd.common.channel;version="[2.9.2,2.10.0)", - org.apache.sshd.common.compression;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys.loader;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.9.2,2.10.0)", - org.apache.sshd.common.config.keys.u2f;version="[2.9.2,2.10.0)", - org.apache.sshd.common.digest;version="[2.9.2,2.10.0)", - org.apache.sshd.common.forward;version="[2.9.2,2.10.0)", - org.apache.sshd.common.future;version="[2.9.2,2.10.0)", - org.apache.sshd.common.helpers;version="[2.9.2,2.10.0)", - org.apache.sshd.common.io;version="[2.9.2,2.10.0)", - org.apache.sshd.common.kex;version="[2.9.2,2.10.0)", - org.apache.sshd.common.kex.extension;version="[2.9.2,2.10.0)", - org.apache.sshd.common.kex.extension.parser;version="[2.9.2,2.10.0)", - org.apache.sshd.common.keyprovider;version="[2.9.2,2.10.0)", - org.apache.sshd.common.mac;version="[2.9.2,2.10.0)", - org.apache.sshd.common.random;version="[2.9.2,2.10.0)", - org.apache.sshd.common.session;version="[2.9.2,2.10.0)", - org.apache.sshd.common.session.helpers;version="[2.9.2,2.10.0)", - org.apache.sshd.common.signature;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.buffer;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.buffer.keys;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.closeable;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.io;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.io.der;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.io.functors;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.io.resource;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.logging;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.net;version="[2.9.2,2.10.0)", - org.apache.sshd.common.util.security;version="[2.9.2,2.10.0)", - org.apache.sshd.core;version="[2.9.2,2.10.0)", - org.apache.sshd.server.auth;version="[2.9.2,2.10.0)", - org.apache.sshd.sftp;version="[2.9.2,2.10.0)", - org.apache.sshd.sftp.client;version="[2.9.2,2.10.0)", - org.apache.sshd.sftp.common;version="[2.9.2,2.10.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.fnmatch;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.ssh;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.apache.sshd.agent;version="[2.10.0,2.11.0)", + org.apache.sshd.client;version="[2.10.0,2.11.0)", + org.apache.sshd.client.auth;version="[2.10.0,2.11.0)", + org.apache.sshd.client.auth.keyboard;version="[2.10.0,2.11.0)", + org.apache.sshd.client.auth.password;version="[2.10.0,2.11.0)", + org.apache.sshd.client.auth.pubkey;version="[2.10.0,2.11.0)", + org.apache.sshd.client.channel;version="[2.10.0,2.11.0)", + org.apache.sshd.client.config.hosts;version="[2.10.0,2.11.0)", + org.apache.sshd.client.config.keys;version="[2.10.0,2.11.0)", + org.apache.sshd.client.future;version="[2.10.0,2.11.0)", + org.apache.sshd.client.keyverifier;version="[2.10.0,2.11.0)", + org.apache.sshd.client.session;version="[2.10.0,2.11.0)", + org.apache.sshd.client.session.forward;version="[2.10.0,2.11.0)", + org.apache.sshd.common;version="[2.10.0,2.11.0)", + org.apache.sshd.common.auth;version="[2.10.0,2.11.0)", + org.apache.sshd.common.channel;version="[2.10.0,2.11.0)", + org.apache.sshd.common.compression;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys.loader;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.10.0,2.11.0)", + org.apache.sshd.common.config.keys.u2f;version="[2.10.0,2.11.0)", + org.apache.sshd.common.digest;version="[2.10.0,2.11.0)", + org.apache.sshd.common.forward;version="[2.10.0,2.11.0)", + org.apache.sshd.common.future;version="[2.10.0,2.11.0)", + org.apache.sshd.common.helpers;version="[2.10.0,2.11.0)", + org.apache.sshd.common.io;version="[2.10.0,2.11.0)", + org.apache.sshd.common.kex;version="[2.10.0,2.11.0)", + org.apache.sshd.common.kex.extension;version="[2.10.0,2.11.0)", + org.apache.sshd.common.kex.extension.parser;version="[2.10.0,2.11.0)", + org.apache.sshd.common.keyprovider;version="[2.10.0,2.11.0)", + org.apache.sshd.common.mac;version="[2.10.0,2.11.0)", + org.apache.sshd.common.random;version="[2.10.0,2.11.0)", + org.apache.sshd.common.session;version="[2.10.0,2.11.0)", + org.apache.sshd.common.session.helpers;version="[2.10.0,2.11.0)", + org.apache.sshd.common.signature;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.buffer;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.buffer.keys;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.closeable;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.io;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.io.der;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.io.functors;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.io.resource;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.logging;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.net;version="[2.10.0,2.11.0)", + org.apache.sshd.common.util.security;version="[2.10.0,2.11.0)", + org.apache.sshd.core;version="[2.10.0,2.11.0)", + org.apache.sshd.server.auth;version="[2.10.0,2.11.0)", + org.apache.sshd.sftp;version="[2.10.0,2.11.0)", + org.apache.sshd.sftp.client;version="[2.10.0,2.11.0)", + org.apache.sshd.sftp.common;version="[2.10.0,2.11.0)", + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.fnmatch;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.ssh;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF index 7d5e247e40..c51e94b70a 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ssh.apache - Sources Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml index 88557a91a5..47bda2e22e 100644 --- a/org.eclipse.jgit.ssh.apache/pom.xml +++ b/org.eclipse.jgit.ssh.apache/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.apache</artifactId> @@ -50,6 +50,16 @@ <groupId>org.apache.sshd</groupId> <artifactId>sshd-sftp</artifactId> <version>${apache-sshd-version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-core</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java deleted file mode 100644 index 715f3b8edd..0000000000 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -package org.eclipse.jgit.internal.transport.sshd; - -import java.io.IOException; - -import org.apache.sshd.client.auth.AbstractUserAuthFactory; -import org.apache.sshd.client.auth.password.UserAuthPassword; -import org.apache.sshd.client.auth.password.UserAuthPasswordFactory; -import org.apache.sshd.client.session.ClientSession; - -/** - * A customized {@link UserAuthPasswordFactory} that creates instance of - * {@link JGitPasswordAuthentication}. - */ -public class JGitPasswordAuthFactory extends AbstractUserAuthFactory { - - /** The singleton {@link JGitPasswordAuthFactory}. */ - public static final JGitPasswordAuthFactory INSTANCE = new JGitPasswordAuthFactory(); - - private JGitPasswordAuthFactory() { - super(UserAuthPasswordFactory.NAME); - } - - @Override - public UserAuthPassword createUserAuth(ClientSession session) - throws IOException { - return new JGitPasswordAuthentication(); - } -} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java deleted file mode 100644 index 33c3c608f6..0000000000 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2018, 2022 Thomas Wolf <thomas.wolf@paranor.ch> and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -package org.eclipse.jgit.internal.transport.sshd; - -import static org.apache.sshd.core.CoreModuleProperties.PASSWORD_PROMPTS; - -import org.apache.sshd.client.auth.password.UserAuthPassword; -import org.apache.sshd.client.session.ClientSession; - -/** - * A password authentication handler that respects the - * {@code NumberOfPasswordPrompts} ssh config. - */ -public class JGitPasswordAuthentication extends UserAuthPassword { - - private int maxAttempts; - - private int attempts; - - @Override - public void init(ClientSession session, String service) throws Exception { - super.init(session, service); - maxAttempts = Math.max(1, - PASSWORD_PROMPTS.getRequired(session).intValue()); - attempts = 0; - } - - @Override - protected String resolveAttemptedPassword(ClientSession session, - String service) throws Exception { - if (++attempts > maxAttempts) { - return null; - } - return super.resolveAttemptedPassword(session, service); - } -} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java index 72f0bdb6ee..311cf198ae 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java @@ -32,10 +32,8 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; -import java.util.function.Supplier; import java.util.stream.Collectors; -import org.apache.sshd.agent.SshAgentFactory; import org.apache.sshd.client.SshClient; import org.apache.sshd.client.config.hosts.HostConfigEntry; import org.apache.sshd.client.future.ConnectFuture; @@ -107,8 +105,6 @@ public class JGitSshClient extends SshClient { private ProxyDataFactory proxyDatabase; - private Supplier<SshAgentFactory> agentFactorySupplier = () -> null; - @Override protected SessionFactory createSessionFactory() { // Override the parent's default @@ -377,22 +373,6 @@ public class JGitSshClient extends SshClient { return credentialsProvider; } - @Override - public SshAgentFactory getAgentFactory() { - return agentFactorySupplier.get(); - } - - @Override - protected void checkConfig() { - // The super class requires channel factories for agent forwarding if a - // factory for an SSH agent is set. We haven't implemented this yet, and - // we don't do SSH agent forwarding for now. Unfortunately, there is no - // way to bypass this check in the super class except making - // getAgentFactory() return null until after the check. - super.checkConfig(); - agentFactorySupplier = super::getAgentFactory; - } - /** * A {@link SessionFactory} to create our own specialized * {@link JGitClientSession}s. diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java index dd6894b662..807bda89bc 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java @@ -252,22 +252,26 @@ public class IdentityPasswordProvider implements KeyPasswordProvider { protected boolean keyLoaded(URIish uri, State state, char[] password, Exception err) throws IOException, GeneralSecurityException { - if (err == null) { - return false; // Success, don't retry - } else if (err instanceof GeneralSecurityException) { + if (err == null || password == null) { + // Success, or an error before we even asked for a password (could + // also be a non-encrypted key, or a user cancellation): don't + // retry. + return false; + } + if (state != null && state.getCount() < attempts) { + // We asked for a password, and have not yet exhausted the number of + // attempts. Assume the password was incorrect. + return true; + } + // Attempts exhausted + if (err instanceof GeneralSecurityException) { + // Top-level exception with a better exception message. The + // framework would otherwise re-throw 'err'. throw new InvalidKeyException( format(SshdText.get().identityFileCannotDecrypt, uri), err); - } else { - // Unencrypted key (state == null && password == null), or exception - // before having asked for the password (state != null && password - // == null; might also be a user cancellation), or number of - // attempts exhausted. - if (state == null || password == null - || state.getCount() >= attempts) { - return false; - } - return true; } + // I/O error. + return false; } @Override diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index c792c1889c..7798b80f18 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -33,6 +33,7 @@ import org.apache.sshd.client.ClientBuilder; import org.apache.sshd.client.SshClient; import org.apache.sshd.client.auth.UserAuthFactory; import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory; +import org.apache.sshd.client.auth.password.UserAuthPasswordFactory; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.compression.BuiltinCompressions; @@ -46,7 +47,6 @@ import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile; import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider; import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory; -import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitPublicKeyAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitServerKeyVerifier; import org.eclipse.jgit.internal.transport.sshd.JGitSshClient; @@ -607,7 +607,7 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { return Collections.unmodifiableList( Arrays.asList(GssApiWithMicAuthFactory.INSTANCE, JGitPublicKeyAuthFactory.FACTORY, - JGitPasswordAuthFactory.INSTANCE, + UserAuthPasswordFactory.INSTANCE, UserAuthKeyboardInteractiveFactory.INSTANCE)); } diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF index 2e57de4dfe..095dbb1957 100644 --- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF @@ -3,18 +3,18 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit.ssh;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.ssh.jsch;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit.ssh;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.ssh.jsch;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml index 158e967e44..34fb8e7f36 100644 --- a/org.eclipse.jgit.ssh.jsch.test/pom.xml +++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId> diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF index 61a4ee10f5..056af34204 100644 --- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF @@ -3,19 +3,19 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.jsch Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true -Fragment-Host: org.eclipse.jgit;bundle-version="[6.5.1,6.6.0)" +Fragment-Host: org.eclipse.jgit;bundle-version="[6.6.2,6.7.0)" Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.5.1" +Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.6.2" Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.ssh;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.ssh;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF index f96290cf8f..81557f5980 100644 --- a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ssh.jsch - Sources Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml index 9336ce130b..6be4eaa79b 100644 --- a/org.eclipse.jgit.ssh.jsch/pom.xml +++ b/org.eclipse.jgit.ssh.jsch/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index e2390b3e17..06be2aecd8 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.test Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -16,64 +16,64 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)", org.assertj.core.api;version="[3.14.0,4.0.0)", - org.eclipse.jgit.annotations;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api;version="[6.5.1,6.6.0)", - org.eclipse.jgit.api.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.archive;version="[6.5.1,6.6.0)", - org.eclipse.jgit.attributes;version="[6.5.1,6.6.0)", - org.eclipse.jgit.awtui;version="[6.5.1,6.6.0)", - org.eclipse.jgit.blame;version="[6.5.1,6.6.0)", - org.eclipse.jgit.diff;version="[6.5.1,6.6.0)", - org.eclipse.jgit.dircache;version="[6.5.1,6.6.0)", - org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.events;version="[6.5.1,6.6.0)", - org.eclipse.jgit.fnmatch;version="[6.5.1,6.6.0)", - org.eclipse.jgit.gitrepo;version="[6.5.1,6.6.0)", - org.eclipse.jgit.hooks;version="[6.5.1,6.6.0)", - org.eclipse.jgit.ignore;version="[6.5.1,6.6.0)", - org.eclipse.jgit.ignore.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.diff;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.diffmergetool;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.fsck;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.commitgraph;version="6.5.1", - org.eclipse.jgit.internal.storage.dfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.io;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.memory;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.storage.reftable;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.connectivity;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.parser;version="[6.5.1,6.6.0)", - org.eclipse.jgit.internal.transport.ssh;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit;version="[6.5.1,6.6.0)", - org.eclipse.jgit.junit.time;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lfs;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.logging;version="[6.5.1,6.6.0)", - org.eclipse.jgit.merge;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.notes;version="[6.5.1,6.6.0)", - org.eclipse.jgit.patch;version="[6.5.1,6.6.0)", - org.eclipse.jgit.pgm;version="[6.5.1,6.6.0)", - org.eclipse.jgit.pgm.internal;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revplot;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.file;version="[6.5.1,6.6.0)", - org.eclipse.jgit.storage.pack;version="[6.5.1,6.6.0)", - org.eclipse.jgit.submodule;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.http;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport.resolver;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.treewalk.filter;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.io;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util.sha1;version="[6.5.1,6.6.0)", + org.eclipse.jgit.annotations;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api;version="[6.6.2,6.7.0)", + org.eclipse.jgit.api.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.archive;version="[6.6.2,6.7.0)", + org.eclipse.jgit.attributes;version="[6.6.2,6.7.0)", + org.eclipse.jgit.awtui;version="[6.6.2,6.7.0)", + org.eclipse.jgit.blame;version="[6.6.2,6.7.0)", + org.eclipse.jgit.diff;version="[6.6.2,6.7.0)", + org.eclipse.jgit.dircache;version="[6.6.2,6.7.0)", + org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.events;version="[6.6.2,6.7.0)", + org.eclipse.jgit.fnmatch;version="[6.6.2,6.7.0)", + org.eclipse.jgit.gitrepo;version="[6.6.2,6.7.0)", + org.eclipse.jgit.hooks;version="[6.6.2,6.7.0)", + org.eclipse.jgit.ignore;version="[6.6.2,6.7.0)", + org.eclipse.jgit.ignore.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.diff;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.diffmergetool;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.fsck;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.commitgraph;version="6.6.2", + org.eclipse.jgit.internal.storage.dfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.io;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.memory;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.storage.reftable;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.connectivity;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.parser;version="[6.6.2,6.7.0)", + org.eclipse.jgit.internal.transport.ssh;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit;version="[6.6.2,6.7.0)", + org.eclipse.jgit.junit.time;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lfs;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.logging;version="[6.6.2,6.7.0)", + org.eclipse.jgit.merge;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.notes;version="[6.6.2,6.7.0)", + org.eclipse.jgit.patch;version="[6.6.2,6.7.0)", + org.eclipse.jgit.pgm;version="[6.6.2,6.7.0)", + org.eclipse.jgit.pgm.internal;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revplot;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.file;version="[6.6.2,6.7.0)", + org.eclipse.jgit.storage.pack;version="[6.6.2,6.7.0)", + org.eclipse.jgit.submodule;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.http;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport.resolver;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.treewalk.filter;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.io;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util.sha1;version="[6.6.2,6.7.0)", org.hamcrest;version="[1.1.0,3.0.0)", org.hamcrest.collection;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.test/build.properties b/org.eclipse.jgit.test/build.properties index 212c8bd4d7..9e4c987066 100644 --- a/org.eclipse.jgit.test/build.properties +++ b/org.eclipse.jgit.test/build.properties @@ -7,4 +7,4 @@ bin.includes = META-INF/,\ plugin.properties,\ bin-tst/,\ bin/ -additional.bundles = org.slf4j.binding.simple +additional.bundles = slf4j.simple diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index b7d932a408..2e64ccc857 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.test</artifactId> diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict.patch new file mode 100644 index 0000000000..547fcdae26 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict.patch @@ -0,0 +1,8 @@ +diff --git a/conflict b/conflict +index 2e65efe..7898192 100644 +--- a/conflict ++++ b/conflict +@@ -1 +1 @@ +-a different preimage line +\ No newline at end of file ++a new line diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PostImage new file mode 100644 index 0000000000..fa27877b05 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PostImage @@ -0,0 +1 @@ +preimage line diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PreImage new file mode 100644 index 0000000000..fa27877b05 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/conflict_PreImage @@ -0,0 +1 @@ +preimage line diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit.patch new file mode 100644 index 0000000000..802fa15465 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit.patch @@ -0,0 +1,9 @@ +diff --git a/.git/b b/.git/b +new file mode 100644 +index 0000000..de98044 +--- /dev/null ++++ b/.git/b +@@ -0,0 +1,3 @@ ++a ++b ++c
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit2.patch new file mode 100644 index 0000000000..03cacbaeed --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/dotgit2.patch @@ -0,0 +1,9 @@ +diff --git a/.GIT/b b/.GIT/b +new file mode 100644 +index 0000000..de98044 +--- /dev/null ++++ b/.git/b +@@ -0,0 +1,3 @@ ++a ++b ++c
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e.patch deleted file mode 100644 index f531033845..0000000000 --- a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e.patch +++ /dev/null @@ -1,297 +0,0 @@ -diff --git a/z_e b/z_e -index 8d8786f..7888356 100644 ---- a/z_e -+++ b/z_e -@@ -20,6 +20,7 @@ - package org.jsonschema2pojo.util; - - import java.util.ArrayList; -+import java.util.Collections; - import java.util.List; - import java.util.regex.Matcher; - import java.util.regex.Pattern; -@@ -36,76 +37,81 @@ - private static final Pattern UNDERSCORE_PATTERN_1 = Pattern.compile("([A-Z]+)([A-Z][a-z])"); - private static final Pattern UNDERSCORE_PATTERN_2 = Pattern.compile("([a-z\\d])([A-Z])"); - -- private List<RuleAndReplacement> plurals = new ArrayList<RuleAndReplacement>(); -- private List<RuleAndReplacement> singulars = new ArrayList<RuleAndReplacement>(); -- private List<String> uncountables = new ArrayList<String>(); -+ private final List<RuleAndReplacement> plurals; -+ private final List<RuleAndReplacement> singulars; -+ private final List<String> uncountables; - -- private static Inflector instance = new Inflector(); -+ private static Inflector instance = createDefaultBuilder().build(); - -- private Inflector() { -- // Woo, you can't touch me. -- -- initialize(); -+ private Inflector(Builder builder) { -+ plurals = Collections.unmodifiableList(builder.plurals); -+ singulars = Collections.unmodifiableList(builder.singulars); -+ uncountables = Collections.unmodifiableList(builder.uncountables); - } - -- private void initialize() { -- plural("$", "s"); -- plural("s$", "s"); -- plural("(ax|test)is$", "$1es"); -- plural("(octop|vir)us$", "$1i"); -- plural("(alias|status)$", "$1es"); -- plural("(bu)s$", "$1es"); -- plural("(buffal|tomat)o$", "$1oes"); -- plural("([ti])um$", "$1a"); -- plural("sis$", "ses"); -- plural("(?:([^f])fe|([lr])f)$", "$1$2ves"); -- plural("(hive)$", "$1s"); -- plural("([^aeiouy]|qu)y$", "$1ies"); -- plural("([^aeiouy]|qu)ies$", "$1y"); -- plural("(x|ch|ss|sh)$", "$1es"); -- plural("(matr|vert|ind)ix|ex$", "$1ices"); -- plural("([m|l])ouse$", "$1ice"); -- plural("(ox)$", "$1en"); -- plural("(quiz)$", "$1zes"); -+ public static Inflector.Builder createDefaultBuilder() -+ { -+ Builder builder = builder(); - -- singular("s$", ""); -- singular("(n)ews$", "$1ews"); -- singular("([ti])a$", "$1um"); -- singular("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis"); -- singular("(^analy)ses$", "$1sis"); -- singular("([^f])ves$", "$1fe"); -- singular("(hive)s$", "$1"); -- singular("(tive)s$", "$1"); -- singular("([lr])ves$", "$1f"); -- singular("([^aeiouy]|qu)ies$", "$1y"); -- singular("(s)eries$", "$1eries"); -- singular("(m)ovies$", "$1ovie"); -- singular("(x|ch|ss|sh)es$", "$1"); -- singular("([m|l])ice$", "$1ouse"); -- singular("(bus)es$", "$1"); -- singular("(o)es$", "$1"); -- singular("(shoe)s$", "$1"); -- singular("(cris|ax|test)es$", "$1is"); -- singular("([octop|vir])i$", "$1us"); -- singular("(alias|status)es$", "$1"); -- singular("^(ox)en", "$1"); -- singular("(vert|ind)ices$", "$1ex"); -- singular("(matr)ices$", "$1ix"); -- singular("(quiz)zes$", "$1"); -- singular("(ess)$", "$1"); -+ builder.plural("$", "s") -+ .plural("s$", "s") -+ .plural("(ax|test)is$", "$1es") -+ .plural("(octop|vir)us$", "$1i") -+ .plural("(alias|status)$", "$1es") -+ .plural("(bu)s$", "$1es") -+ .plural("(buffal|tomat)o$", "$1oes") -+ .plural("([ti])um$", "$1a") -+ .plural("sis$", "ses") -+ .plural("(?:([^f])fe|([lr])f)$", "$1$2ves") -+ .plural("(hive)$", "$1s") -+ .plural("([^aeiouy]|qu)y$", "$1ies") -+ .plural("([^aeiouy]|qu)ies$", "$1y") -+ .plural("(x|ch|ss|sh)$", "$1es") -+ .plural("(matr|vert|ind)ix|ex$", "$1ices") -+ .plural("([m|l])ouse$", "$1ice") -+ .plural("(ox)$", "$1en") -+ .plural("(quiz)$", "$1zes"); - -- singular("men$", "man"); -- plural("man$", "men"); -+ builder.singular("s$", "") -+ .singular("(n)ews$", "$1ews") -+ .singular("([ti])a$", "$1um") -+ .singular("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis") -+ .singular("(^analy)ses$", "$1sis") -+ .singular("([^f])ves$", "$1fe") -+ .singular("(hive)s$", "$1") -+ .singular("(tive)s$", "$1") -+ .singular("([lr])ves$", "$1f") -+ .singular("([^aeiouy]|qu)ies$", "$1y") -+ .singular("(s)eries$", "$1eries") -+ .singular("(m)ovies$", "$1ovie") -+ .singular("(x|ch|ss|sh)es$", "$1") -+ .singular("([m|l])ice$", "$1ouse") -+ .singular("(bus)es$", "$1") -+ .singular("(o)es$", "$1") -+ .singular("(shoe)s$", "$1") -+ .singular("(cris|ax|test)es$", "$1is") -+ .singular("([octop|vir])i$", "$1us") -+ .singular("(alias|status)es$", "$1") -+ .singular("^(ox)en", "$1") -+ .singular("(vert|ind)ices$", "$1ex") -+ .singular("(matr)ices$", "$1ix") -+ .singular("(quiz)zes$", "$1") -+ .singular("(ess)$", "$1"); - -- irregular("curve", "curves"); -- irregular("leaf", "leaves"); -- irregular("roof", "rooves"); -- irregular("person", "people"); -- irregular("child", "children"); -- irregular("sex", "sexes"); -- irregular("move", "moves"); -+ builder.singular("men$", "man") -+ .plural("man$", "men"); - -- uncountable(new String[] { "equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "s" }); -+ builder.irregular("curve", "curves") -+ .irregular("leaf", "leaves") -+ .irregular("roof", "rooves") -+ .irregular("person", "people") -+ .irregular("child", "children") -+ .irregular("sex", "sexes") -+ .irregular("move", "moves"); -+ -+ builder.uncountable(new String[] { "equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "s" }); -+ -+ return builder; - } - - public static Inflector getInstance() { -@@ -122,28 +128,27 @@ - return underscoredWord; - } - -- public synchronized String pluralize(String word) { -+ public String pluralize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, plurals); - } - -- public synchronized String singularize(String word) { -+ public String singularize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, singulars); - } - -- private String replaceWithFirstRule(String word, List<RuleAndReplacement> ruleAndReplacements) { -+ private static String replaceWithFirstRule(String word, List<RuleAndReplacement> ruleAndReplacements) { - - for (RuleAndReplacement rar : ruleAndReplacements) { -- String rule = rar.getRule(); - String replacement = rar.getReplacement(); - - // Return if we find a match. -- Matcher matcher = Pattern.compile(rule, Pattern.CASE_INSENSITIVE).matcher(word); -+ Matcher matcher = rar.getPattern().matcher(word); - if (matcher.find()) { - return matcher.replaceAll(replacement); - } -@@ -161,49 +166,68 @@ - return tableize(className); - } - -- private void plural(String rule, String replacement) { -- plurals.add(0, new RuleAndReplacement(rule, replacement)); -+ public static Builder builder() -+ { -+ return new Builder(); - } - -- private void singular(String rule, String replacement) { -- singulars.add(0, new RuleAndReplacement(rule, replacement)); -+ // Ugh, no open structs in Java (not-natively at least). -+ private static class RuleAndReplacement { -+ private final String rule; -+ private final String replacement; -+ private final Pattern pattern; -+ -+ public RuleAndReplacement(String rule, String replacement) { -+ this.rule = rule; -+ this.replacement = replacement; -+ this.pattern = Pattern.compile(rule, Pattern.CASE_INSENSITIVE); -+ } -+ -+ public String getReplacement() { -+ return replacement; -+ } -+ -+ public String getRule() { -+ return rule; -+ } -+ -+ public Pattern getPattern() { -+ return pattern; -+ } - } - -- private void irregular(String singular, String plural) { -- plural(singular, plural); -- singular(plural, singular); -- } -+ public static class Builder -+ { -+ private List<RuleAndReplacement> plurals = new ArrayList<RuleAndReplacement>(); -+ private List<RuleAndReplacement> singulars = new ArrayList<RuleAndReplacement>(); -+ private List<String> uncountables = new ArrayList<String>(); - -- private void uncountable(String... words) { -- for (String word : words) { -- uncountables.add(word); -+ public Builder plural(String rule, String replacement) { -+ plurals.add(0, new RuleAndReplacement(rule, replacement)); -+ return this; -+ } -+ -+ public Builder singular(String rule, String replacement) { -+ singulars.add(0, new RuleAndReplacement(rule, replacement)); -+ return this; -+ } -+ -+ public Builder irregular(String singular, String plural) { -+ plural(singular, plural); -+ singular(plural, singular); -+ return this; -+ } -+ -+ public Builder uncountable(String... words) { -+ for (String word : words) { -+ uncountables.add(word); -+ } -+ return this; -+ } -+ -+ public Inflector build() -+ { -+ return new Inflector(this); - } - } - } -- --// Ugh, no open structs in Java (not-natively at least). --class RuleAndReplacement { -- private String rule; -- private String replacement; -- -- public RuleAndReplacement(String rule, String replacement) { -- this.rule = rule; -- this.replacement = replacement; -- } -- -- public String getReplacement() { -- return replacement; -- } -- -- public void setReplacement(String replacement) { -- this.replacement = replacement; -- } -- -- public String getRule() { -- return rule; -- } -- -- public void setRule(String rule) { -- this.rule = rule; -- } --} -\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PostImage deleted file mode 100644 index 7888356948..0000000000 --- a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PostImage +++ /dev/null @@ -1,233 +0,0 @@ -/** - * Copyright © 2007 Chu Yeow Cheah - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Copied verbatim from http://dzone.com/snippets/java-inflections, used - * and licensed with express permission from the author Chu Yeow Cheah. - */ - -package org.jsonschema2pojo.util; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Transforms words (from singular to plural, from camelCase to under_score, - * etc.). I got bored of doing Real Work... - * - * @author chuyeow - */ -public class Inflector { - - // Pfft, can't think of a better name, but this is needed to avoid the price of initializing the pattern on each call. - private static final Pattern UNDERSCORE_PATTERN_1 = Pattern.compile("([A-Z]+)([A-Z][a-z])"); - private static final Pattern UNDERSCORE_PATTERN_2 = Pattern.compile("([a-z\\d])([A-Z])"); - - private final List<RuleAndReplacement> plurals; - private final List<RuleAndReplacement> singulars; - private final List<String> uncountables; - - private static Inflector instance = createDefaultBuilder().build(); - - private Inflector(Builder builder) { - plurals = Collections.unmodifiableList(builder.plurals); - singulars = Collections.unmodifiableList(builder.singulars); - uncountables = Collections.unmodifiableList(builder.uncountables); - } - - public static Inflector.Builder createDefaultBuilder() - { - Builder builder = builder(); - - builder.plural("$", "s") - .plural("s$", "s") - .plural("(ax|test)is$", "$1es") - .plural("(octop|vir)us$", "$1i") - .plural("(alias|status)$", "$1es") - .plural("(bu)s$", "$1es") - .plural("(buffal|tomat)o$", "$1oes") - .plural("([ti])um$", "$1a") - .plural("sis$", "ses") - .plural("(?:([^f])fe|([lr])f)$", "$1$2ves") - .plural("(hive)$", "$1s") - .plural("([^aeiouy]|qu)y$", "$1ies") - .plural("([^aeiouy]|qu)ies$", "$1y") - .plural("(x|ch|ss|sh)$", "$1es") - .plural("(matr|vert|ind)ix|ex$", "$1ices") - .plural("([m|l])ouse$", "$1ice") - .plural("(ox)$", "$1en") - .plural("(quiz)$", "$1zes"); - - builder.singular("s$", "") - .singular("(n)ews$", "$1ews") - .singular("([ti])a$", "$1um") - .singular("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis") - .singular("(^analy)ses$", "$1sis") - .singular("([^f])ves$", "$1fe") - .singular("(hive)s$", "$1") - .singular("(tive)s$", "$1") - .singular("([lr])ves$", "$1f") - .singular("([^aeiouy]|qu)ies$", "$1y") - .singular("(s)eries$", "$1eries") - .singular("(m)ovies$", "$1ovie") - .singular("(x|ch|ss|sh)es$", "$1") - .singular("([m|l])ice$", "$1ouse") - .singular("(bus)es$", "$1") - .singular("(o)es$", "$1") - .singular("(shoe)s$", "$1") - .singular("(cris|ax|test)es$", "$1is") - .singular("([octop|vir])i$", "$1us") - .singular("(alias|status)es$", "$1") - .singular("^(ox)en", "$1") - .singular("(vert|ind)ices$", "$1ex") - .singular("(matr)ices$", "$1ix") - .singular("(quiz)zes$", "$1") - .singular("(ess)$", "$1"); - - builder.singular("men$", "man") - .plural("man$", "men"); - - builder.irregular("curve", "curves") - .irregular("leaf", "leaves") - .irregular("roof", "rooves") - .irregular("person", "people") - .irregular("child", "children") - .irregular("sex", "sexes") - .irregular("move", "moves"); - - builder.uncountable(new String[] { "equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "s" }); - - return builder; - } - - public static Inflector getInstance() { - return instance; - } - - private String underscore(String camelCasedWord) { - - // Regexes in Java are fucking stupid... - String underscoredWord = UNDERSCORE_PATTERN_1.matcher(camelCasedWord).replaceAll("$1_$2"); - underscoredWord = UNDERSCORE_PATTERN_2.matcher(underscoredWord).replaceAll("$1_$2"); - underscoredWord = underscoredWord.replace('-', '_').toLowerCase(); - - return underscoredWord; - } - - public String pluralize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, plurals); - } - - public String singularize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, singulars); - } - - private static String replaceWithFirstRule(String word, List<RuleAndReplacement> ruleAndReplacements) { - - for (RuleAndReplacement rar : ruleAndReplacements) { - String replacement = rar.getReplacement(); - - // Return if we find a match. - Matcher matcher = rar.getPattern().matcher(word); - if (matcher.find()) { - return matcher.replaceAll(replacement); - } - } - return word; - } - - private String tableize(String className) { - return pluralize(underscore(className)); - } - - private String tableize(Class<?> klass) { - // Strip away package name - we only want the 'base' class name. - String className = klass.getName().replace(klass.getPackage().getName() + ".", ""); - return tableize(className); - } - - public static Builder builder() - { - return new Builder(); - } - - // Ugh, no open structs in Java (not-natively at least). - private static class RuleAndReplacement { - private final String rule; - private final String replacement; - private final Pattern pattern; - - public RuleAndReplacement(String rule, String replacement) { - this.rule = rule; - this.replacement = replacement; - this.pattern = Pattern.compile(rule, Pattern.CASE_INSENSITIVE); - } - - public String getReplacement() { - return replacement; - } - - public String getRule() { - return rule; - } - - public Pattern getPattern() { - return pattern; - } - } - - public static class Builder - { - private List<RuleAndReplacement> plurals = new ArrayList<RuleAndReplacement>(); - private List<RuleAndReplacement> singulars = new ArrayList<RuleAndReplacement>(); - private List<String> uncountables = new ArrayList<String>(); - - public Builder plural(String rule, String replacement) { - plurals.add(0, new RuleAndReplacement(rule, replacement)); - return this; - } - - public Builder singular(String rule, String replacement) { - singulars.add(0, new RuleAndReplacement(rule, replacement)); - return this; - } - - public Builder irregular(String singular, String plural) { - plural(singular, plural); - singular(plural, singular); - return this; - } - - public Builder uncountable(String... words) { - for (String word : words) { - uncountables.add(word); - } - return this; - } - - public Inflector build() - { - return new Inflector(this); - } - } -} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PreImage deleted file mode 100644 index 8d8786f58c..0000000000 --- a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/z_e_PreImage +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Copyright © 2007 Chu Yeow Cheah - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Copied verbatim from http://dzone.com/snippets/java-inflections, used - * and licensed with express permission from the author Chu Yeow Cheah. - */ - -package org.jsonschema2pojo.util; - -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Transforms words (from singular to plural, from camelCase to under_score, - * etc.). I got bored of doing Real Work... - * - * @author chuyeow - */ -public class Inflector { - - // Pfft, can't think of a better name, but this is needed to avoid the price of initializing the pattern on each call. - private static final Pattern UNDERSCORE_PATTERN_1 = Pattern.compile("([A-Z]+)([A-Z][a-z])"); - private static final Pattern UNDERSCORE_PATTERN_2 = Pattern.compile("([a-z\\d])([A-Z])"); - - private List<RuleAndReplacement> plurals = new ArrayList<RuleAndReplacement>(); - private List<RuleAndReplacement> singulars = new ArrayList<RuleAndReplacement>(); - private List<String> uncountables = new ArrayList<String>(); - - private static Inflector instance = new Inflector(); - - private Inflector() { - // Woo, you can't touch me. - - initialize(); - } - - private void initialize() { - plural("$", "s"); - plural("s$", "s"); - plural("(ax|test)is$", "$1es"); - plural("(octop|vir)us$", "$1i"); - plural("(alias|status)$", "$1es"); - plural("(bu)s$", "$1es"); - plural("(buffal|tomat)o$", "$1oes"); - plural("([ti])um$", "$1a"); - plural("sis$", "ses"); - plural("(?:([^f])fe|([lr])f)$", "$1$2ves"); - plural("(hive)$", "$1s"); - plural("([^aeiouy]|qu)y$", "$1ies"); - plural("([^aeiouy]|qu)ies$", "$1y"); - plural("(x|ch|ss|sh)$", "$1es"); - plural("(matr|vert|ind)ix|ex$", "$1ices"); - plural("([m|l])ouse$", "$1ice"); - plural("(ox)$", "$1en"); - plural("(quiz)$", "$1zes"); - - singular("s$", ""); - singular("(n)ews$", "$1ews"); - singular("([ti])a$", "$1um"); - singular("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis"); - singular("(^analy)ses$", "$1sis"); - singular("([^f])ves$", "$1fe"); - singular("(hive)s$", "$1"); - singular("(tive)s$", "$1"); - singular("([lr])ves$", "$1f"); - singular("([^aeiouy]|qu)ies$", "$1y"); - singular("(s)eries$", "$1eries"); - singular("(m)ovies$", "$1ovie"); - singular("(x|ch|ss|sh)es$", "$1"); - singular("([m|l])ice$", "$1ouse"); - singular("(bus)es$", "$1"); - singular("(o)es$", "$1"); - singular("(shoe)s$", "$1"); - singular("(cris|ax|test)es$", "$1is"); - singular("([octop|vir])i$", "$1us"); - singular("(alias|status)es$", "$1"); - singular("^(ox)en", "$1"); - singular("(vert|ind)ices$", "$1ex"); - singular("(matr)ices$", "$1ix"); - singular("(quiz)zes$", "$1"); - singular("(ess)$", "$1"); - - singular("men$", "man"); - plural("man$", "men"); - - irregular("curve", "curves"); - irregular("leaf", "leaves"); - irregular("roof", "rooves"); - irregular("person", "people"); - irregular("child", "children"); - irregular("sex", "sexes"); - irregular("move", "moves"); - - uncountable(new String[] { "equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "s" }); - } - - public static Inflector getInstance() { - return instance; - } - - private String underscore(String camelCasedWord) { - - // Regexes in Java are fucking stupid... - String underscoredWord = UNDERSCORE_PATTERN_1.matcher(camelCasedWord).replaceAll("$1_$2"); - underscoredWord = UNDERSCORE_PATTERN_2.matcher(underscoredWord).replaceAll("$1_$2"); - underscoredWord = underscoredWord.replace('-', '_').toLowerCase(); - - return underscoredWord; - } - - public synchronized String pluralize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, plurals); - } - - public synchronized String singularize(String word) { - if (uncountables.contains(word.toLowerCase())) { - return word; - } - return replaceWithFirstRule(word, singulars); - } - - private String replaceWithFirstRule(String word, List<RuleAndReplacement> ruleAndReplacements) { - - for (RuleAndReplacement rar : ruleAndReplacements) { - String rule = rar.getRule(); - String replacement = rar.getReplacement(); - - // Return if we find a match. - Matcher matcher = Pattern.compile(rule, Pattern.CASE_INSENSITIVE).matcher(word); - if (matcher.find()) { - return matcher.replaceAll(replacement); - } - } - return word; - } - - private String tableize(String className) { - return pluralize(underscore(className)); - } - - private String tableize(Class<?> klass) { - // Strip away package name - we only want the 'base' class name. - String className = klass.getName().replace(klass.getPackage().getName() + ".", ""); - return tableize(className); - } - - private void plural(String rule, String replacement) { - plurals.add(0, new RuleAndReplacement(rule, replacement)); - } - - private void singular(String rule, String replacement) { - singulars.add(0, new RuleAndReplacement(rule, replacement)); - } - - private void irregular(String singular, String plural) { - plural(singular, plural); - singular(plural, singular); - } - - private void uncountable(String... words) { - for (String word : words) { - uncountables.add(word); - } - } -} - -// Ugh, no open structs in Java (not-natively at least). -class RuleAndReplacement { - private String rule; - private String replacement; - - public RuleAndReplacement(String rule, String replacement) { - this.rule = rule; - this.replacement = replacement; - } - - public String getReplacement() { - return replacement; - } - - public void setReplacement(String replacement) { - this.replacement = replacement; - } - - public String getRule() { - return rule; - } - - public void setRule(String rule) { - this.rule = rule; - } -}
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/.gitattributes b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/.gitattributes new file mode 100644 index 0000000000..b38f87f9e3 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/.gitattributes @@ -0,0 +1 @@ +*.patch -crlf diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/dirtest.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/dirtest.patch new file mode 100644 index 0000000000..a275c8593f --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/symlinks/dirtest.patch @@ -0,0 +1,9 @@ +diff --git a/a/b b/a/b +new file mode 100644 +index 0000000..de98044 +--- /dev/null ++++ b/a/b +@@ -0,0 +1,3 @@ ++a ++b ++c
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java index 57661a7eca..db2d5d1404 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java @@ -17,12 +17,16 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; +import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; +import java.io.OutputStream; import java.io.PrintWriter; import java.nio.file.Files; import java.util.Set; +import java.util.concurrent.TimeUnit; import org.eclipse.jgit.api.ResetCommand.ResetType; import org.eclipse.jgit.api.errors.FilterFailedException; @@ -825,7 +829,7 @@ public class AddCommandTest extends RepositoryTestCase { } @Test - public void testAddWholeRepo() throws Exception { + public void testAddWholeRepo() throws Exception { FileUtils.mkdir(new File(db.getWorkTree(), "sub")); File file = new File(db.getWorkTree(), "sub/a.txt"); FileUtils.createNewFile(file); @@ -848,6 +852,72 @@ public class AddCommandTest extends RepositoryTestCase { } } + @Test + public void testAddAllNoRenormalize() throws Exception { + final int nOfFiles = 1000; + final int filesPerDir = nOfFiles / 10; + final int fileSizeInBytes = 10_000; + assertTrue(nOfFiles > 0); + assertTrue(filesPerDir > 0); + File dir = null; + File lastFile = null; + for (int i = 0; i < nOfFiles; i++) { + if (i % filesPerDir == 0) { + dir = new File(db.getWorkTree(), "dir" + (i / filesPerDir)); + FileUtils.mkdir(dir); + } + lastFile = new File(dir, "file" + i); + try (OutputStream out = new BufferedOutputStream( + new FileOutputStream(lastFile))) { + for (int b = 0; b < fileSizeInBytes; b++) { + out.write('a' + (b % 26)); + if (((b + 1) % 70) == 0) { + out.write('\n'); + } + } + } + } + // Help null pointer analysis. + assert lastFile != null; + // Wait a bit. If entries are "racily clean", we'll recompute + // hashes from the disk files, and then the second add is also slow. + // We want to test the normal case. + fsTick(lastFile); + try (Git git = new Git(db)) { + long start = System.nanoTime(); + git.add().addFilepattern(".").call(); + long initialElapsed = System.nanoTime() - start; + assertEquals("Unexpected number on index entries", nOfFiles, + db.readDirCache().getEntryCount()); + start = System.nanoTime(); + git.add().addFilepattern(".").setRenormalize(false).call(); + long secondElapsed = System.nanoTime() - start; + assertEquals("Unexpected number on index entries", nOfFiles, + db.readDirCache().getEntryCount()); + // Fail the test if the second add all was not significantly faster. + // A factor of 4 is rather generous. The speed-up depends on the + // file system and OS caching and is hard to predict. + assertTrue( + "Second add all was too slow; initial took " + + TimeUnit.NANOSECONDS.toMillis(initialElapsed) + + ", second took " + + TimeUnit.NANOSECONDS.toMillis(secondElapsed), + secondElapsed * 4 <= initialElapsed); + // Change one file. The index should be updated even if + // renormalize==false. It doesn't matter what kind of change we do. + final String newData = "Hello"; + Files.writeString(lastFile.toPath(), newData); + git.add().addFilepattern(".").setRenormalize(false).call(); + DirCache dc = db.readDirCache(); + DirCacheEntry e = dc.getEntry(lastFile.getParentFile().getName() + + '/' + lastFile.getName()); + String blob = new String(db + .open(e.getObjectId(), Constants.OBJ_BLOB).getCachedBytes(), + UTF_8); + assertEquals("Unexpected index content", newData, blob); + } + } + // the same three cases as in testAddWithParameterUpdate // file a exists in workdir and in index -> added // file b exists not in workdir but in index -> unchanged diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java index f2cceac4b3..411eab3e7e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java @@ -261,14 +261,10 @@ public class ArchiveCommandTest extends RepositoryTestCase { File archive = new File(getTemporaryDirectory(), "archive." + format); - archive(git, archive, fmt, new HashMap<String, Object>() {{ - put("compression-level", 1); - }}); + archive(git, archive, fmt, Map.of("compression-level", 1)); int sizeCompression1 = getNumBytes(archive); - archive(git, archive, fmt, new HashMap<String, Object>() {{ - put("compression-level", 9); - }}); + archive(git, archive, fmt, Map.of("compression-level", 9)); int sizeCompression9 = getNumBytes(archive); assertTrue(sizeCompression1 > sizeCompression9); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java index 0d38197d9a..301d6be662 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java @@ -100,41 +100,73 @@ public class CherryPickCommandTest extends RepositoryTestCase { } } - @Test - public void testSequentialCherryPick() throws IOException, JGitInternalException, - GitAPIException { - try (Git git = new Git(db)) { - writeTrashFile("a", "first line\nsec. line\nthird line\n"); - git.add().addFilepattern("a").call(); - RevCommit firstCommit = git.commit().setMessage("create a").call(); - - writeTrashFile("a", "first line\nsec. line\nthird line\nfourth line\n"); - git.add().addFilepattern("a").call(); - RevCommit enlargingA = git.commit().setMessage("enlarged a").call(); - - writeTrashFile("a", - "first line\nsecond line\nthird line\nfourth line\n"); - git.add().addFilepattern("a").call(); - RevCommit fixingA = git.commit().setMessage("fixed a").call(); - - git.branchCreate().setName("side").setStartPoint(firstCommit).call(); - checkoutBranch("refs/heads/side"); - - writeTrashFile("b", "nothing to do with a"); - git.add().addFilepattern("b").call(); - git.commit().setMessage("create b").call(); - - CherryPickResult result = git.cherryPick().include(enlargingA).include(fixingA).call(); - assertEquals(CherryPickResult.CherryPickStatus.OK, result.getStatus()); - - Iterator<RevCommit> history = git.log().call().iterator(); - assertEquals("fixed a", history.next().getFullMessage()); - assertEquals("enlarged a", history.next().getFullMessage()); - assertEquals("create b", history.next().getFullMessage()); - assertEquals("create a", history.next().getFullMessage()); - assertFalse(history.hasNext()); - } - } + @Test + public void testSequentialCherryPick() + throws IOException, JGitInternalException, GitAPIException { + try (Git git = new Git(db)) { + writeTrashFile("a", "first line\nsec. line\nthird line\n"); + git.add().addFilepattern("a").call(); + RevCommit firstCommit = git.commit().setMessage("create a").call(); + + writeTrashFile("a", + "first line\nsec. line\nthird line\nfourth line\n"); + git.add().addFilepattern("a").call(); + RevCommit enlargingA = git.commit().setMessage("enlarged a").call(); + + writeTrashFile("a", + "first line\nsecond line\nthird line\nfourth line\n"); + git.add().addFilepattern("a").call(); + RevCommit fixingA = git.commit().setMessage("fixed a").call(); + + git.branchCreate().setName("side").setStartPoint(firstCommit) + .call(); + checkoutBranch("refs/heads/side"); + + writeTrashFile("b", "nothing to do with a"); + git.add().addFilepattern("b").call(); + git.commit().setMessage("create b").call(); + + CherryPickResult result = git.cherryPick().include(enlargingA) + .include(fixingA).call(); + assertEquals(CherryPickResult.CherryPickStatus.OK, + result.getStatus()); + + Iterator<RevCommit> history = git.log().call().iterator(); + assertEquals("fixed a", history.next().getFullMessage()); + assertEquals("enlarged a", history.next().getFullMessage()); + assertEquals("create b", history.next().getFullMessage()); + assertEquals("create a", history.next().getFullMessage()); + assertFalse(history.hasNext()); + } + } + + @Test + public void testRootCherryPick() + throws IOException, JGitInternalException, GitAPIException { + try (Git git = new Git(db)) { + writeTrashFile("a", "a"); + writeTrashFile("b", "b"); + git.add().addFilepattern("a").addFilepattern("b").call(); + RevCommit firstCommit = git.commit().setMessage("Create a and b") + .call(); + + git.checkout().setOrphan(true).setName("orphan").call(); + git.rm().addFilepattern("a").addFilepattern("b").call(); + writeTrashFile("a", "a"); + git.add().addFilepattern("a").call(); + git.commit().setMessage("Orphan a").call(); + + CherryPickResult result = git.cherryPick().include(firstCommit) + .call(); + assertEquals(CherryPickResult.CherryPickStatus.OK, + result.getStatus()); + + Iterator<RevCommit> history = git.log().call().iterator(); + assertEquals("Create a and b", history.next().getFullMessage()); + assertEquals("Orphan a", history.next().getFullMessage()); + assertFalse(history.hasNext()); + } + } @Test public void testCherryPickDirtyIndex() throws Exception { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java index d574e45f6f..7f820b0433 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java @@ -76,6 +76,10 @@ public class RebaseCommandTest extends RepositoryTestCase { private static final String FILE1 = "file1"; + private static final String FILE2 = "file2"; + + private static final String FILE3 = "file3"; + protected Git git; @Override @@ -191,6 +195,143 @@ public class RebaseCommandTest extends RepositoryTestCase { } /** + * Rebase a single root commit onto an independent branch. + * + * <pre> + * A (master) + * + * B - C (orphan) + * </pre> + * + * to + * + * <pre> + * A + * + * B - C (orphan) - A' (master) + * </pre> + * + * @throws Exception + */ + @Test + public void testRebaseRootCommit() throws Exception { + writeTrashFile(FILE1, FILE1); + writeTrashFile(FILE2, FILE2); + git.add().addFilepattern(FILE1).addFilepattern(FILE2).call(); + RevCommit first = git.commit().setMessage("Add files").call(); + File file1 = new File(db.getWorkTree(), FILE1); + File file2 = new File(db.getWorkTree(), FILE2); + assertTrue(file1.exists()); + assertTrue(file2.exists()); + // Create an independent branch + git.checkout().setOrphan(true).setName("orphan").call(); + git.rm().addFilepattern(FILE1).addFilepattern(FILE2).call(); + assertFalse(file1.exists()); + assertFalse(file2.exists()); + writeTrashFile(FILE1, "something else"); + git.add().addFilepattern(FILE1).call(); + RevCommit orphanBase = git.commit().setMessage("Orphan base").call(); + writeTrashFile(FILE1, FILE1); + git.add().addFilepattern(FILE1).call(); + RevCommit orphanTop = git.commit().setMessage("Same file1").call(); + checkoutBranch("refs/heads/master"); + assertEquals(first.getId(), db.resolve("HEAD")); + RebaseResult res = git.rebase().setUpstream("refs/heads/orphan").call(); + assertEquals(Status.OK, res.getStatus()); + Iterable<RevCommit> log = git.log().add(db.resolve("HEAD")).call(); + ObjectId[] ids = { orphanTop.getId(), orphanBase.getId() }; + int nOfCommits = 0; + for (RevCommit c : log) { + nOfCommits++; + if (nOfCommits == 1) { + assertEquals("Add files", c.getFullMessage()); + } else { + assertEquals(ids[nOfCommits - 2], c.getId()); + } + } + assertEquals(3, nOfCommits); + assertTrue(file1.exists()); + checkFile(file1, FILE1); + assertTrue(file2.exists()); + checkFile(file2, FILE2); + } + + /** + * Rebase a branch onto an independent branch. + * + * <pre> + * A - B (master) + * + * C - D (orphan) + * </pre> + * + * to + * + * <pre> + * A - B + * + * C - D (orphan) - A' - B' (master) + * </pre> + * + * @throws Exception + */ + @Test + public void testRebaseNoMergeBase() throws Exception { + writeTrashFile(FILE1, FILE1); + writeTrashFile(FILE2, FILE2); + git.add().addFilepattern(FILE1).addFilepattern(FILE2).call(); + git.commit().setMessage("Add files").call(); + writeTrashFile(FILE3, FILE3); + git.add().addFilepattern(FILE3).call(); + RevCommit first = git.commit().setMessage("File3").call(); + File file1 = new File(db.getWorkTree(), FILE1); + File file2 = new File(db.getWorkTree(), FILE2); + File file3 = new File(db.getWorkTree(), FILE3); + assertTrue(file1.exists()); + assertTrue(file2.exists()); + assertTrue(file3.exists()); + // Create an independent branch + git.checkout().setOrphan(true).setName("orphan").call(); + git.rm() + .addFilepattern(FILE1) + .addFilepattern(FILE2) + .addFilepattern(FILE3) + .call(); + assertFalse(file1.exists()); + assertFalse(file2.exists()); + assertFalse(file3.exists()); + writeTrashFile(FILE1, "something else"); + git.add().addFilepattern(FILE1).call(); + RevCommit orphanBase = git.commit().setMessage("Orphan base").call(); + writeTrashFile(FILE1, FILE1); + git.add().addFilepattern(FILE1).call(); + RevCommit orphanTop = git.commit().setMessage("Same file1").call(); + checkoutBranch("refs/heads/master"); + assertEquals(first.getId(), db.resolve("HEAD")); + RebaseResult res = git.rebase().setUpstream("refs/heads/orphan").call(); + assertEquals(Status.OK, res.getStatus()); + Iterable<RevCommit> log = git.log().add(db.resolve("HEAD")).call(); + String[] msgs = { "File3", "Add files" }; + ObjectId[] ids = { orphanTop.getId(), orphanBase.getId() }; + int nOfCommits = 0; + for (RevCommit c : log) { + nOfCommits++; + if (nOfCommits <= msgs.length) { + assertEquals(msgs[nOfCommits - 1], c.getFullMessage()); + } else { + assertEquals(ids[nOfCommits - msgs.length - 1], c.getId()); + } + } + assertEquals(4, nOfCommits); + assertTrue(file1.exists()); + checkFile(file1, FILE1); + assertTrue(file2.exists()); + checkFile(file2, FILE2); + assertTrue(file3.exists()); + checkFile(file3, FILE3); + } + + /** * Create the following commits and then attempt to rebase topic onto * master. This will serialize the branches. * diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/TagCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/TagCommandTest.java index 99034174ba..c3f72135d6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/TagCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/TagCommandTest.java @@ -17,13 +17,16 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.IOException; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.InvalidTagNameException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.RefAlreadyExistsException; import org.eclipse.jgit.junit.RepositoryTestCase; +import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.Repository; @@ -286,4 +289,45 @@ public class TagCommandTest extends RepositoryTestCase { } } + @Test + public void testListTagsContainingCommit() throws Exception { + /* c3 + * | + * v2 - c2 b2 - v1 + * | | + * c1 b1 + * \ / + * a + */ + try (TestRepository<Repository> r = new TestRepository<>( + db)) { + Git git = Git.wrap(db); + RevCommit a = r.commit().create(); + RevCommit b1 = r.commit(a); + RevCommit b2 = r.commit(b1); + RevCommit c1 = r.commit(a); + RevCommit c2 = r.commit(c1); + RevCommit c3 = r.commit(c2); + r.update("refs/tags/v1", r.tag("v1", b2)); + r.update("refs/tags/v2", r.tag("v1.1", c2)); + List<Ref> res = git.tagList().setContains(a).call(); + assertEquals(2, res.size()); + assertTrue(res.stream().map(Ref::getName) + .collect(Collectors.toSet()).containsAll( + Arrays.asList("refs/tags/v1", "refs/tags/v2"))); + + res = git.tagList().setContains(b1).call(); + assertEquals(1, res.size()); + assertTrue(res.stream().map(Ref::getName) + .collect(Collectors.toSet()).contains("refs/tags/v1")); + + res = git.tagList().setContains(c1).call(); + assertEquals(1, res.size()); + assertTrue(res.stream().map(Ref::getName) + .collect(Collectors.toSet()).contains("refs/tags/v2")); + + res = git.tagList().setContains(c3).call(); + assertEquals(0, res.size()); + } + } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java index 8e84dfa318..01d1e0282d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2020 Google Inc. and others + * Copyright (C) 2009, 2023 Google Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -46,6 +46,16 @@ public class DirCacheEntryTest { assertFalse(isValidPath("a/")); assertFalse(isValidPath("ab/cd/ef/")); assertFalse(isValidPath("a\u0000b")); + assertFalse(isValidPath(".git")); + assertFalse(isValidPath(".GIT")); + assertFalse(isValidPath(".Git")); + assertFalse(isValidPath(".git/b")); + assertFalse(isValidPath(".GIT/b")); + assertFalse(isValidPath(".Git/b")); + assertFalse(isValidPath("x/y/.git/z/b")); + assertFalse(isValidPath("x/y/.GIT/z/b")); + assertFalse(isValidPath("x/y/.Git/z/b")); + assertTrue(isValidPath("git/b")); } @SuppressWarnings("unused") diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/InvalidPathCheckoutTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/InvalidPathCheckoutTest.java new file mode 100644 index 0000000000..e3bc85a512 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/InvalidPathCheckoutTest.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2023 Thomas Wolf <twolf@apache.org> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.dircache; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; + +import java.io.File; + +import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.api.ResetCommand.ResetType; +import org.eclipse.jgit.junit.RepositoryTestCase; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.lib.FileMode; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevBlob; +import org.eclipse.jgit.revwalk.RevCommit; +import org.junit.Test; + +/** + * Tests for checking out with invalid paths. + */ +public class InvalidPathCheckoutTest extends RepositoryTestCase { + + private DirCacheEntry brokenEntry(String fileName, RevBlob blob) { + DirCacheEntry entry = new DirCacheEntry("XXXX/" + fileName); + entry.path[0] = '.'; + entry.path[1] = 'g'; + entry.path[2] = 'i'; + entry.path[3] = 't'; + entry.setFileMode(FileMode.REGULAR_FILE); + entry.setObjectId(blob); + return entry; + } + + @Test + public void testCheckoutIntoDotGit() throws Exception { + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + // DirCacheEntry does not allow any path component to contain + // ".git". C git also forbids this. But what if somebody creates + // such an entry explicitly? + RevCommit base = repo + .commit(repo.tree(brokenEntry("b", repo.blob("test")))); + try (Git git = new Git(db)) { + assertThrows(InvalidPathException.class, () -> git.reset() + .setMode(ResetType.HARD).setRef(base.name()).call()); + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + } + } + } + +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java new file mode 100644 index 0000000000..b533d5c985 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndexTest.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2023, Google LLC + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.internal.storage.commitgraph; + +import org.eclipse.jgit.lib.ObjectId; +import org.junit.Test; +import static org.junit.Assert.assertEquals; + +public class GraphObjectIndexTest { + + @Test + public void findGraphPosition_noObjInBucket() throws CommitGraphFormatException { + GraphObjectIndex idx = new GraphObjectIndex(100, + new byte[256 * 4], new byte[] {}); + int graphPosition = idx.findGraphPosition( + ObjectId.fromString("731dfd4c5eb6f88b98e983b9b0551b3562a0c46c")); + assertEquals(-1, graphPosition); + } + +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java index 1519873b62..96a064989b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcConcurrentTest.java @@ -186,13 +186,12 @@ public class GcConcurrentTest extends GcTestCase { // make sure gc() has caused creation of a new packfile assertNotEquals(oldPackName, newPackName); - // Even when asking again for the set of packfiles outdated data - // will be returned. As long as the repository can work on cached data - // it will do so and not detect that a new packfile exists. - assertNotEquals(getSinglePack(repository).getPackName(), newPackName); + // When asking again for the set of packfiles the new updated data + // will be returned because of the rescan of the pack directory. + assertEquals(getSinglePack(repository).getPackName(), newPackName); - // Only when accessing object content it is required to rescan the pack - // directory and the new packfile will be detected. + // When accessing object content the new packfile refreshed from + // the rescan triggered from the list of packs. repository.getObjectDatabase().open(b).getSize(); assertEquals(getSinglePack(repository).getPackName(), newPackName); assertNotNull(getSinglePack(repository).getBitmapIndex()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterTest.java new file mode 100644 index 0000000000..220976471f --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterTest.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.storage.file; + +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; + +import org.junit.Test; + +public class PackReverseIndexWriterTest { + + @Test + public void createWriter_defaultVersion() { + PackReverseIndexWriter version1 = PackReverseIndexWriter + .createWriter(new ByteArrayOutputStream()); + + assertTrue(version1 instanceof PackReverseIndexWriterV1); + } + + @Test + public void createWriter_version1() { + PackReverseIndexWriter version1 = PackReverseIndexWriter + .createWriter(new ByteArrayOutputStream(), 1); + + assertTrue(version1 instanceof PackReverseIndexWriterV1); + } + + @Test + public void createWriter_unsupportedVersion() { + assertThrows(IllegalArgumentException.class, + () -> PackReverseIndexWriter + .createWriter(new ByteArrayOutputStream(), 2)); + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1Test.java new file mode 100644 index 0000000000..0124887af1 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1Test.java @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2023, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.storage.file; + +import static org.eclipse.jgit.lib.Constants.OBJECT_ID_STRING_LENGTH; +import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; +import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT; +import static org.eclipse.jgit.lib.Constants.OBJ_TREE; +import static org.junit.Assert.assertArrayEquals; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.transport.PackedObjectInfo; +import org.junit.Test; + +public class PackReverseIndexWriterV1Test { + + private static byte[] PACK_CHECKSUM = new byte[] { 'P', 'A', 'C', 'K', 'C', + 'H', 'E', 'C', 'K', 'S', 'U', 'M', '3', '4', '5', '6', '7', '8', + '9', '0', }; + + @Test + public void write_noObjects() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + PackReverseIndexWriter writer = PackReverseIndexWriter.createWriter(out, + 1); + List<PackedObjectInfo> objectsSortedByName = new ArrayList<>(); + + writer.write(objectsSortedByName, PACK_CHECKSUM); + + byte[] expected = new byte[] { 'R', 'I', 'D', 'X', // magic + 0x00, 0x00, 0x00, 0x01, // file version + 0x00, 0x00, 0x00, 0x01, // oid version + // pack checksum to copy into at byte 12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // checksum + (byte) 0xd1, 0x1d, 0x17, (byte) 0xd5, (byte) 0xa1, 0x5c, + (byte) 0x8f, 0x45, 0x7e, 0x06, (byte) 0x91, (byte) 0xf2, 0x7e, + 0x20, 0x35, 0x2c, (byte) 0xdc, 0x4c, 0x46, (byte) 0xe4, }; + System.arraycopy(PACK_CHECKSUM, 0, expected, 12, PACK_CHECKSUM.length); + assertArrayEquals(expected, out.toByteArray()); + } + + @Test + public void write_oneObject() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + PackReverseIndexWriter writer = PackReverseIndexWriter.createWriter(out, + 1); + PackedObjectInfo a = objectInfo("a", OBJ_COMMIT, 0); + List<PackedObjectInfo> objectsSortedByName = List.of(a); + + writer.write(objectsSortedByName, PACK_CHECKSUM); + + byte[] expected = new byte[] { 'R', 'I', 'D', 'X', // magic + 0x00, 0x00, 0x00, 0x01, // file version + 0x00, 0x00, 0x00, 0x01, // oid version + 0x00, 0x00, 0x00, 0x00, // 0: "a" -> 0 + // pack checksum to copy into at byte 16 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // checksum + 0x48, 0x04, 0x29, 0x69, 0x2f, (byte) 0xf3, (byte) 0x80, + (byte) 0xa1, (byte) 0xf5, (byte) 0x92, (byte) 0xc2, 0x21, 0x46, + (byte) 0xd5, 0x08, 0x44, (byte) 0xa4, (byte) 0xf4, (byte) 0xc0, + (byte) 0xec, }; + System.arraycopy(PACK_CHECKSUM, 0, expected, 16, PACK_CHECKSUM.length); + assertArrayEquals(expected, out.toByteArray()); + } + + @Test + public void write_multipleObjects() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + PackReverseIndexWriter writer = PackReverseIndexWriter.createWriter(out, + 1); + PackedObjectInfo a = objectInfo("a", OBJ_BLOB, 20); + PackedObjectInfo b = objectInfo("b", OBJ_COMMIT, 0); + PackedObjectInfo c = objectInfo("c", OBJ_COMMIT, 52); + PackedObjectInfo d = objectInfo("d", OBJ_TREE, 7); + PackedObjectInfo e = objectInfo("e", OBJ_COMMIT, 38); + List<PackedObjectInfo> objectsSortedByName = List.of(a, b, c, d, e); + + writer.write(objectsSortedByName, PACK_CHECKSUM); + + byte[] expected = new byte[] { 'R', 'I', 'D', 'X', // magic + 0x00, 0x00, 0x00, 0x01, // file version + 0x00, 0x00, 0x00, 0x01, // oid version + 0x00, 0x00, 0x00, 0x01, // offset 0: "b" -> index @ 1 + 0x00, 0x00, 0x00, 0x03, // offset 7: "d" -> index @ 3 + 0x00, 0x00, 0x00, 0x00, // offset 20: "a" -> index @ 0 + 0x00, 0x00, 0x00, 0x04, // offset 38: "e" -> index @ 4 + 0x00, 0x00, 0x00, 0x02, // offset 52: "c" -> index @ 2 + // pack checksum to copy into at byte 32 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // checksum + (byte) 0xe3, 0x1c, (byte) 0xd3, (byte) 0xeb, (byte) 0x83, 0x47, + (byte) 0x80, (byte) 0xb1, (byte) 0xe0, 0x3c, 0x2b, 0x25, + (byte) 0xd6, 0x3e, (byte) 0xdc, (byte) 0xde, (byte) 0xbe, 0x4b, + 0x0a, (byte) 0xe2, }; + System.arraycopy(PACK_CHECKSUM, 0, expected, 32, PACK_CHECKSUM.length); + assertArrayEquals(expected, out.toByteArray()); + } + + private static PackedObjectInfo objectInfo(String objectId, int type, + long offset) { + assert (objectId.length() == 1); + PackedObjectInfo objectInfo = new PackedObjectInfo( + ObjectId.fromString(objectId.repeat(OBJECT_ID_STRING_LENGTH))); + objectInfo.setType(type); + objectInfo.setOffset(offset); + return objectInfo; + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java index 2a403c7699..24a81b6715 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java @@ -542,6 +542,39 @@ public class PackWriterTest extends SampleDataRepositoryTestCase { } @Test + public void testWriteReverseIndexConfig() { + assertFalse(config.isWriteReverseIndex()); + config.setWriteReverseIndex(true); + assertTrue(config.isWriteReverseIndex()); + } + + @Test + public void testWriteReverseIndexOff() throws Exception { + config.setWriteReverseIndex(false); + writer = new PackWriter(config, db.newObjectReader()); + ByteArrayOutputStream reverseIndexOutput = new ByteArrayOutputStream(); + + writer.writeReverseIndex(reverseIndexOutput); + + assertEquals(0, reverseIndexOutput.size()); + } + + @Test + public void testWriteReverseIndexOn() throws Exception { + config.setWriteReverseIndex(true); + writeVerifyPack4(false); + ByteArrayOutputStream reverseIndexOutput = new ByteArrayOutputStream(); + int headerBytes = 12; + int bodyBytes = 12; + int footerBytes = 40; + + writer.writeReverseIndex(reverseIndexOutput); + + assertTrue(reverseIndexOutput.size() == headerBytes + bodyBytes + + footerBytes); + } + + @Test public void testExclude() throws Exception { // TestRepository closes repo FileRepository repo = createBareRepository(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java index 4b80f18970..619e585a90 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java @@ -58,13 +58,13 @@ import org.junit.Test; public class RefDirectoryTest extends LocalDiskRepositoryTestCase { private Repository diskRepo; - private TestRepository<Repository> repo; + TestRepository<Repository> repo; - private RefDirectory refdir; + RefDirectory refdir; - private RevCommit A; + RevCommit A; - private RevCommit B; + RevCommit B; private RevTag v1_0; @@ -555,10 +555,6 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase { @Test public void testGetRefs_LooseSorting_Bug_348834() throws IOException { Map<String, Ref> refs; - - writeLooseRef("refs/heads/my/a+b", A); - writeLooseRef("refs/heads/my/a/b/c", B); - final int[] count = new int[1]; ListenerHandle listener = Repository.getGlobalListenerList() @@ -566,14 +562,27 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase { count[0]++; }); + // RefsChangedEvent on the first attempt to read a ref is not expected + // to be triggered (See Iea3a5035b0a1410b80b09cf53387b22b78b18018), so + // create an update and fire pending events to ensure subsequent events + // are fired. + writeLooseRef("refs/heads/test", A); refs = refdir.getRefs(RefDatabase.ALL); + count[0] = 0; + int origSize = refs.size(); + + writeLooseRef("refs/heads/my/a+b", A); + writeLooseRef("refs/heads/my/a/b/c", B); + refs = refdir.getRefs(RefDatabase.ALL); - listener.remove(); - assertEquals(1, count[0]); // Bug 348834 multiple RefsChangedEvents - assertEquals(2, refs.size()); + assertEquals(1, count[0]); + assertEquals(2, refs.size() - origSize); assertEquals(A, refs.get("refs/heads/my/a+b").getObjectId()); assertEquals(B, refs.get("refs/heads/my/a/b/c").getObjectId()); + refs = refdir.getRefs(RefDatabase.ALL); + assertEquals(1, count[0]); // Bug 348834 multiple RefsChangedEvents + listener.remove(); } @Test @@ -1340,25 +1349,25 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase { assertEquals(Storage.LOOSE, ref.getStorage()); } - private void writeLooseRef(String name, AnyObjectId id) throws IOException { - writeLooseRef(name, id.name() + "\n"); - } - - private void writeLooseRef(String name, String content) throws IOException { - write(new File(diskRepo.getDirectory(), name), content); - } - - private void writePackedRef(String name, AnyObjectId id) throws IOException { + void writePackedRef(String name, AnyObjectId id) throws IOException { writePackedRefs(id.name() + " " + name + "\n"); } - private void writePackedRefs(String content) throws IOException { + void writePackedRefs(String content) throws IOException { File pr = new File(diskRepo.getDirectory(), "packed-refs"); write(pr, content); FS fs = diskRepo.getFS(); fs.setLastModified(pr.toPath(), Instant.now().minusSeconds(3600)); } + private void writeLooseRef(String name, AnyObjectId id) throws IOException { + writeLooseRef(name, id.name() + "\n"); + } + + private void writeLooseRef(String name, String content) throws IOException { + write(new File(diskRepo.getDirectory(), name), content); + } + private void deleteLooseRef(String name) { File path = new File(diskRepo.getDirectory(), name); assertTrue("deleted " + name, path.delete()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java new file mode 100644 index 0000000000..c3dafe4aa2 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. + * 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 v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.internal.storage.file; + +import org.eclipse.jgit.lib.NullProgressMonitor; +import org.eclipse.jgit.transport.ReceiveCommand; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; + +import static org.junit.Assert.assertEquals; + +public class SnapshottingRefDirectoryTest extends RefDirectoryTest { + private RefDirectory originalRefDirectory; + + /** {@inheritDoc} */ + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + originalRefDirectory = refdir; + refdir = refdir.createSnapshottingRefDirectory(); + } + + @Test + public void testSnapshot_CannotSeeExternalPackedRefsUpdates() + throws IOException { + String refName = "refs/heads/new"; + + writePackedRef(refName, A); + assertEquals(A, originalRefDirectory.exactRef(refName).getObjectId()); + assertEquals(A, refdir.exactRef(refName).getObjectId()); + + writePackedRef(refName, B); + assertEquals(B, originalRefDirectory.exactRef(refName).getObjectId()); + assertEquals(A, refdir.exactRef(refName).getObjectId()); + } + + @Test + public void testSnapshot_WriteThrough() throws IOException { + String refName = "refs/heads/new"; + + writePackedRef(refName, A); + assertEquals(A, originalRefDirectory.exactRef(refName).getObjectId()); + assertEquals(A, refdir.exactRef(refName).getObjectId()); + + PackedBatchRefUpdate update = refdir.newBatchUpdate(); + update.addCommand(new ReceiveCommand(A, B, refName)); + update.execute(repo.getRevWalk(), NullProgressMonitor.INSTANCE); + + assertEquals(B, originalRefDirectory.exactRef(refName).getObjectId()); + assertEquals(B, refdir.exactRef(refName).getObjectId()); + } + + @Test + public void testSnapshot_IncludeExternalPackedRefsUpdatesWithWrites() + throws IOException { + String refA = "refs/heads/refA"; + String refB = "refs/heads/refB"; + writePackedRefs("" + // + A.name() + " " + refA + "\n" + // + A.name() + " " + refB + "\n"); + assertEquals(A, refdir.exactRef(refA).getObjectId()); + assertEquals(A, refdir.exactRef(refB).getObjectId()); + + writePackedRefs("" + // + B.name() + " " + refA + "\n" + // + A.name() + " " + refB + "\n"); + PackedBatchRefUpdate update = refdir.newBatchUpdate(); + update.addCommand(new ReceiveCommand(A, B, refB)); + update.execute(repo.getRevWalk(), NullProgressMonitor.INSTANCE); + + assertEquals(B, originalRefDirectory.exactRef(refA).getObjectId()); + assertEquals(B, refdir.exactRef(refA).getObjectId()); + assertEquals(B, originalRefDirectory.exactRef(refB).getObjectId()); + assertEquals(B, refdir.exactRef(refB).getObjectId()); + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java index 893fd61556..92d47c2966 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java @@ -24,10 +24,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; + import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.errors.PatchApplyException; -import org.eclipse.jgit.api.errors.PatchFormatException; import org.eclipse.jgit.attributes.FilterCommand; import org.eclipse.jgit.attributes.FilterCommandFactory; import org.eclipse.jgit.attributes.FilterCommandRegistry; @@ -95,12 +94,16 @@ public class PatchApplierTest { } protected void initPreImage(String aName) throws Exception { - File f = new File(db.getWorkTree(), aName); preImage = IO .readWholeStream(getTestResource(aName + "_PreImage"), 0) .array(); + addFile(aName, preImage); + } + + protected void addFile(String aName, byte[] b) throws Exception { + File f = new File(db.getWorkTree(), aName); + Files.write(f.toPath(), b); try (Git git = new Git(db)) { - Files.write(f.toPath(), preImage); git.add().addFilepattern(aName).call(); } } @@ -112,15 +115,17 @@ public class PatchApplierTest { return new String(postImage, StandardCharsets.UTF_8); } - protected Result applyPatch() - throws PatchApplyException, PatchFormatException, IOException { - InputStream patchStream = getTestResource(name + ".patch"); - if (inCore) { - try (ObjectInserter oi = db.newObjectInserter()) { - return new PatchApplier(db, baseTip, oi).applyPatch(patchStream); + protected Result applyPatch() throws IOException { + try (InputStream patchStream = getTestResource(name + ".patch")) { + Patch patch = new Patch(); + patch.parse(patchStream); + if (inCore) { + try (ObjectInserter oi = db.newObjectInserter()) { + return new PatchApplier(db, baseTip, oi).applyPatch(patch); + } } + return new PatchApplier(db).applyPatch(patch); } - return new PatchApplier(db).applyPatch(patchStream); } protected static InputStream getTestResource(String patchFile) { @@ -159,6 +164,7 @@ public class PatchApplierTest { void verifyChange(Result result, String aName, boolean exists) throws Exception { + assertEquals(0, result.getErrors().size()); assertEquals(1, result.getPaths().size()); verifyContent(result, aName, exists); } @@ -181,6 +187,7 @@ public class PatchApplierTest { protected void checkBinary(Result result, int numberOfFiles) throws Exception { + assertEquals(0, result.getErrors().size()); assertEquals(numberOfFiles, result.getPaths().size()); if (inCore) { assertArrayEquals(postImage, @@ -371,6 +378,68 @@ public class PatchApplierTest { } @Test + public void testAddAlreadyExistingFile() throws Exception { + addFile("M1", "existing content".getBytes(StandardCharsets.UTF_8)); + init("M1", false, false); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test + public void testDeleteNonexistentFile() throws Exception { + init("NonASCIIDel", false, false); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test + public void testModifyNonexistentFile() throws Exception { + init("ShiftDown", false, true); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test + public void testRenameNonexistentFile() throws Exception { + init("RenameNoHunks", false, true); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test + public void testCopyNonexistentFile() throws Exception { + init("CopyWithHunks", false, true); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test + public void testCopyOnTopAlreadyExistingFile() throws Exception { + addFile("CopyResult", "existing content".getBytes(StandardCharsets.UTF_8)); + init("CopyWithHunks", true, false); + + Result result = applyPatch(); + + assertEquals(1, result.getErrors().size()); + assertEquals(0, result.getPaths().size()); + } + + @Test public void testDoesNotAffectUnrelatedFiles() throws Exception { initPreImage("Unaffected"); String expectedUnaffectedText = initPostImage("Unaffected"); @@ -380,6 +449,14 @@ public class PatchApplierTest { verifyChange(result, "X"); verifyContent(result, "Unaffected", expectedUnaffectedText); } + + @Test + public void testConflictFails() throws Exception { + init("conflict"); + + Result result = applyPatch(); + assertEquals(1, result.getErrors().size()); + } } public static class InCore extends Base { @@ -726,14 +803,6 @@ public class PatchApplierTest { } @Test - public void testEditExample() throws Exception { - init("z_e", true, true); - - Result result = applyPatch(); - verifyChange(result, "z_e"); - } - - @Test public void testEditNoNewline() throws Exception { init("z_e_no_nl", true, true); @@ -824,5 +893,30 @@ public class PatchApplierTest { FilterCommandRegistry.unregister("jgit://builtin/a2e/smudge"); } } + + private void dotGitTest(String fileName) throws Exception { + init(fileName, false, false); + Result result = null; + IOException ex = null; + try { + result = applyPatch(); + } catch (IOException e) { + ex = e; + } + assertTrue(ex != null + || (result != null && !result.getErrors().isEmpty())); + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + } + + @Test + public void testDotGit() throws Exception { + dotGitTest("dotgit"); + } + + @Test + public void testDotGit2() throws Exception { + dotGitTest("dotgit2"); + } } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/DateRevPriorityQueueTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/DateRevPriorityQueueTest.java new file mode 100644 index 0000000000..369e2fae72 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/DateRevPriorityQueueTest.java @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2023, GerritForge Inc. and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.revwalk; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; + +import org.junit.Test; + +public class DateRevPriorityQueueTest extends RevQueueTestCase<DateRevPriorityQueue> { + @Override + protected DateRevPriorityQueue create() { + return new DateRevPriorityQueue(); + } + + @Override + @Test + public void testEmpty() throws Exception { + super.testEmpty(); + assertNull(q.peek()); + assertEquals(Generator.SORT_COMMIT_TIME_DESC, q.outputType()); + } + + @Test + public void testCloneEmpty() throws Exception { + q = new DateRevPriorityQueue(AbstractRevQueue.EMPTY_QUEUE); + assertNull(q.next()); + } + + @Test + public void testInsertOutOfOrder() throws Exception { + final RevCommit a = parseBody(commit()); + final RevCommit b = parseBody(commit(10, a)); + final RevCommit c1 = parseBody(commit(5, b)); + final RevCommit c2 = parseBody(commit(-50, b)); + + q.add(c2); + q.add(a); + q.add(b); + q.add(c1); + + assertCommit(c1, q.next()); + assertCommit(b, q.next()); + assertCommit(a, q.next()); + assertCommit(c2, q.next()); + assertNull(q.next()); + } + + @Test + public void testInsertTie() throws Exception { + final RevCommit a = parseBody(commit()); + final RevCommit b = parseBody(commit(0, a)); + final RevCommit c = parseBody(commit(0, b)); + + { + q = create(); + q.add(a); + q.add(b); + q.add(c); + + assertCommit(a, q.next()); + assertCommit(b, q.next()); + assertCommit(c, q.next()); + assertNull(q.next()); + } + { + q = create(); + q.add(c); + q.add(b); + q.add(a); + + assertCommit(c, q.next()); + assertCommit(b, q.next()); + assertCommit(a, q.next()); + assertNull(q.next()); + } + } + + @Test + public void testCloneFIFO() throws Exception { + final RevCommit a = parseBody(commit()); + final RevCommit b = parseBody(commit(200, a)); + final RevCommit c = parseBody(commit(200, b)); + + final FIFORevQueue src = new FIFORevQueue(); + src.add(a); + src.add(b); + src.add(c); + + q = new DateRevPriorityQueue(src); + assertFalse(q.everbodyHasFlag(RevWalk.UNINTERESTING)); + assertFalse(q.anybodyHasFlag(RevWalk.UNINTERESTING)); + assertCommit(c, q.peek()); + assertCommit(c, q.peek()); + + assertCommit(c, q.next()); + assertCommit(b, q.next()); + assertCommit(a, q.next()); + assertNull(q.next()); + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCarryFlagsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCarryFlagsTest.java index 8c25e05986..529d5a9f09 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCarryFlagsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCarryFlagsTest.java @@ -39,7 +39,7 @@ public class RevWalkCarryFlagsTest extends RevWalkTestCase { /** * Similar to {@link #testRevWalkCarryUninteresting_fastClock()} but the * last merge commit is created so fast that he has the same creationdate as - * the previous commit. This will cause the underlying {@link DateRevQueue} + * the previous commit. This will cause the underlying {@link AbstractRevQueue} * is not able to sort the commits in a way matching the topology. A parent * (one of the commits which are merged) is handled before the child (the * merge commit). This makes carrying over flags more complicated diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCommitGraphTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCommitGraphTest.java index 97d3f81b9b..3cc0368943 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCommitGraphTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCommitGraphTest.java @@ -10,6 +10,7 @@ package org.eclipse.jgit.revwalk; +import static java.util.Arrays.asList; import static org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.EMPTY; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -18,12 +19,15 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.io.IOException; import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.List; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.internal.storage.file.GC; +import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Ref; @@ -254,6 +258,95 @@ public class RevWalkCommitGraphTest extends RevWalkTestCase { testRevWalkBehavior("commits/8", "merge/2"); } + @Test + public void testMergedInto() throws Exception { + RevCommit c1 = commit(); + Ref branch1 = branch(c1, "commits/1"); + RevCommit c2 = commit(c1); + Ref branch2 = branch(c2, "commits/2"); + RevCommit c3 = commit(c2); + Ref branch3 = branch(c3, "commits/3"); + RevCommit c4 = commit(c1); + Ref branch4 = branch(c4, "commits/4"); + RevCommit c5 = commit(c4); + Ref branch5 = branch(c5, "commits/5"); + enableAndWriteCommitGraph(); + RevCommit c6 = commit(c1); + Ref branch6 = branch(c6, "commits/6"); + RevCommit c7 = commit(c2, c4); + Ref branch7 = branch(c7, "commits/7"); + RevCommit c8 = commit(c5); + Ref branch8 = branch(c8, "commits/8"); + RevCommit c9 = commit(c4, c6); + Ref branch9 = branch(c9, "commits/9"); + + /* + * <pre> + * current graph structure: + * 8 + * | + * 3 7 5 9 + * |/ \|/ \ + * 2 4 6 + * |___/____/ + * 1 + * </pre> + * + * [6, 7, 8, 9] are not in commit-graph. + */ + + reinitializeRevWalk(); + assertFalse(isObjectIdInGraph(c9)); + assertRefsEquals(asList(branch9), allMergedInto(c9)); + + assertFalse(isObjectIdInGraph(c8)); + assertRefsEquals(asList(branch8), allMergedInto(c8)); + + assertFalse(isObjectIdInGraph(c7)); + assertRefsEquals(asList(branch7), allMergedInto(c7)); + + assertFalse(isObjectIdInGraph(c6)); + assertRefsEquals(asList(branch6, branch9), allMergedInto(c6)); + + assertTrue(isObjectIdInGraph(c5)); + assertRefsEquals(asList(branch5, branch8), allMergedInto(c5)); + + assertTrue(isObjectIdInGraph(c4)); + assertRefsEquals(asList(branch4, branch5, branch7, branch8, branch9), + allMergedInto(c4)); + + assertTrue(isObjectIdInGraph(c3)); + assertRefsEquals(asList(branch3), allMergedInto(c3)); + + assertTrue(isObjectIdInGraph(c2)); + assertRefsEquals(asList(branch2, branch3, branch7), allMergedInto(c2)); + + assertTrue(isObjectIdInGraph(c1)); + assertRefsEquals(asList(branch1, branch2, branch3, branch4, branch5, + branch6, branch7, branch8, branch9), allMergedInto(c1)); + } + + boolean isObjectIdInGraph(AnyObjectId id) { + return rw.commitGraph().findGraphPosition(id) >= 0; + } + + List<Ref> allMergedInto(RevCommit needle) throws IOException { + List<Ref> refs = db.getRefDatabase().getRefs(); + return rw.getMergedInto(rw.lookupCommit(needle), refs); + } + + void assertRefsEquals(List<Ref> expecteds, List<Ref> actuals) { + assertEquals(expecteds.size(), actuals.size()); + Collections.sort(expecteds, Comparator.comparing(Ref::getName)); + Collections.sort(actuals, Comparator.comparing(Ref::getName)); + for (int i = 0; i < expecteds.size(); i++) { + Ref expected = expecteds.get(i); + Ref actual = actuals.get(i); + assertEquals(expected.getName(), actual.getName()); + assertEquals(expected.getObjectId(), actual.getObjectId()); + } + } + void testRevWalkBehavior(String branch, String compare) throws Exception { assertCommits( travel(TreeFilter.ALL, RevFilter.MERGE_BASE, RevSort.NONE, true, diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java new file mode 100644 index 0000000000..04e372998c --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RewriteGeneratorTest.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2023, HIS eG + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.revwalk; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import org.junit.Test; + +public class RewriteGeneratorTest extends RevWalkTestCase { + + @Test + public void testRewriteGeneratorDoesNotExhaustPreviousGenerator() + throws Exception { + RevCommit a = commit(); + a.flags |= RevWalk.TREE_REV_FILTER_APPLIED; + RevCommit b = commit(a); + + LIFORevQueue q = new LIFORevQueue(); + q.add(a); + q.add(b); + + /* + * Since the TREE_REV_FILTER has been applied to commit a and the + * REWRITE flag has not been applied to commit a, the RewriteGenerator + * must not rewrite the parent of b and thus must not call the previous + * generator (since b already has its correct parent). + */ + RewriteGenerator rewriteGenerator = new RewriteGenerator(q); + rewriteGenerator.next(); + + assertNotNull( + "Previous generator was unnecessarily exhausted by RewriteGenerator", + q.next()); + } + + @Test + public void testRewriteGeneratorRewritesParent() throws Exception { + RevCommit a = commit(); + a.flags |= RevWalk.TREE_REV_FILTER_APPLIED; + a.flags |= RevWalk.REWRITE; + RevCommit b = commit(a); + assertEquals(1, b.getParentCount()); + + LIFORevQueue q = new LIFORevQueue(); + /* + * We are only adding commit b (and not a), because PendingGenerator + * should never emit a commit that has the REWRITE flag set. + */ + q.add(b); + + RewriteGenerator rewriteGenerator = new RewriteGenerator(q); + RevCommit returnedB = rewriteGenerator.next(); + assertEquals(b.getId(), returnedB.getId()); + assertEquals(0, returnedB.getParentCount()); + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/DirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/DirectoryTest.java new file mode 100644 index 0000000000..490c45b558 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/DirectoryTest.java @@ -0,0 +1,259 @@ +/* + * Copyright (C) 2023 Thomas Wolf <twolf@apache.org> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.symlinks; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; + +import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.api.ResetCommand.ResetType; +import org.eclipse.jgit.junit.RepositoryTestCase; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.lib.ConfigConstants; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.StoredConfig; +import org.eclipse.jgit.patch.Patch; +import org.eclipse.jgit.patch.PatchApplier; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.util.FS; +import org.eclipse.jgit.util.FileUtils; +import org.junit.Assume; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +@RunWith(Parameterized.class) +public class DirectoryTest extends RepositoryTestCase { + + @BeforeClass + public static void checkPrecondition() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); + Path tempDir = Files.createTempDirectory("jgit"); + try { + Path a = tempDir.resolve("a"); + Files.writeString(a, "test"); + Path b = tempDir.resolve("A"); + Assume.assumeTrue(Files.exists(b)); + } finally { + FileUtils.delete(tempDir.toFile(), + FileUtils.RECURSIVE | FileUtils.IGNORE_ERRORS); + } + } + + @Parameters(name = "core.symlinks={0}") + public static Boolean[] parameters() { + return new Boolean[] { Boolean.TRUE, Boolean.FALSE }; + } + + @Parameter(0) + public boolean useSymlinks; + + private void checkFiles() throws Exception { + File a = new File(trash, "a"); + assertTrue("a should be a directory", + Files.isDirectory(a.toPath(), LinkOption.NOFOLLOW_LINKS)); + File b = new File(a, "b"); + assertTrue("a/b should exist", b.isFile()); + File x = new File(trash, "x"); + assertTrue("x should be a directory", + Files.isDirectory(x.toPath(), LinkOption.NOFOLLOW_LINKS)); + File y = new File(x, "y"); + assertTrue("x/y should exist", y.isFile()); + } + + @Test + public void testCheckout() throws Exception { + StoredConfig config = db.getConfig(); + config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_SYMLINKS, useSymlinks); + config.save(); + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + // Create links directly in the git repo, then use a hard reset + // to get them into the workspace. + RevCommit base = repo.commit( + repo.tree( + repo.link("A", repo.blob(".git")), + repo.file("a/b", repo.blob("test")), + repo.file("x/y", repo.blob("test2")))); + try (Git git = new Git(db)) { + git.reset().setMode(ResetType.HARD).setRef(base.name()).call(); + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + checkFiles(); + } + } + } + + @Test + public void testCheckout2() throws Exception { + StoredConfig config = db.getConfig(); + config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_SYMLINKS, useSymlinks); + config.save(); + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + RevCommit base = repo.commit( + repo.tree( + repo.link("A/B", repo.blob("../.git")), + repo.file("a/b/a/b", repo.blob("test")), + repo.file("x/y", repo.blob("test2")))); + try (Git git = new Git(db)) { + boolean testFiles = true; + try { + git.reset().setMode(ResetType.HARD).setRef(base.name()) + .call(); + } catch (Exception e) { + if (!useSymlinks) { + // There is a file in the middle of the path where we'd + // expect a directory. This case is not handled + // anywhere. What would be a better reply than an IOE? + testFiles = false; + } else { + throw e; + } + } + File a = new File(new File(trash, ".git"), "a"); + assertFalse(".git/a should not exist", a.exists()); + if (testFiles) { + a = new File(trash, "a"); + assertTrue("a should be a directory", Files.isDirectory( + a.toPath(), LinkOption.NOFOLLOW_LINKS)); + File b = new File(a, "b"); + assertTrue("a/b should be a directory", Files.isDirectory( + a.toPath(), LinkOption.NOFOLLOW_LINKS)); + a = new File(b, "a"); + assertTrue("a/b/a should be a directory", Files.isDirectory( + a.toPath(), LinkOption.NOFOLLOW_LINKS)); + b = new File(a, "b"); + assertTrue("a/b/a/b should exist", b.isFile()); + File x = new File(trash, "x"); + assertTrue("x should be a directory", Files.isDirectory( + x.toPath(), LinkOption.NOFOLLOW_LINKS)); + File y = new File(x, "y"); + assertTrue("x/y should exist", y.isFile()); + } + } + } + } + + @Test + public void testMerge() throws Exception { + StoredConfig config = db.getConfig(); + config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_SYMLINKS, useSymlinks); + config.save(); + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + RevCommit base = repo.commit( + repo.tree(repo.file("q", repo.blob("test")))); + RevCommit side = repo.commit( + repo.tree( + repo.link("A", repo.blob(".git")), + repo.file("a/b", repo.blob("test")), + repo.file("x/y", repo.blob("test2")))); + try (Git git = new Git(db)) { + git.reset().setMode(ResetType.HARD).setRef(base.name()).call(); + git.merge().include(side) + .setMessage("merged").call(); + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + checkFiles(); + } + } + } + + @Test + public void testMerge2() throws Exception { + StoredConfig config = db.getConfig(); + config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_SYMLINKS, useSymlinks); + config.save(); + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + RevCommit base = repo.commit( + repo.tree( + repo.file("q", repo.blob("test")), + repo.link("A", repo.blob(".git")))); + RevCommit side = repo.commit( + repo.tree( + repo.file("a/b", repo.blob("test")), + repo.file("x/y", repo.blob("test2")))); + try (Git git = new Git(db)) { + git.reset().setMode(ResetType.HARD).setRef(base.name()).call(); + git.merge().include(side) + .setMessage("merged").call(); + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + checkFiles(); + } + } + } + + @Test + public void testApply() throws Exception { + StoredConfig config = db.getConfig(); + config.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_SYMLINKS, useSymlinks); + config.save(); + // PatchApplier doesn't do symlinks yet. + try (TestRepository<Repository> repo = new TestRepository<>(db)) { + db.incrementOpen(); + RevCommit base = repo.commit( + repo.tree( + repo.file("x", repo.blob("test")), + repo.link("A", repo.blob(".git")))); + try (Git git = new Git(db)) { + git.reset().setMode(ResetType.HARD).setRef(base.name()).call(); + Patch patch = new Patch(); + try (InputStream patchStream = this.getClass() + .getResourceAsStream("dirtest.patch")) { + patch.parse(patchStream); + } + boolean testFiles = true; + try { + PatchApplier.Result result = new PatchApplier(db) + .applyPatch(patch); + assertNotNull(result); + } catch (IOException e) { + if (!useSymlinks) { + // There is a file there, so the patch won't apply. + // Unclear whether an IOE is the correct response, + // though. Probably some negative PatchApplier.Result is + // more appropriate. + testFiles = false; + } else { + throw e; + } + } + File b = new File(new File(trash, ".git"), "b"); + assertFalse(".git/b should not exist", b.exists()); + if (testFiles) { + File a = new File(trash, "a"); + assertTrue("a should be a directory", + Files.isDirectory(a.toPath(), LinkOption.NOFOLLOW_LINKS)); + b = new File(a, "b"); + assertTrue("a/b should exist", b.isFile()); + } + } + } + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java new file mode 100644 index 0000000000..417ce61df2 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java @@ -0,0 +1,146 @@ +/* + * Copyright (C) 2023, Dariusz Luksza <dariusz.luksza@gmail.com> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport; + +import static org.junit.Assert.fail; +import static org.eclipse.jgit.lib.Constants.HEAD; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription; +import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; +import org.eclipse.jgit.internal.storage.file.FileRepository; +import org.eclipse.jgit.internal.storage.file.GC; +import org.eclipse.jgit.internal.storage.file.Pack; +import org.eclipse.jgit.internal.storage.pack.PackExt; +import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.junit.TestRepository.CommitBuilder; +import org.eclipse.jgit.lib.NullProgressMonitor; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.transport.UploadPack.RequestPolicy; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +@RunWith(Parameterized.class) +public class UploadPackHandleDeletedPackFileTest + extends LocalDiskRepositoryTestCase { + + private FileRepository server; + + private TestRepository<FileRepository> remote; + + private Repository client; + + private RevCommit head; + + @Parameter + public boolean emptyCommit; + + @Parameters(name="empty commit: {0}") + public static Collection<Boolean[]> initTestData() { + return Arrays.asList( + new Boolean[][] { { Boolean.TRUE }, { Boolean.FALSE } }); + } + + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + server = createBareRepository(); + server.getConfig().setString("protocol", null, "version", "2"); + + remote = new TestRepository<>(server); + client = new InMemoryRepository(new DfsRepositoryDescription("client")); + + setupServerRepo(); + head = server.parseCommit(server.resolve(HEAD)); + } + + @Test + public void testV2PackFileRemovedDuringUploadPack() throws Exception { + doRemovePackFileDuringUploadPack(PackExt.PACK); + } + + @Test + public void testV2IdxFileRemovedDuringUploadPack() throws Exception { + doRemovePackFileDuringUploadPack(PackExt.INDEX); + } + + @Test + public void testV2BitmapFileRemovedDuringUploadPack() throws Exception { + doRemovePackFileDuringUploadPack(PackExt.BITMAP_INDEX); + } + + private void doRemovePackFileDuringUploadPack(PackExt packExt) + throws Exception { + Object ctx = new Object(); + TestProtocol testProtocol = new TestProtocol<>( + (Object req, Repository db) -> { + UploadPack up = new UploadPack(db); + up.setRequestPolicy(RequestPolicy.REACHABLE_COMMIT); + Collection<Pack> packs = server.getObjectDatabase() + .getPacks(); + assertEquals("single pack expected", 1, packs.size()); + Pack pack = packs.iterator().next(); + + try { + addNewCommit(); + + new GC(remote.getRepository()).gc(); + + pack.getPackFile().create(packExt).delete(); + } catch (Exception e) { + fail("GC or pack file removal failed"); + } + + return up; + }, null); + + URIish uri = testProtocol.register(ctx, server); + + try (Transport tn = testProtocol.open(uri, client, "server")) { + tn.fetch(NullProgressMonitor.INSTANCE, + Collections.singletonList(new RefSpec(head.name()))); + assertTrue(client.getObjectDatabase().has(head)); + } + } + + private void addNewCommit() throws Exception { + CommitBuilder commit = remote.commit().message("2"); + if (!emptyCommit) { + commit = commit.add("test2.txt", remote.blob("2")); + } + remote.update("master", commit.parent(head).create()); + } + + private void setupServerRepo() throws Exception { + RevCommit commit0 = remote.commit().message("0") + .add("test.txt", remote.blob("0")) + .create(); + remote.update("master", commit0); + + new GC(remote.getRepository()).gc(); // create pack files + + head = remote.commit().message("1").parent(commit0) + .add("test1.txt", remote.blob("1")) + .create(); + remote.update("master", head); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java index 61458dddfb..9755ed1b69 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java @@ -22,9 +22,12 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Set; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import org.eclipse.jgit.dircache.DirCache; @@ -53,6 +56,7 @@ import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevTag; import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.storage.pack.PackStatistics; +import org.eclipse.jgit.transport.BasePackFetchConnection.FetchConfig; import org.eclipse.jgit.transport.UploadPack.RequestPolicy; import org.eclipse.jgit.util.io.NullOutputStream; import org.junit.After; @@ -63,6 +67,8 @@ import org.junit.Test; * Tests for server upload-pack utilities. */ public class UploadPackTest { + private static final int MAX_HAVES = 64; + private URIish uri; private TestProtocol<Object> testProtocol; @@ -87,6 +93,7 @@ public class UploadPackTest { @After public void tearDown() { + TestProtocol.setFetchConfig(null); Transport.unregister(testProtocol); } @@ -2158,6 +2165,231 @@ public class UploadPackTest { assertFalse(client.getObjectDatabase().has(three.toObjectId())); } + /** + * <pre> + * remote: + * foo <- foofoo <-- branchFoo + * bar <- barbar <-- branchBar + * + * client: + * foo <-- branchFoo + * bar <-- branchBar + * + * fetch(branchFoo) should send exactly 1 have (i.e. foo) from branchFoo + * </pre> + */ + @Test + public void testNegotiationTip() throws Exception { + RevCommit fooParent = remote.commit().message("foo").create(); + RevCommit fooChild = remote.commit().message("foofoo").parent(fooParent) + .create(); + RevCommit barParent = remote.commit().message("bar").create(); + RevCommit barChild = remote.commit().message("barbar").parent(barParent) + .create(); + + // Remote has branchFoo at fooChild and branchBar at barChild + remote.update("branchFoo", fooChild); + remote.update("branchBar", barChild); + + AtomicReference<UploadPack> uploadPack = new AtomicReference<>(); + CountHavesPreUploadHook countHavesHook = new CountHavesPreUploadHook(); + RevCommit localFooParent = null; + + // Client has lagging branchFoo at fooParent and branchBar at barParent + try (TestRepository<InMemoryRepository> clientRepo = new TestRepository<>( + client)) { + localFooParent = clientRepo.commit().message("foo") + .create(); + RevCommit localBarParent = clientRepo.commit().message("bar") + .create(); + + clientRepo.update("branchFoo", localFooParent); + clientRepo.update("branchBar", localBarParent); + + testProtocol = new TestProtocol<>((Object req, Repository db) -> { + UploadPack up = new UploadPack(db); + up.setPreUploadHook(countHavesHook); + uploadPack.set(up); + return up; + }, null); + + uri = testProtocol.register(ctx, server); + + TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES, true)); + try (Transport tn = testProtocol.open(uri, + clientRepo.getRepository(), "server")) { + + tn.fetch(NullProgressMonitor.INSTANCE, Collections + .singletonList(new RefSpec("refs/heads/branchFoo")), + "branchFoo"); + } + } + + assertTrue(client.getObjectDatabase().has(fooParent.toObjectId())); + assertTrue(client.getObjectDatabase().has(fooChild.toObjectId())); + assertFalse(client.getObjectDatabase().has(barChild.toObjectId())); + + assertEquals(1, uploadPack.get().getStatistics().getHaves()); + assertTrue(countHavesHook.havesSentDuringNegotiation + .contains(localFooParent.toObjectId())); + } + + /** + * Remote has 2 branches branchFoo and branchBar, each of them have 128 (2 x + * MAX_HAVES) commits each. Local has both the branches with lagging + * commits. Only 64 (1 x MAX_HAVES) from each branch and lagging 64. + * fetch(branchFoo) should send all 64 (MAX_HAVES) commits on branchFoo as + * haves and none from branchBar. + * + * Visual representation of the same: + * + * <pre> + * remote: + * parent + * / \ + * branchFoo-0 branchBar-0 + * branchFoo-1 branchBar-1 + * ... ... + * ... ... + * branchFoo-128 branchBar-128 + * ^-- branchFoo ^--branchBar + * + * local: + * parent + * / \ + * branchFoo-0 branchBar-0 + * branchFoo-1 branchBar-1 + * ... ... + * ... ... + * branchFoo-64 branchBar-64 + * ^-- branchFoo ^--branchBar + * + * fetch(branchFoo) should send all 64 (MAX_HAVES) commits on branchFoo as haves + * </pre> + */ + @Test + public void testNegotiationTipWithLongerHistoryThanMaxHaves() + throws Exception { + Set<RevCommit> remoteFooCommits = new HashSet<>(); + Set<RevCommit> remoteBarCommits = new HashSet<>(); + + RevCommit parent = remote.commit().message("branchFoo-0").create(); + RevCommit parentFoo = parent; + remoteFooCommits.add(parentFoo); + for (int i = 1; i < 2 * MAX_HAVES; i++) { + RevCommit child = remote.commit() + .message("branchFoo-" + Integer.toString(i)) + .parent(parentFoo) + .create(); + parentFoo = child; + remoteFooCommits.add(parentFoo); + + } + remote.update("branchFoo", parentFoo); + + RevCommit parentBar = parent; + remoteBarCommits.add(parentBar); + for (int i = 1; i < 2 * MAX_HAVES; i++) { + RevCommit child = remote.commit() + .message("branchBar-" + Integer.toString(i)) + .parent(parentBar) + .create(); + parentBar = child; + remoteBarCommits.add(parentBar); + } + remote.update("branchBar", parentBar); + + AtomicReference<UploadPack> uploadPack = new AtomicReference<>(); + CountHavesPreUploadHook countHavesHook = new CountHavesPreUploadHook(); + Set<ObjectId> localFooCommits = new HashSet<>(); + + try (TestRepository<InMemoryRepository> clientRepo = new TestRepository<>( + client)) { + RevCommit localParent = clientRepo.commit().message("branchBar-0") + .create(); + RevCommit localParentFoo = localParent; + localFooCommits.add(localParentFoo); + for (int i = 1; i < 1 * MAX_HAVES; i++) { + RevCommit child = clientRepo.commit() + .message("branchFoo-" + Integer.toString(i)) + .parent(localParentFoo).create(); + localParentFoo = child; + localFooCommits.add(localParentFoo); + } + clientRepo.update("branchFoo", localParentFoo); + + RevCommit localParentBar = localParent; + for (int i = 1; i < 1 * MAX_HAVES; i++) { + RevCommit child = clientRepo.commit() + .message("branchBar-" + Integer.toString(i)) + .parent(localParentBar).create(); + localParentBar = child; + } + clientRepo.update("branchBar", localParentBar); + + testProtocol = new TestProtocol<>((Object req, Repository db) -> { + UploadPack up = new UploadPack(db); + up.setPreUploadHook(countHavesHook); + uploadPack.set(up); + return up; + }, null); + + uri = testProtocol.register(ctx, server); + TestProtocol.setFetchConfig(new FetchConfig(true, MAX_HAVES, true)); + try (Transport tn = testProtocol.open(uri, + clientRepo.getRepository(), "server")) { + + tn.fetch(NullProgressMonitor.INSTANCE, Collections + .singletonList(new RefSpec("refs/heads/branchFoo")), + "branchFoo"); + } + } + + for (RevCommit c : remoteFooCommits) { + assertTrue(c.toObjectId() + "", + client.getObjectDatabase().has(c.toObjectId())); + } + remoteBarCommits.remove(parent); + for (RevCommit c : remoteBarCommits) { + assertFalse(client.getObjectDatabase().has(c.toObjectId())); + } + + assertEquals(MAX_HAVES, uploadPack.get().getStatistics().getHaves()); + // Verify that all the haves that were sent during negotiation are local + // commits from branchFoo + for (Object id : countHavesHook.havesSentDuringNegotiation) { + assertTrue(localFooCommits.contains(id)); + } + } + + private static class CountHavesPreUploadHook implements PreUploadHook { + Set<ObjectId> havesSentDuringNegotiation = new HashSet<>(); + + @Override + public void onSendPack(UploadPack unusedUploadPack, + Collection<? extends ObjectId> unusedWants, + Collection<? extends ObjectId> haves) + throws ServiceMayNotContinueException { + // record haves + havesSentDuringNegotiation.addAll(haves); + } + + @Override + public void onEndNegotiateRound(UploadPack unusedUploadPack, + Collection<? extends ObjectId> unusedWants, int unusedCntCommon, + int unusedCntNotFound, boolean unusedReady) + throws ServiceMayNotContinueException { + // Do nothing. + } + + @Override + public void onBeginNegotiateRound(UploadPack unusedUploadPack, + Collection<? extends ObjectId> unusedWants, + int unusedCntOffered) throws ServiceMayNotContinueException { + // Do nothing. + } + } + @Test public void testV2FetchBadWantRef() throws Exception { RevCommit one = remote.commit().message("1").create(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FilterCommandsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FilterCommandsTest.java index 89d31c3e8f..0513da2d15 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FilterCommandsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FilterCommandsTest.java @@ -100,8 +100,7 @@ public class FilterCommandsTest extends RepositoryTestCase { } @Test - public void testBuiltinCleanFilter() - throws IOException, GitAPIException { + public void testBuiltinCleanFilter() throws Exception { String builtinCommandName = "jgit://builtin/test/clean"; FilterCommandRegistry.register(builtinCommandName, new TestCommandFactory('c')); @@ -113,28 +112,40 @@ public class FilterCommandsTest extends RepositoryTestCase { git.add().addFilepattern(".gitattributes").call(); git.commit().setMessage("add filter").call(); - writeTrashFile("Test.txt", "Hello again"); + File testFile = writeTrashFile("Test.txt", "Hello again"); + // Wait a little bit to ensure that the call with setRenormalize(false) + // below doesn't consider the file "racily clean". + fsTick(testFile); git.add().addFilepattern("Test.txt").call(); assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=test][Test.txt, mode:100644, content:cHceclclcoc cacgcacicn]", + "[.gitattributes, mode:100644, content:*.txt filter=test]" + + "[Test.txt, mode:100644, content:cHceclclcoc cacgcacicn]", indexState(CONTENT)); writeTrashFile("Test.bin", "Hello again"); git.add().addFilepattern("Test.bin").call(); assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=test][Test.bin, mode:100644, content:Hello again][Test.txt, mode:100644, content:cHceclclcoc cacgcacicn]", + "[.gitattributes, mode:100644, content:*.txt filter=test]" + + "[Test.bin, mode:100644, content:Hello again]" + + "[Test.txt, mode:100644, content:cHceclclcoc cacgcacicn]", indexState(CONTENT)); config.setString("filter", "test", "clean", null); config.save(); - git.add().addFilepattern("Test.txt").call(); - assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=test][Test.bin, mode:100644, content:Hello again][Test.txt, mode:100644, content:Hello again]", + git.add().addFilepattern("Test.txt").setRenormalize(false).call(); + assertEquals("No index update expected with renormalize==false", + "[.gitattributes, mode:100644, content:*.txt filter=test]" + + "[Test.bin, mode:100644, content:Hello again]" + + "[Test.txt, mode:100644, content:cHceclclcoc cacgcacicn]", indexState(CONTENT)); - config.setString("filter", "test", "clean", null); - config.save(); + git.add().addFilepattern("Test.txt").call(); + assertEquals("Index update expected with renormalize==true", + "[.gitattributes, mode:100644, content:*.txt filter=test]" + + "[Test.bin, mode:100644, content:Hello again]" + + "[Test.txt, mode:100644, content:Hello again]", + indexState(CONTENT)); } @Test diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java index 6f4292c05e..2bb8596735 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java @@ -15,6 +15,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.eclipse.jgit.util.IntList.IntComparator; import org.junit.Test; public class IntListTest { @@ -43,6 +44,15 @@ public class IntListTest { } @Test + public void testFilledWithRange() { + IntList list = IntList.filledWithRange(-2, 13); + assertEquals(15, list.size()); + for (int i = 0; i < list.size(); i++) { + assertEquals(i - 2, list.get(i)); + } + } + + @Test public void testAdd_SmallGroup() { final IntList i = new IntList(); final int n = 5; @@ -164,6 +174,22 @@ public class IntListTest { } @Test + public void testSort_byAbs() { + IntList list = new IntList(); + list.add(-3); + list.add(-2); + list.add(0); + list.add(1); + list.add(4); + list.add(1); + list.sort(new AbsIntComparator()); + int[] expected = { 0, 1, 1, -2, -3, 4 }; + for (int i = 0; i < list.size(); i++) { + assertEquals(expected[i], list.get(i)); + } + } + + @Test public void testToString() { final IntList i = new IntList(); i.add(1); @@ -173,4 +199,13 @@ public class IntListTest { assertEquals("[1, 13, 5]", i.toString()); } + private static class AbsIntComparator implements IntComparator { + private AbsIntComparator() { + } + + @Override + public int compare(int a, int b) { + return Math.abs(a) - Math.abs(b); + } + } } diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index 2e61a7b49e..fd679f96da 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -4,14 +4,14 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ui Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: org.eclipse.jgit.awtui;version="6.5.1" -Import-Package: org.eclipse.jgit.errors;version="[6.5.1,6.6.0)", - org.eclipse.jgit.lib;version="[6.5.1,6.6.0)", - org.eclipse.jgit.nls;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revplot;version="[6.5.1,6.6.0)", - org.eclipse.jgit.revwalk;version="[6.5.1,6.6.0)", - org.eclipse.jgit.transport;version="[6.5.1,6.6.0)", - org.eclipse.jgit.util;version="[6.5.1,6.6.0)" +Export-Package: org.eclipse.jgit.awtui;version="6.6.2" +Import-Package: org.eclipse.jgit.errors;version="[6.6.2,6.7.0)", + org.eclipse.jgit.lib;version="[6.6.2,6.7.0)", + org.eclipse.jgit.nls;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revplot;version="[6.6.2,6.7.0)", + org.eclipse.jgit.revwalk;version="[6.6.2,6.7.0)", + org.eclipse.jgit.transport;version="[6.6.2,6.7.0)", + org.eclipse.jgit.util;version="[6.6.2,6.7.0)" diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF index edbf1f387a..be9bb5d89f 100644 --- a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ui - Sources Bundle-SymbolicName: org.eclipse.jgit.ui.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 625b7578a3..cdb6f84f33 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ui</artifactId> diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters new file mode 100644 index 0000000000..a6aff1bf85 --- /dev/null +++ b/org.eclipse.jgit/.settings/.api_filters @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<component id="org.eclipse.jgit" version="2"> + <resource path="src/org/eclipse/jgit/api/GarbageCollectCommand.java" type="org.eclipse.jgit.api.GarbageCollectCommand"> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="setPackKeptObjects(boolean)"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/dircache/Checkout.java" type="org.eclipse.jgit.dircache.Checkout"> + <filter id="1109393411"> + <message_arguments> + <message_argument value="6.6.1"/> + <message_argument value="org.eclipse.jgit.dircache.Checkout"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/errors/PackMismatchException.java" type="org.eclipse.jgit.errors.PackMismatchException"> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.9.1"/> + <message_argument value="isPermanent()"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.9.1"/> + <message_argument value="setPermanent(boolean)"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants"> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.2"/> + <message_argument value="CONFIG_KEY_SKIPHASH"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="CONFIG_KEY_PACK_KEPT_OBJECTS"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="CONFIG_REPACK_SECTION"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/lib/FileModeCache.java" type="org.eclipse.jgit.lib.FileModeCache"> + <filter id="1109393411"> + <message_arguments> + <message_argument value="6.6.1"/> + <message_argument value="org.eclipse.jgit.lib.FileModeCache"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/revwalk/RevCommit.java" type="org.eclipse.jgit.revwalk.RevCommit"> + <filter id="1193279491"> + <message_arguments> + <message_argument value="6.5.1"/> + <message_argument value="buffer"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/storage/pack/PackConfig.java" type="org.eclipse.jgit.storage.pack.PackConfig"> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.storage.pack.PackConfig"/> + <message_argument value="DEFAULT_PACK_KEPT_OBJECTS"/> + </message_arguments> + </filter> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.storage.pack.PackConfig"/> + <message_argument value="DEFAULT_WRITE_REVERSE_INDEX"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="DEFAULT_PACK_KEPT_OBJECTS"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="isPackKeptObjects()"/> + </message_arguments> + </filter> + <filter id="1142947843"> + <message_arguments> + <message_argument value="5.13.3"/> + <message_argument value="setPackKeptObjects(boolean)"/> + </message_arguments> + </filter> + </resource> +</component> diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index c5b536967f..bf40cfd7cd 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 6.5.1.qualifier +Bundle-Version: 6.6.2.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Eclipse-ExtensibleAPI: true -Export-Package: org.eclipse.jgit.annotations;version="6.5.1", - org.eclipse.jgit.api;version="6.5.1"; +Export-Package: org.eclipse.jgit.annotations;version="6.6.2", + org.eclipse.jgit.api;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.notes, org.eclipse.jgit.dircache, @@ -23,18 +23,18 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.revwalk.filter, org.eclipse.jgit.blame, org.eclipse.jgit.merge", - org.eclipse.jgit.api.errors;version="6.5.1"; + org.eclipse.jgit.api.errors;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.errors", - org.eclipse.jgit.attributes;version="6.5.1"; + org.eclipse.jgit.attributes;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk", - org.eclipse.jgit.blame;version="6.5.1"; + org.eclipse.jgit.blame;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff", - org.eclipse.jgit.diff;version="6.5.1"; + org.eclipse.jgit.diff;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.revwalk, @@ -42,53 +42,53 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.dircache;version="6.5.1"; + org.eclipse.jgit.dircache;version="6.6.2"; uses:="org.eclipse.jgit.events, org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.errors;version="6.5.1"; + org.eclipse.jgit.errors;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.internal.storage.pack", - org.eclipse.jgit.events;version="6.5.1"; + org.eclipse.jgit.events;version="6.6.2"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.fnmatch;version="6.5.1", - org.eclipse.jgit.gitrepo;version="6.5.1"; + org.eclipse.jgit.fnmatch;version="6.6.2", + org.eclipse.jgit.gitrepo;version="6.6.2"; uses:="org.xml.sax.helpers, org.eclipse.jgit.api, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.xml.sax", - org.eclipse.jgit.gitrepo.internal;version="6.5.1";x-internal:=true, - org.eclipse.jgit.hooks;version="6.5.1";uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.ignore;version="6.5.1", - org.eclipse.jgit.ignore.internal;version="6.5.1"; + org.eclipse.jgit.gitrepo.internal;version="6.6.2";x-internal:=true, + org.eclipse.jgit.hooks;version="6.6.2";uses:="org.eclipse.jgit.lib", + org.eclipse.jgit.ignore;version="6.6.2", + org.eclipse.jgit.ignore.internal;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal;version="6.5.1"; + org.eclipse.jgit.internal;version="6.6.2"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.http.test", - org.eclipse.jgit.internal.diff;version="6.5.1"; + org.eclipse.jgit.internal.diff;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.diffmergetool;version="6.5.1"; + org.eclipse.jgit.internal.diffmergetool;version="6.6.2"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.pgm.test, org.eclipse.jgit.pgm, org.eclipse.egit.ui", - org.eclipse.jgit.internal.fsck;version="6.5.1"; + org.eclipse.jgit.internal.fsck;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.revwalk;version="6.5.1"; + org.eclipse.jgit.internal.revwalk;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.storage.commitgraph;version="6.5.1"; + org.eclipse.jgit.internal.storage.commitgraph;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.storage.dfs;version="6.5.1"; + org.eclipse.jgit.internal.storage.dfs;version="6.6.2"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.http.server, org.eclipse.jgit.http.test, org.eclipse.jgit.lfs.test", - org.eclipse.jgit.internal.storage.file;version="6.5.1"; + org.eclipse.jgit.internal.storage.file;version="6.6.2"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.junit, org.eclipse.jgit.junit.http, @@ -97,34 +97,34 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.pgm, org.eclipse.jgit.pgm.test, org.eclipse.jgit.ssh.apache", - org.eclipse.jgit.internal.storage.io;version="6.5.1"; + org.eclipse.jgit.internal.storage.io;version="6.6.2"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.memory;version="6.5.1"; + org.eclipse.jgit.internal.storage.memory;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.storage.pack;version="6.5.1"; + org.eclipse.jgit.internal.storage.pack;version="6.6.2"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.reftable;version="6.5.1"; + org.eclipse.jgit.internal.storage.reftable;version="6.6.2"; x-friends:="org.eclipse.jgit.http.test, org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.submodule;version="6.5.1";x-internal:=true, - org.eclipse.jgit.internal.transport.connectivity;version="6.5.1"; + org.eclipse.jgit.internal.submodule;version="6.6.2";x-internal:=true, + org.eclipse.jgit.internal.transport.connectivity;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.http;version="6.5.1"; + org.eclipse.jgit.internal.transport.http;version="6.6.2"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.parser;version="6.5.1"; + org.eclipse.jgit.internal.transport.parser;version="6.6.2"; x-friends:="org.eclipse.jgit.http.server, org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.ssh;version="6.5.1"; + org.eclipse.jgit.internal.transport.ssh;version="6.6.2"; x-friends:="org.eclipse.jgit.ssh.apache, org.eclipse.jgit.ssh.jsch, org.eclipse.jgit.test", - org.eclipse.jgit.lib;version="6.5.1"; + org.eclipse.jgit.lib;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util.sha1, org.eclipse.jgit.dircache, @@ -138,12 +138,12 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.util, org.eclipse.jgit.submodule, org.eclipse.jgit.util.time", - org.eclipse.jgit.lib.internal;version="6.5.1"; + org.eclipse.jgit.lib.internal;version="6.6.2"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.pgm, org.eclipse.egit.ui", - org.eclipse.jgit.logging;version="6.5.1", - org.eclipse.jgit.merge;version="6.5.1"; + org.eclipse.jgit.logging;version="6.6.2", + org.eclipse.jgit.merge;version="6.6.2"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, @@ -152,40 +152,40 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.util, org.eclipse.jgit.api, org.eclipse.jgit.attributes", - org.eclipse.jgit.nls;version="6.5.1", - org.eclipse.jgit.notes;version="6.5.1"; + org.eclipse.jgit.nls;version="6.6.2", + org.eclipse.jgit.notes;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk, org.eclipse.jgit.merge", - org.eclipse.jgit.patch;version="6.5.1"; + org.eclipse.jgit.patch;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff", - org.eclipse.jgit.revplot;version="6.5.1"; + org.eclipse.jgit.revplot;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk", - org.eclipse.jgit.revwalk;version="6.5.1"; + org.eclipse.jgit.revwalk;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.revwalk.filter, org.eclipse.jgit.treewalk", - org.eclipse.jgit.revwalk.filter;version="6.5.1"; + org.eclipse.jgit.revwalk.filter;version="6.6.2"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.lib, org.eclipse.jgit.util", - org.eclipse.jgit.storage.file;version="6.5.1"; + org.eclipse.jgit.storage.file;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.util", - org.eclipse.jgit.storage.pack;version="6.5.1"; + org.eclipse.jgit.storage.pack;version="6.6.2"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.submodule;version="6.5.1"; + org.eclipse.jgit.submodule;version="6.6.2"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.transport;version="6.5.1"; + org.eclipse.jgit.transport;version="6.6.2"; uses:="javax.crypto, org.eclipse.jgit.util.io, org.eclipse.jgit.lib, @@ -198,21 +198,21 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.transport.resolver, org.eclipse.jgit.storage.pack, org.eclipse.jgit.errors", - org.eclipse.jgit.transport.http;version="6.5.1"; + org.eclipse.jgit.transport.http;version="6.6.2"; uses:="javax.net.ssl", - org.eclipse.jgit.transport.resolver;version="6.5.1"; + org.eclipse.jgit.transport.resolver;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.lib", - org.eclipse.jgit.treewalk;version="6.5.1"; + org.eclipse.jgit.treewalk;version="6.6.2"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.util", - org.eclipse.jgit.treewalk.filter;version="6.5.1"; + org.eclipse.jgit.treewalk.filter;version="6.6.2"; uses:="org.eclipse.jgit.treewalk", - org.eclipse.jgit.util;version="6.5.1"; + org.eclipse.jgit.util;version="6.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.hooks, org.eclipse.jgit.revwalk, @@ -225,12 +225,12 @@ Export-Package: org.eclipse.jgit.annotations;version="6.5.1", org.eclipse.jgit.treewalk, javax.net.ssl, org.eclipse.jgit.util.time", - org.eclipse.jgit.util.io;version="6.5.1"; + org.eclipse.jgit.util.io;version="6.6.2"; uses:="org.eclipse.jgit.attributes, org.eclipse.jgit.lib, org.eclipse.jgit.treewalk", - org.eclipse.jgit.util.sha1;version="6.5.1", - org.eclipse.jgit.util.time;version="6.5.1" + org.eclipse.jgit.util.sha1;version="6.6.2", + org.eclipse.jgit.util.time;version="6.6.2" Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", javax.crypto, diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index ab07518e56..152ab2a8d0 100644 --- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit - Sources Bundle-SymbolicName: org.eclipse.jgit.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 6.5.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit;version="6.5.1.qualifier";roots="." +Bundle-Version: 6.6.2.qualifier +Eclipse-SourceBundle: org.eclipse.jgit;version="6.6.2.qualifier";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index 48f232788a..4d7336d74c 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit</artifactId> diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index faea9cbea3..eabb0c6fa4 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -17,7 +17,16 @@ applyBinaryBaseOidWrong=Cannot apply binary patch; OID for file {0} does not mat applyBinaryForInCoreNotSupported=Applying binary patch for inCore repositories is not yet supported applyBinaryOidTooShort=Binary patch for file {0} does not have full IDs applyBinaryPatchTypeNotSupported=Couldn't apply binary patch of type {0} -applyBinaryResultOidWrong=Result of binary patch for file {0} has wrong OID. +applyTextPatchCannotApplyHunk=Hunk cannot be applied +applyTextPatchSingleClearingHunk=Expected a single hunk for clearing all content +applyBinaryResultOidWrong=Result of binary patch for file {0} has wrong OID +applyPatchDestInvalid=Destination path in patch is invalid +applyPatchSourceInvalid==Source path in patch is invalid +applyPatchWithoutSourceOnAlreadyExistingSource=Cannot perform {0} action on an existing file +applyPatchWithCreationOverAlreadyExistingDestination=Cannot perform {0} action which overrides an existing file +applyPatchWithSourceOnNonExistentSource=Cannot perform {0} action on a non-existent file +applyTextPatchUnorderedHunkApplications=Current hunk must be applied after the last hunk +applyTextPatchUnorderedHunks=Got unordered hunks applyingCommit=Applying {0} archiveFormatAlreadyAbsent=Archive format already absent: {0} archiveFormatAlreadyRegistered=Archive format already registered with different implementation: {0} @@ -55,6 +64,8 @@ binaryHunkDecodeError=Binary hunk, line {0}: invalid input binaryHunkInvalidLength=Binary hunk, line {0}: input corrupt; expected length byte, got 0x{1} binaryHunkLineTooShort=Binary hunk, line {0}: input ended prematurely binaryHunkMissingNewline=Binary hunk, line {0}: input line not terminated by newline +bitmapAccessErrorForPackfile=Error whilst trying to access bitmap file for {} +bitmapFailedToGet=Failed to get bitmap index file {} bitmapMissingObject=Bitmap at {0} is missing {1}. bitmapsMustBePrepared=Bitmaps must be prepared before they may be written. blameNotCommittedYet=Not Committed Yet @@ -542,6 +553,7 @@ nothingToPush=Nothing to push. notMergedExceptionMessage=Branch was not deleted as it has not been merged yet; use the force option to delete it anyway notShallowedUnshallow=The server sent a unshallow for a commit that wasn''t marked as shallow: {0} noXMLParserAvailable=No XML parser available. +nullRevCommit=RevCommit is null numberDoesntFit=Number doesn't fit in a single byte objectAtHasBadZlibStream=Object at {0} in {1} has bad zlib stream objectIsCorrupt=Object {0} is corrupt: {1} @@ -581,6 +593,8 @@ packWasDeleted=Pack file {0} was deleted, removing it from pack list packWriterStatistics=Total {0,number,#0} (delta {1,number,#0}), reused {2,number,#0} (delta {3,number,#0}) panicCantRenameIndexFile=Panic: index file {0} must be renamed to replace {1}; until then repository is corrupt patchApplyException=Cannot apply: {0} +patchApplyErrorWithHunk=Error applying patch in {0}, hunk {1}: {2} +patchApplyErrorWithoutHunk=Error applying patch in {0}: {1} patchFormatException=Format error: {0} pathNotConfigured=Submodule path is not configured peeledLineBeforeRef=Peeled line before ref. @@ -830,6 +844,7 @@ unsupportedGC=Unsupported garbage collector for repository type: {0} unsupportedMark=Mark not supported unsupportedOperationNotAddAtEnd=Not add-at-end: {0} unsupportedPackIndexVersion=Unsupported pack index version {0} +unsupportedPackReverseIndexVersion=Unsupported pack reverse index version {0} unsupportedPackVersion=Unsupported pack version {0}. unsupportedReftableVersion=Unsupported reftable version {0}. unsupportedRepositoryDescription=Repository description not supported diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java index ae75d466de..cb32324043 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java @@ -39,7 +39,10 @@ import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.NameConflictTreeWalk; import org.eclipse.jgit.treewalk.TreeWalk.OperationType; import org.eclipse.jgit.treewalk.WorkingTreeIterator; +import org.eclipse.jgit.treewalk.filter.AndTreeFilter; +import org.eclipse.jgit.treewalk.filter.IndexDiffFilter; import org.eclipse.jgit.treewalk.filter.PathFilterGroup; +import org.eclipse.jgit.treewalk.filter.TreeFilter; /** * A class used to execute a {@code Add} command. It has setters for all @@ -58,6 +61,10 @@ public class AddCommand extends GitCommand<DirCache> { private boolean update = false; + // This defaults to true because it's what JGit has been doing + // traditionally. The C git default would be false. + private boolean renormalize = true; + /** * Constructor for AddCommand * @@ -127,8 +134,20 @@ public class AddCommand extends GitCommand<DirCache> { workingTreeIterator = new FileTreeIterator(repo); workingTreeIterator.setDirCacheIterator(tw, 0); tw.addTree(workingTreeIterator); - if (!addAll) - tw.setFilter(PathFilterGroup.createFromStrings(filepatterns)); + TreeFilter pathFilter = null; + if (!addAll) { + pathFilter = PathFilterGroup.createFromStrings(filepatterns); + } + if (!renormalize) { + if (pathFilter == null) { + tw.setFilter(new IndexDiffFilter(0, 1)); + } else { + tw.setFilter(AndTreeFilter.create(new IndexDiffFilter(0, 1), + pathFilter)); + } + } else if (pathFilter != null) { + tw.setFilter(pathFilter); + } byte[] lastAdded = null; @@ -260,4 +279,39 @@ public class AddCommand extends GitCommand<DirCache> { public boolean isUpdate() { return update; } + + /** + * Defines whether the command will renormalize by re-applying the "clean" + * process to tracked files. + * <p> + * This does not automatically call {@link #setUpdate(boolean)}. + * </p> + * + * @param renormalize + * whether to renormalize tracked files + * @return {@code this} + * @since 6.6 + */ + public AddCommand setRenormalize(boolean renormalize) { + this.renormalize = renormalize; + return this; + } + + /** + * Tells whether the command will renormalize by re-applying the "clean" + * process to tracked files. + * <p> + * For legacy reasons, this is {@code true} by default. + * </p> + * <p> + * This setting is independent of {@link #isUpdate()}. In C git, + * command-line option --renormalize implies --update. + * </p> + * + * @return whether files will be renormalized + * @since 6.6 + */ + public boolean isRenormalize() { + return renormalize; + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java index 49f225f319..e612924771 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java @@ -10,10 +10,16 @@ package org.eclipse.jgit.api; import java.io.File; +import java.io.IOException; import java.io.InputStream; +import java.text.MessageFormat; + import org.eclipse.jgit.api.errors.GitAPIException; +import org.eclipse.jgit.api.errors.PatchApplyException; +import org.eclipse.jgit.api.errors.PatchFormatException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.patch.Patch; import org.eclipse.jgit.patch.PatchApplier; import org.eclipse.jgit.patch.PatchApplier.Result; @@ -67,11 +73,31 @@ public class ApplyCommand extends GitCommand<ApplyResult> { public ApplyResult call() throws GitAPIException { checkCallable(); setCallable(false); + Patch patch = new Patch(); + try (InputStream inStream = in) { + patch.parse(inStream); + if (!patch.getErrors().isEmpty()) { + throw new PatchFormatException(patch.getErrors()); + } + } catch (IOException e) { + throw new PatchApplyException(MessageFormat.format( + JGitText.get().patchApplyException, e.getMessage()), e); + } ApplyResult r = new ApplyResult(); - PatchApplier patchApplier = new PatchApplier(repo); - Result applyResult = patchApplier.applyPatch(in); - for (String p : applyResult.getPaths()) { - r.addUpdatedFile(new File(repo.getWorkTree(), p)); + try { + PatchApplier patchApplier = new PatchApplier(repo); + Result applyResult = patchApplier.applyPatch(patch); + if (!applyResult.getErrors().isEmpty()) { + throw new PatchApplyException( + MessageFormat.format(JGitText.get().patchApplyException, + applyResult.getErrors())); + } + for (String p : applyResult.getPaths()) { + r.addUpdatedFile(new File(repo.getWorkTree(), p)); + } + } catch (IOException e) { + throw new PatchApplyException(MessageFormat.format(JGitText.get().patchApplyException, + e.getMessage(), e)); } return r; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java index 7319ff4b2f..8edae5a580 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com> - * Copyright (C) 2011, 2020 Matthias Sohn <matthias.sohn@sap.com> and others + * Copyright (C) 2011, 2023 Matthias Sohn <matthias.sohn@sap.com> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -28,6 +28,7 @@ import org.eclipse.jgit.api.errors.InvalidRefNameException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.RefAlreadyExistsException; import org.eclipse.jgit.api.errors.RefNotFoundException; +import org.eclipse.jgit.dircache.Checkout; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheCheckout; import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata; @@ -55,7 +56,6 @@ import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.treewalk.TreeWalk; -import org.eclipse.jgit.treewalk.WorkingTreeOptions; import org.eclipse.jgit.treewalk.filter.PathFilterGroup; /** @@ -412,8 +412,7 @@ public class CheckoutCommand extends GitCommand<Ref> { protected CheckoutCommand checkoutPaths() throws IOException, RefNotFoundException { actuallyModifiedPaths = new HashSet<>(); - WorkingTreeOptions options = repo.getConfig() - .get(WorkingTreeOptions.KEY); + Checkout checkout = new Checkout(repo).setRecursiveDeletion(true); DirCache dc = repo.lockDirCache(); try (RevWalk revWalk = new RevWalk(repo); TreeWalk treeWalk = new TreeWalk(repo, @@ -422,10 +421,10 @@ public class CheckoutCommand extends GitCommand<Ref> { if (!checkoutAllPaths) treeWalk.setFilter(PathFilterGroup.createFromStrings(paths)); if (isCheckoutIndex()) - checkoutPathsFromIndex(treeWalk, dc, options); + checkoutPathsFromIndex(treeWalk, dc, checkout); else { RevCommit commit = revWalk.parseCommit(getStartPointObjectId()); - checkoutPathsFromCommit(treeWalk, dc, commit, options); + checkoutPathsFromCommit(treeWalk, dc, commit, checkout); } } finally { try { @@ -443,7 +442,7 @@ public class CheckoutCommand extends GitCommand<Ref> { } private void checkoutPathsFromIndex(TreeWalk treeWalk, DirCache dc, - WorkingTreeOptions options) + Checkout checkout) throws IOException { DirCacheIterator dci = new DirCacheIterator(dc); treeWalk.addTree(dci); @@ -469,7 +468,7 @@ public class CheckoutCommand extends GitCommand<Ref> { if (stage > DirCacheEntry.STAGE_0) { if (checkoutStage != null) { if (stage == checkoutStage.number) { - checkoutPath(ent, r, options, + checkoutPath(ent, r, checkout, path, new CheckoutMetadata(eolStreamType, filterCommand)); actuallyModifiedPaths.add(path); @@ -480,7 +479,7 @@ public class CheckoutCommand extends GitCommand<Ref> { throw new JGitInternalException(e.getMessage(), e); } } else { - checkoutPath(ent, r, options, + checkoutPath(ent, r, checkout, path, new CheckoutMetadata(eolStreamType, filterCommand)); actuallyModifiedPaths.add(path); @@ -494,7 +493,7 @@ public class CheckoutCommand extends GitCommand<Ref> { } private void checkoutPathsFromCommit(TreeWalk treeWalk, DirCache dc, - RevCommit commit, WorkingTreeOptions options) throws IOException { + RevCommit commit, Checkout checkout) throws IOException { treeWalk.addTree(commit.getTree()); final ObjectReader r = treeWalk.getObjectReader(); DirCacheEditor editor = dc.editor(); @@ -516,7 +515,7 @@ public class CheckoutCommand extends GitCommand<Ref> { } ent.setObjectId(blobId); ent.setFileMode(mode); - checkoutPath(ent, r, options, + checkoutPath(ent, r, checkout, path, new CheckoutMetadata(eolStreamType, filterCommand)); actuallyModifiedPaths.add(path); } @@ -526,10 +525,9 @@ public class CheckoutCommand extends GitCommand<Ref> { } private void checkoutPath(DirCacheEntry entry, ObjectReader reader, - WorkingTreeOptions options, CheckoutMetadata checkoutMetadata) { + Checkout checkout, String path, CheckoutMetadata checkoutMetadata) { try { - DirCacheCheckout.checkoutEntry(repo, entry, reader, true, - checkoutMetadata, options); + checkout.checkout(entry, checkoutMetadata, reader, path); } catch (IOException e) { throw new JGitInternalException(MessageFormat.format( JGitText.get().checkoutConflictWithFile, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java index ceba89d166..5f8c2b728a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -142,7 +142,9 @@ public class CherryPickCommand extends GitCommand<CherryPickResult> { new String[] { "BASE", ourName, cherryPickName }); //$NON-NLS-1$ resolveMerger .setWorkingTreeIterator(new FileTreeIterator(repo)); - resolveMerger.setBase(srcParent.getTree()); + if (srcParent != null) { + resolveMerger.setBase(srcParent.getTree()); + } noProblems = merger.merge(newHead, srcCommit); failingPaths = resolveMerger.getFailingPaths(); unmergedPaths = resolveMerger.getUnmergedPaths(); @@ -217,12 +219,16 @@ public class CherryPickCommand extends GitCommand<CherryPickResult> { IOException { final RevCommit srcParent; if (mainlineParentNumber == null) { - if (srcCommit.getParentCount() != 1) + int nOfParents = srcCommit.getParentCount(); + if (nOfParents == 0) { + return null; + } else if (nOfParents != 1) { throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent, srcCommit.name(), Integer.valueOf(srcCommit.getParentCount()))); + } srcParent = srcCommit.getParent(0); } else { if (mainlineParentNumber.intValue() > srcCommit.getParentCount()) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java index d7b34ab7f5..27a5288429 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java @@ -16,9 +16,13 @@ import java.util.List; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.JGitInternalException; +import org.eclipse.jgit.errors.IncorrectObjectTypeException; +import org.eclipse.jgit.errors.MissingObjectException; +import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; /** @@ -29,6 +33,9 @@ import org.eclipse.jgit.revwalk.RevWalk; */ public class ListTagCommand extends GitCommand<List<Ref>> { + private final RevWalk rw; + private RevCommit commit; + /** * Constructor for ListTagCommand. * @@ -37,21 +44,49 @@ public class ListTagCommand extends GitCommand<List<Ref>> { */ protected ListTagCommand(Repository repo) { super(repo); + rw = new RevWalk(repo); + } + + /** + * Only list tags which contain the specified commit. + * + * @param commit + * the specified commit + * @return this command + * @throws IOException + * @throws IncorrectObjectTypeException + * @throws MissingObjectException + * + * @since 6.6 + */ + public ListTagCommand setContains(AnyObjectId commit) + throws MissingObjectException, IncorrectObjectTypeException, + IOException { + checkCallable(); + this.commit = rw.parseCommit(commit); + return this; } /** {@inheritDoc} */ @Override public List<Ref> call() throws GitAPIException { checkCallable(); - List<Ref> tags = new ArrayList<>(); - try (RevWalk revWalk = new RevWalk(repo)) { + List<Ref> tags; + try { List<Ref> refList = repo.getRefDatabase() .getRefsByPrefix(Constants.R_TAGS); - for (Ref ref : refList) { - tags.add(ref); + if (commit != null) { + // if body is retained #getMergedInto needs to access data not + // available in commit graph which is slower + rw.setRetainBody(false); + tags = rw.getMergedInto(commit, refList); + } else { + tags = new ArrayList<>(refList); } } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); + } finally { + rw.close(); } Collections.sort(tags, (Ref o1, Ref o2) -> o1.getName().compareTo(o2.getName())); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 1e5523f275..19fd3bb2c4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -1217,7 +1217,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> { Iterator<RevCommit> commitsToUse = r.iterator(); while (commitsToUse.hasNext()) { RevCommit commit = commitsToUse.next(); - if (preserveMerges || commit.getParentCount() == 1) { + if (preserveMerges || commit.getParentCount() <= 1) { cherryPickList.add(commit); } } @@ -1234,23 +1234,31 @@ public class RebaseCommand extends GitCommand<RebaseResult> { walk.markStart(upstreamCommit); walk.markStart(headCommit); RevCommit base; - while ((base = walk.next()) != null) + while ((base = walk.next()) != null) { RebaseState.createFile(rewrittenDir, base.getName(), upstreamCommit.getName()); - + } Iterator<RevCommit> iterator = cherryPickList.iterator(); pickLoop: while(iterator.hasNext()){ RevCommit commit = iterator.next(); - for (int i = 0; i < commit.getParentCount(); i++) { - boolean parentRewritten = new File(rewrittenDir, commit - .getParent(i).getName()).exists(); - if (parentRewritten) { - new File(rewrittenDir, commit.getName()).createNewFile(); - continue pickLoop; + int nOfParents = commit.getParentCount(); + if (nOfParents == 0) { + // Must be the very first commit in the cherryPickList. We + // have independent branches. + new File(rewrittenDir, commit.getName()).createNewFile(); + } else { + for (int i = 0; i < nOfParents; i++) { + boolean parentRewritten = new File(rewrittenDir, + commit.getParent(i).getName()).exists(); + if (parentRewritten) { + new File(rewrittenDir, commit.getName()) + .createNewFile(); + continue pickLoop; + } } + // commit is only merged in, needs not be rewritten + iterator.remove(); } - // commit is only merged in, needs not be rewritten - iterator.remove(); } } return cherryPickList; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java index 17036a9cd3..e4157286f1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2021 GitHub Inc. and others + * Copyright (C) 2012, 2023 GitHub Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -23,6 +23,7 @@ import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.NoHeadException; import org.eclipse.jgit.api.errors.StashApplyFailureException; import org.eclipse.jgit.api.errors.WrongRepositoryStateException; +import org.eclipse.jgit.dircache.Checkout; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheBuilder; import org.eclipse.jgit.dircache.DirCacheCheckout; @@ -48,7 +49,6 @@ import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.treewalk.AbstractTreeIterator; import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; -import org.eclipse.jgit.treewalk.WorkingTreeOptions; /** * Command class to apply a stashed commit. @@ -383,8 +383,7 @@ public class StashApplyCommand extends GitCommand<ObjectId> { private void resetUntracked(RevTree tree) throws CheckoutConflictException, IOException { Set<String> actuallyModifiedPaths = new HashSet<>(); - WorkingTreeOptions options = repo.getConfig() - .get(WorkingTreeOptions.KEY); + Checkout checkout = new Checkout(repo).setRecursiveDeletion(true); // TODO maybe NameConflictTreeWalk ? try (TreeWalk walk = new TreeWalk(repo)) { walk.addTree(tree); @@ -408,17 +407,17 @@ public class StashApplyCommand extends GitCommand<ObjectId> { FileTreeIterator fIter = walk .getTree(1, FileTreeIterator.class); + String gitPath = entry.getPathString(); if (fIter != null) { if (fIter.isModified(entry, true, reader)) { // file exists and is dirty - throw new CheckoutConflictException( - entry.getPathString()); + throw new CheckoutConflictException(gitPath); } } - checkoutPath(entry, reader, options, + checkoutPath(entry, gitPath, reader, checkout, new CheckoutMetadata(eolStreamType, null)); - actuallyModifiedPaths.add(entry.getPathString()); + actuallyModifiedPaths.add(gitPath); } } finally { if (!actuallyModifiedPaths.isEmpty()) { @@ -428,11 +427,11 @@ public class StashApplyCommand extends GitCommand<ObjectId> { } } - private void checkoutPath(DirCacheEntry entry, ObjectReader reader, - WorkingTreeOptions options, CheckoutMetadata checkoutMetadata) { + private void checkoutPath(DirCacheEntry entry, String gitPath, + ObjectReader reader, + Checkout checkout, CheckoutMetadata checkoutMetadata) { try { - DirCacheCheckout.checkoutEntry(repo, entry, reader, true, - checkoutMetadata, options); + checkout.checkout(entry, checkoutMetadata, reader, gitPath); } catch (IOException e) { throw new JGitInternalException(MessageFormat.format( JGitText.get().checkoutConflictWithFile, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java index ca5370e912..ccf99ff5b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java @@ -12,6 +12,7 @@ package org.eclipse.jgit.blame; import java.io.IOException; import java.util.List; +import java.util.Objects; import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit; import org.eclipse.jgit.diff.Edit; @@ -269,7 +270,7 @@ class Candidate { } boolean canMergeRegions(Candidate other) { - return sourceCommit == other.sourceCommit + return Objects.equals(sourceCommit, other.sourceCommit) && sourcePath.getPath().equals(other.sourcePath.getPath()); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/Checkout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/Checkout.java new file mode 100644 index 0000000000..accf732dc7 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/Checkout.java @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2023, Thomas Wolf <twolf@apache.org> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.dircache; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.StandardCopyOption; +import java.text.MessageFormat; + +import org.eclipse.jgit.annotations.NonNull; +import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata; +import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.lib.FileMode; +import org.eclipse.jgit.lib.FileModeCache; +import org.eclipse.jgit.lib.ObjectLoader; +import org.eclipse.jgit.lib.ObjectReader; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.CoreConfig.EolStreamType; +import org.eclipse.jgit.lib.CoreConfig.SymLinks; +import org.eclipse.jgit.lib.FileModeCache.CacheItem; +import org.eclipse.jgit.treewalk.WorkingTreeOptions; +import org.eclipse.jgit.util.FS; +import org.eclipse.jgit.util.FileUtils; +import org.eclipse.jgit.util.RawParseUtils; + +/** + * An object that can be used to check out many files. + * + * @since 6.6.1 + */ +public class Checkout { + + private final FileModeCache cache; + + private final WorkingTreeOptions options; + + private boolean recursiveDelete; + + /** + * Creates a new {@link Checkout} for checking out from the given + * repository. + * + * @param repo + * the {@link Repository} to check out from + */ + public Checkout(@NonNull Repository repo) { + this(repo, null); + } + + /** + * Creates a new {@link Checkout} for checking out from the given + * repository. + * + * @param repo + * the {@link Repository} to check out from + * @param options + * the {@link WorkingTreeOptions}Â to use; if {@code null}, + * read from the {@code repo} config when this object is + * created + */ + public Checkout(@NonNull Repository repo, WorkingTreeOptions options) { + this.cache = new FileModeCache(repo); + this.options = options != null ? options + : repo.getConfig().get(WorkingTreeOptions.KEY); + } + + /** + * Retrieves the {@link WorkingTreeOptions} of the repository that are + * used. + * + * @return the {@link WorkingTreeOptions} + */ + public WorkingTreeOptions getWorkingTreeOptions() { + return options; + } + + /** + * Defines whether directories that are in the way of the file to be checked + * out shall be deleted recursively. + * + * @param recursive + * whether to delete such directories recursively + * @return {@code this} + */ + public Checkout setRecursiveDeletion(boolean recursive) { + this.recursiveDelete = recursive; + return this; + } + + /** + * Ensure that the given parent directory exists, and cache the information + * that gitPath refers to a file. + * + * @param gitPath + * of the file to be written + * @param parentDir + * directory in which the file shall be placed, assumed to be the + * parent of the {@code gitPath} + * @param makeSpace + * whether to delete a possibly existing file at + * {@code parentDir} + * @throws IOException + * if the directory cannot be created, if necessary + */ + public void safeCreateParentDirectory(String gitPath, File parentDir, + boolean makeSpace) throws IOException { + cache.safeCreateParentDirectory(gitPath, parentDir, makeSpace); + } + + /** + * Checks out the gitlink given by the {@link DirCacheEntry}. + * + * @param entry + * {@link DirCacheEntry} to check out + * @param gitPath + * the git path of the entry, if known already; otherwise + * {@code null} and it's read from the entry itself + * @throws IOException + * if the gitlink cannot be checked out + */ + public void checkoutGitlink(DirCacheEntry entry, String gitPath) + throws IOException { + FS fs = cache.getRepository().getFS(); + File workingTree = cache.getRepository().getWorkTree(); + String path = gitPath != null ? gitPath : entry.getPathString(); + File gitlinkDir = new File(workingTree, path); + File parentDir = gitlinkDir.getParentFile(); + CacheItem cachedParent = cache.safeCreateDirectory(path, parentDir, + false); + FileUtils.mkdirs(gitlinkDir, true); + cachedParent.insert(path.substring(path.lastIndexOf('/') + 1), + FileMode.GITLINK); + entry.setLastModified(fs.lastModifiedInstant(gitlinkDir)); + } + + /** + * Checks out the file given by the {@link DirCacheEntry}. + * + * @param entry + * {@link DirCacheEntry} to check out + * @param metadata + * {@link CheckoutMetadata} to use for CR/LF handling and + * smudge filtering + * @param reader + * {@link ObjectReader} to use + * @param gitPath + * the git path of the entry, if known already; otherwise + * {@code null} and it's read from the entry itself + * @throws IOException + * if the file cannot be checked out + */ + public void checkout(DirCacheEntry entry, CheckoutMetadata metadata, + ObjectReader reader, String gitPath) throws IOException { + if (metadata == null) { + metadata = CheckoutMetadata.EMPTY; + } + FS fs = cache.getRepository().getFS(); + ObjectLoader ol = reader.open(entry.getObjectId()); + String path = gitPath != null ? gitPath : entry.getPathString(); + File f = new File(cache.getRepository().getWorkTree(), path); + File parentDir = f.getParentFile(); + CacheItem cachedParent = cache.safeCreateDirectory(path, parentDir, + true); + if (entry.getFileMode() == FileMode.SYMLINK + && options.getSymLinks() == SymLinks.TRUE) { + byte[] bytes = ol.getBytes(); + String target = RawParseUtils.decode(bytes); + if (recursiveDelete && Files.isDirectory(f.toPath(), + LinkOption.NOFOLLOW_LINKS)) { + FileUtils.delete(f, FileUtils.RECURSIVE); + } + fs.createSymLink(f, target); + cachedParent.insert(f.getName(), FileMode.SYMLINK); + entry.setLength(bytes.length); + entry.setLastModified(fs.lastModifiedInstant(f)); + return; + } + + String name = f.getName(); + if (name.length() > 200) { + name = name.substring(0, 200); + } + File tmpFile = File.createTempFile("._" + name, null, parentDir); //$NON-NLS-1$ + + DirCacheCheckout.getContent(cache.getRepository(), path, metadata, ol, + options, + new FileOutputStream(tmpFile)); + + // The entry needs to correspond to the on-disk file size. If the + // content was filtered (either by autocrlf handling or smudge + // filters) ask the file system again for the length. Otherwise the + // object loader knows the size + if (metadata.eolStreamType == EolStreamType.DIRECT + && metadata.smudgeFilterCommand == null) { + entry.setLength(ol.getSize()); + } else { + entry.setLength(tmpFile.length()); + } + + if (options.isFileMode() && fs.supportsExecute()) { + if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) { + if (!fs.canExecute(tmpFile)) + fs.setExecute(tmpFile, true); + } else { + if (fs.canExecute(tmpFile)) + fs.setExecute(tmpFile, false); + } + } + try { + if (recursiveDelete && Files.isDirectory(f.toPath(), + LinkOption.NOFOLLOW_LINKS)) { + FileUtils.delete(f, FileUtils.RECURSIVE); + } + FileUtils.rename(tmpFile, f, StandardCopyOption.ATOMIC_MOVE); + cachedParent.remove(f.getName()); + } catch (IOException e) { + throw new IOException( + MessageFormat.format(JGitText.get().renameFileFailed, + tmpFile.getPath(), f.getPath()), + e); + } finally { + if (tmpFile.exists()) { + FileUtils.delete(tmpFile); + } + } + entry.setLastModified(fs.lastModifiedInstant(f)); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 1fb81b71e9..d54df8d20e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -5,7 +5,7 @@ * Copyright (C) 2006, Shawn O. Pearce <spearce@spearce.org> * Copyright (C) 2010, Chrisian Halstrick <christian.halstrick@sap.com> * Copyright (C) 2019, 2020, Andre Bossert <andre.bossert@siemens.com> - * Copyright (C) 2017, 2022, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2017, 2023, Thomas Wolf <twolf@apache.org> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -19,11 +19,9 @@ package org.eclipse.jgit.dircache; import static org.eclipse.jgit.treewalk.TreeWalk.OperationType.CHECKOUT_OP; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.nio.file.StandardCopyOption; import java.text.MessageFormat; import java.time.Instant; import java.util.ArrayList; @@ -49,7 +47,6 @@ import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.CoreConfig.AutoCRLF; import org.eclipse.jgit.lib.CoreConfig.EolStreamType; -import org.eclipse.jgit.lib.CoreConfig.SymLinks; import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.NullProgressMonitor; import org.eclipse.jgit.lib.ObjectChecker; @@ -69,9 +66,7 @@ import org.eclipse.jgit.treewalk.WorkingTreeOptions; import org.eclipse.jgit.treewalk.filter.PathFilter; import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS.ExecutionResult; -import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.IntList; -import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.io.EolStreamTypeUtil; import org.slf4j.Logger; @@ -144,7 +139,7 @@ public class DirCacheCheckout { private boolean performingCheckout; - private WorkingTreeOptions options; + private Checkout checkout; private ProgressMonitor monitor = NullProgressMonitor.INSTANCE; @@ -495,9 +490,8 @@ public class DirCacheCheckout { MissingObjectException, IncorrectObjectTypeException, CheckoutConflictException, IndexWriteException, CanceledException { toBeDeleted.clear(); - options = repo.getConfig() - .get(WorkingTreeOptions.KEY); try (ObjectReader objectReader = repo.getObjectDatabase().newReader()) { + checkout = new Checkout(repo, null); if (headCommitTree != null) preScanTwoTrees(); else @@ -564,10 +558,9 @@ public class DirCacheCheckout { CheckoutMetadata meta = e.getValue(); DirCacheEntry entry = dc.getEntry(path); if (FileMode.GITLINK.equals(entry.getRawMode())) { - checkoutGitlink(path, entry); + checkout.checkoutGitlink(entry, path); } else { - checkoutEntry(repo, entry, objectReader, false, meta, - options); + checkout.checkout(entry, meta, objectReader, path); } e = null; @@ -602,8 +595,8 @@ public class DirCacheCheckout { break; } if (entry.getStage() == DirCacheEntry.STAGE_3) { - checkoutEntry(repo, entry, objectReader, false, - null, options); + checkout.checkout(entry, null, objectReader, + conflict); break; } ++entryIdx; @@ -626,14 +619,6 @@ public class DirCacheCheckout { return toBeDeleted.isEmpty(); } - private void checkoutGitlink(String path, DirCacheEntry entry) - throws IOException { - File gitlinkDir = new File(repo.getWorkTree(), path); - FileUtils.mkdirs(gitlinkDir, true); - FS fs = repo.getFS(); - entry.setLastModified(fs.lastModifiedInstant(gitlinkDir)); - } - private static ArrayList<String> filterOut(ArrayList<String> strings, IntList indicesToRemove) { int n = indicesToRemove.size(); @@ -1232,10 +1217,11 @@ public class DirCacheCheckout { if (force) { if (f == null || f.isModified(e, true, walk.getObjectReader())) { kept.add(path); - checkoutEntry(repo, e, walk.getObjectReader(), false, + checkout.checkout(e, new CheckoutMetadata(walk.getEolStreamType(CHECKOUT_OP), walk.getFilterCommand( - Constants.ATTR_FILTER_TYPE_SMUDGE)), options); + Constants.ATTR_FILTER_TYPE_SMUDGE)), + walk.getObjectReader(), path); } } } @@ -1494,83 +1480,16 @@ public class DirCacheCheckout { * they are loaded from the repository config * @throws java.io.IOException * @since 6.3 + * @deprecated since 6.6.1; use {@link Checkout} instead */ + @Deprecated public static void checkoutEntry(Repository repo, DirCacheEntry entry, ObjectReader or, boolean deleteRecursive, CheckoutMetadata checkoutMetadata, WorkingTreeOptions options) throws IOException { - if (checkoutMetadata == null) { - checkoutMetadata = CheckoutMetadata.EMPTY; - } - ObjectLoader ol = or.open(entry.getObjectId()); - File f = new File(repo.getWorkTree(), entry.getPathString()); - File parentDir = f.getParentFile(); - if (parentDir.isFile()) { - FileUtils.delete(parentDir); - } - FileUtils.mkdirs(parentDir, true); - FS fs = repo.getFS(); - WorkingTreeOptions opt = options != null ? options - : repo.getConfig().get(WorkingTreeOptions.KEY); - if (entry.getFileMode() == FileMode.SYMLINK - && opt.getSymLinks() == SymLinks.TRUE) { - byte[] bytes = ol.getBytes(); - String target = RawParseUtils.decode(bytes); - if (deleteRecursive && f.isDirectory()) { - FileUtils.delete(f, FileUtils.RECURSIVE); - } - fs.createSymLink(f, target); - entry.setLength(bytes.length); - entry.setLastModified(fs.lastModifiedInstant(f)); - return; - } - - String name = f.getName(); - if (name.length() > 200) { - name = name.substring(0, 200); - } - File tmpFile = File.createTempFile( - "._" + name, null, parentDir); //$NON-NLS-1$ - - getContent(repo, entry.getPathString(), checkoutMetadata, ol, opt, - new FileOutputStream(tmpFile)); - - // The entry needs to correspond to the on-disk filesize. If the content - // was filtered (either by autocrlf handling or smudge filters) ask the - // filesystem again for the length. Otherwise the objectloader knows the - // size - if (checkoutMetadata.eolStreamType == EolStreamType.DIRECT - && checkoutMetadata.smudgeFilterCommand == null) { - entry.setLength(ol.getSize()); - } else { - entry.setLength(tmpFile.length()); - } - - if (opt.isFileMode() && fs.supportsExecute()) { - if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) { - if (!fs.canExecute(tmpFile)) - fs.setExecute(tmpFile, true); - } else { - if (fs.canExecute(tmpFile)) - fs.setExecute(tmpFile, false); - } - } - try { - if (deleteRecursive && f.isDirectory()) { - FileUtils.delete(f, FileUtils.RECURSIVE); - } - FileUtils.rename(tmpFile, f, StandardCopyOption.ATOMIC_MOVE); - } catch (IOException e) { - throw new IOException( - MessageFormat.format(JGitText.get().renameFileFailed, - tmpFile.getPath(), f.getPath()), - e); - } finally { - if (tmpFile.exists()) { - FileUtils.delete(tmpFile); - } - } - entry.setLastModified(fs.lastModifiedInstant(f)); + Checkout checkout = new Checkout(repo, options) + .setRecursiveDeletion(deleteRecursive); + checkout.checkout(entry, checkoutMetadata, or, null); } /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index 39cc749cc4..1d5a2e1f6b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -46,6 +46,16 @@ public class JGitText extends TranslationBundle { /***/ public String applyBinaryOidTooShort; /***/ public String applyBinaryPatchTypeNotSupported; /***/ public String applyBinaryResultOidWrong; + /***/ public String applyPatchDestInvalid; + /***/ public String applyPatchSourceInvalid; + /***/ public String applyPatchWithoutSourceOnAlreadyExistingSource; + /***/ public String applyPatchWithCreationOverAlreadyExistingDestination; + /***/ public String applyPatchWithSourceOnNonExistentSource; + /***/ public String applyTextPatchCannotApplyHunk; + /***/ public String applyTextPatchSingleClearingHunk; + /***/ public String applyTextPatchUnorderedHunkApplications; + /***/ public String applyTextPatchUnorderedHunks; + /***/ public String applyingCommit; /***/ public String archiveFormatAlreadyAbsent; /***/ public String archiveFormatAlreadyRegistered; @@ -83,6 +93,8 @@ public class JGitText extends TranslationBundle { /***/ public String binaryHunkInvalidLength; /***/ public String binaryHunkLineTooShort; /***/ public String binaryHunkMissingNewline; + /***/ public String bitmapAccessErrorForPackfile; + /***/ public String bitmapFailedToGet; /***/ public String bitmapMissingObject; /***/ public String bitmapsMustBePrepared; /***/ public String blameNotCommittedYet; @@ -570,6 +582,7 @@ public class JGitText extends TranslationBundle { /***/ public String notMergedExceptionMessage; /***/ public String notShallowedUnshallow; /***/ public String noXMLParserAvailable; + /***/ public String nullRevCommit; /***/ public String numberDoesntFit; /***/ public String objectAtHasBadZlibStream; /***/ public String objectIsCorrupt; @@ -609,6 +622,8 @@ public class JGitText extends TranslationBundle { /***/ public String packWriterStatistics; /***/ public String panicCantRenameIndexFile; /***/ public String patchApplyException; + /***/ public String patchApplyErrorWithHunk; + /***/ public String patchApplyErrorWithoutHunk; /***/ public String patchFormatException; /***/ public String pathNotConfigured; /***/ public String peeledLineBeforeRef; @@ -858,6 +873,7 @@ public class JGitText extends TranslationBundle { /***/ public String unsupportedMark; /***/ public String unsupportedOperationNotAddAtEnd; /***/ public String unsupportedPackIndexVersion; + /***/ public String unsupportedPackReverseIndexVersion; /***/ public String unsupportedPackVersion; /***/ public String unsupportedReftableVersion; /***/ public String unsupportedRepositoryDescription; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java index b0df46732e..22b4011f9f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java @@ -80,7 +80,7 @@ class GraphObjectIndex { if (levelOne > 0) { low = fanoutTable[levelOne - 1]; } - do { + while (low < high) { int mid = (low + high) >>> 1; int pos = objIdOffset(mid); int cmp = id.compareTo(oidLookup, pos); @@ -91,7 +91,7 @@ class GraphObjectIndex { } else { low = mid + 1; } - } while (low < high); + } return -1; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java index 66bcf73987..92e23b8b40 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java @@ -577,6 +577,7 @@ public class DfsGarbageCollector { cfg.setReuseObjects(true); cfg.setDeltaCompress(false); cfg.setBuildBitmaps(false); + cfg.setWriteReverseIndex(false); try (PackWriter pw = new PackWriter(cfg, ctx); RevWalk pool = new RevWalk(ctx)) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 411777c7ad..c745b8e6ee 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -1042,15 +1042,7 @@ public final class DfsPackFile extends BlockBasedFile { ctx.stats.readIdx++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, INDEX)) { - InputStream in = Channels.newInputStream(rc); - int wantSize = 8192; - int bs = rc.blockSize(); - if (0 < bs && bs < wantSize) { - bs = (wantSize / bs) * bs; - } else if (bs <= 0) { - bs = wantSize; - } - PackIndex idx = PackIndex.read(new BufferedInputStream(in, bs)); + PackIndex idx = PackIndex.read(alignTo8kBlocks(rc)); ctx.stats.readIdxBytes += rc.position(); index = idx; return new DfsBlockCache.Ref<>( @@ -1094,17 +1086,8 @@ public final class DfsPackFile extends BlockBasedFile { long size; PackBitmapIndex bmidx; try { - InputStream in = Channels.newInputStream(rc); - int wantSize = 8192; - int bs = rc.blockSize(); - if (0 < bs && bs < wantSize) { - bs = (wantSize / bs) * bs; - } else if (bs <= 0) { - bs = wantSize; - } - in = new BufferedInputStream(in, bs); - bmidx = PackBitmapIndex.read(in, () -> idx(ctx), - () -> getReverseIdx(ctx), + bmidx = PackBitmapIndex.read(alignTo8kBlocks(rc), + () -> idx(ctx), () -> getReverseIdx(ctx), ctx.getOptions().shouldLoadRevIndexInParallel()); } finally { size = rc.position(); @@ -1133,16 +1116,7 @@ public final class DfsPackFile extends BlockBasedFile { long size; CommitGraph cg; try { - InputStream in = Channels.newInputStream(rc); - int wantSize = 8192; - int bs = rc.blockSize(); - if (0 < bs && bs < wantSize) { - bs = (wantSize / bs) * bs; - } else if (bs <= 0) { - bs = wantSize; - } - in = new BufferedInputStream(in, bs); - cg = CommitGraphLoader.read(in); + cg = CommitGraphLoader.read(alignTo8kBlocks(rc)); } finally { size = rc.position(); ctx.stats.readCommitGraphBytes += size; @@ -1157,4 +1131,19 @@ public final class DfsPackFile extends BlockBasedFile { e); } } + + private static InputStream alignTo8kBlocks(ReadableChannel rc) { + // TODO(ifrade): This is not reading from DFS, so the channel should + // know better the right blocksize. I don't know why this was done in + // the first place, verify and remove if not needed. + InputStream in = Channels.newInputStream(rc); + int wantSize = 8192; + int bs = rc.blockSize(); + if (0 < bs && bs < wantSize) { + bs = (wantSize / bs) * bs; + } else if (bs <= 0) { + bs = wantSize; + } + return new BufferedInputStream(in, bs); + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index 06ec80c05f..8d624bca23 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -11,6 +11,7 @@ package org.eclipse.jgit.internal.storage.file; import static org.eclipse.jgit.internal.storage.pack.PackExt.BITMAP_INDEX; +import static org.eclipse.jgit.internal.storage.pack.PackExt.COMMIT_GRAPH; import static org.eclipse.jgit.internal.storage.pack.PackExt.INDEX; import static org.eclipse.jgit.internal.storage.pack.PackExt.KEEP; import static org.eclipse.jgit.internal.storage.pack.PackExt.PACK; @@ -948,7 +949,8 @@ public class GC { try (RevWalk walk = new RevWalk(repo)) { CommitGraphWriter writer = new CommitGraphWriter( GraphCommits.fromWalk(pm, wants, walk)); - tmpFile = File.createTempFile("commit_", ".graph_tmp", //$NON-NLS-1$//$NON-NLS-2$ + tmpFile = File.createTempFile("commit_", //$NON-NLS-1$ + COMMIT_GRAPH.getTmpExtension(), repo.getObjectDatabase().getInfoDirectory()); // write the commit-graph file try (FileOutputStream fos = new FileOutputStream(tmpFile); @@ -1298,10 +1300,11 @@ public class GC { ObjectId id = pw.computeName(); File packdir = repo.getObjectDatabase().getPackDirectory(); packdir.mkdirs(); - tmpPack = File.createTempFile("gc_", ".pack_tmp", packdir); //$NON-NLS-1$ //$NON-NLS-2$ - final String tmpBase = tmpPack.getName() + tmpPack = File.createTempFile("gc_", //$NON-NLS-1$ + PACK.getTmpExtension(), packdir); + String tmpBase = tmpPack.getName() .substring(0, tmpPack.getName().lastIndexOf('.')); - File tmpIdx = new File(packdir, tmpBase + ".idx_tmp"); //$NON-NLS-1$ + File tmpIdx = new File(packdir, tmpBase + INDEX.getTmpExtension()); tmpExts.put(INDEX, tmpIdx); if (!tmpIdx.createNewFile()) @@ -1327,7 +1330,8 @@ public class GC { } if (pw.prepareBitmapIndex(pm)) { - File tmpBitmapIdx = new File(packdir, tmpBase + ".bitmap_tmp"); //$NON-NLS-1$ + File tmpBitmapIdx = new File(packdir, + tmpBase + BITMAP_INDEX.getTmpExtension()); tmpExts.put(BITMAP_INDEX, tmpBitmapIdx); if (!tmpBitmapIdx.createNewFile()) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java index 6e74136c1b..7d39b1fbcc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java @@ -56,6 +56,7 @@ import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectLoader; +import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.LongList; import org.eclipse.jgit.util.NB; import org.eclipse.jgit.util.RawParseUtils; @@ -665,7 +666,12 @@ public class Pack implements Iterable<PackIndex.MutableEntry> { // exceptions signaling permanent problems with a pack openFail(true, pe); throw pe; - } catch (IOException | RuntimeException ge) { + } catch (IOException ioe) { + // mark this packfile as invalid when NFS stale file handle error + // occur + openFail(FileUtils.isStaleFileHandleInCausalChain(ioe), ioe); + throw ioe; + } catch (RuntimeException ge) { // generic exceptions could be transient so we should not mark the // pack invalid to avoid false MissingObjectExceptions openFail(false, ge); @@ -1129,9 +1135,17 @@ public class Pack implements Iterable<PackIndex.MutableEntry> { idx = PackBitmapIndex.open(bitmapIdxFile, idx(), getReverseIdx()); } catch (FileNotFoundException e) { - // Once upon a time this bitmap file existed. Now it - // has been removed. Most likely an external gc has - // removed this packfile and the bitmap + // Once upon a time the bitmap or index files existed. Now one + // of them has been removed. Most likely an external gc has + // removed index, packfile or the bitmap + bitmapIdxFile = null; + return null; + } catch (IOException e) { + if (!FileUtils.isStaleFileHandleInCausalChain(e)) { + throw e; + } + // Ignore NFS stale handle exception the same way as + // FileNotFoundException above. bitmapIdxFile = null; return null; } @@ -1146,6 +1160,19 @@ public class Pack implements Iterable<PackIndex.MutableEntry> { return bitmapIdx; } + synchronized void refreshBitmapIndex(PackFile bitmapIndexFile) { + this.bitmapIdx = null; + this.invalid = false; + this.bitmapIdxFile = bitmapIndexFile; + try { + getBitmapIndex(); + } catch (IOException e) { + LOG.warn(JGitText.get().bitmapFailedToGet, bitmapIdxFile, e); + this.bitmapIdx = null; + this.bitmapIdxFile = null; + } + } + private synchronized PackReverseIndex getReverseIdx() throws IOException { if (reverseIdx == null) reverseIdx = new PackReverseIndex(idx()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java index 6a99cb3d83..1676d8bc18 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java @@ -115,10 +115,13 @@ class PackDirectory { } Collection<Pack> getPacks() { - PackList list = packList.get(); - if (list == NO_PACKS) { - list = scanPacks(list); - } + PackList list; + do { + list = packList.get(); + if (list == NO_PACKS) { + list = scanPacks(list); + } + } while (searchPacksAgain(list)); Pack[] packs = list.packs; return Collections.unmodifiableCollection(Arrays.asList(packs)); } @@ -455,6 +458,13 @@ class PackDirectory { && !oldPack.getFileSnapshot().isModified(packFile)) { forReuse.remove(packFile.getName()); list.add(oldPack); + try { + if(oldPack.getBitmapIndex() == null) { + oldPack.refreshBitmapIndex(packFilesByExt.get(BITMAP_INDEX)); + } + } catch (IOException e) { + LOG.warn(JGitText.get().bitmapAccessErrorForPackfile, oldPack.getPackName(), e); + } continue; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java index f4f62d4205..c0689dc634 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java @@ -64,7 +64,9 @@ public abstract class PackIndex public static PackIndex open(File idxFile) throws IOException { try (SilentFileInputStream fd = new SilentFileInputStream( idxFile)) { - return read(fd); + return read(fd); + } catch (FileNotFoundException e) { + throw e; } catch (IOException ioe) { throw new IOException( MessageFormat.format(JGitText.get().unreadablePackIndex, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriter.java new file mode 100644 index 0000000000..4c8417b115 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriter.java @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2023, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.storage.file; + +import java.io.BufferedOutputStream; +import java.io.DataOutput; +import java.io.IOException; +import java.io.OutputStream; +import java.security.DigestOutputStream; +import java.text.MessageFormat; +import java.util.List; + +import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.transport.PackedObjectInfo; + +/** + * Writes reverse index files conforming to the requested version. + * <p> + * The reverse index file format is specified at + * https://git-scm.com/docs/pack-format#_pack_rev_files_have_the_format. + */ +public abstract class PackReverseIndexWriter { + /** + * Magic bytes that uniquely identify git reverse index files. + */ + protected static byte[] MAGIC = { 'R', 'I', 'D', 'X' }; + + /** + * The first reverse index file version. + */ + protected static final int VERSION_1 = 1; + + /** + * Stream to write contents to while maintaining a checksum. + */ + protected final DigestOutputStream out; + + /** + * Stream to write primitive type contents to while maintaining a checksum. + */ + protected final DataOutput dataOutput; + + private static final int DEFAULT_VERSION = VERSION_1; + + /** + * Construct the components of a PackReverseIndexWriter that are shared + * between subclasses. + * + * @param dst + * the OutputStream that the instance will write contents to + */ + protected PackReverseIndexWriter(OutputStream dst) { + out = new DigestOutputStream( + dst instanceof BufferedOutputStream ? dst + : new BufferedOutputStream(dst), + Constants.newMessageDigest()); + dataOutput = new SimpleDataOutput(out); + } + + /** + * Create a writer instance for the default file format version. + * + * @param dst + * the OutputStream that contents will be written to + * @return the new writer instance + */ + public static PackReverseIndexWriter createWriter(OutputStream dst) { + return createWriter(dst, DEFAULT_VERSION); + } + + /** + * Create a writer instance for the specified file format version. + * + * @param dst + * the OutputStream that contents will be written to + * @param version + * the reverse index format version to write contents as + * @return the new writer instance + */ + public static PackReverseIndexWriter createWriter(OutputStream dst, + int version) { + if (version == VERSION_1) { + return new PackReverseIndexWriterV1(dst); + } + throw new IllegalArgumentException(MessageFormat.format( + JGitText.get().unsupportedPackReverseIndexVersion, + Integer.toString(version))); + } + + /** + * Write the contents of a reverse index file for the given objects. + * + * @param objectsByIndexPos + * the objects whose forward index file positions should be + * written, sorted by forward index file position (currently SHA1 + * ordering) + * @param packChecksum + * the checksum of the corresponding pack file + * @throws IOException + * if writing the output fails + */ + public void write( + List<? extends PackedObjectInfo> objectsByIndexPos, + byte[] packChecksum) throws IOException { + writeHeader(); + writeBody(objectsByIndexPos); + writeFooter(packChecksum); + out.flush(); + } + + /** + * Write the header of a reverse index file, usually the magic bytes and the + * file format version. + * + * @throws IOException + * if writing the output fails + */ + protected abstract void writeHeader() throws IOException; + + /** + * Write the body of a reverse index file, usually the forward index + * positions of the given objects, sorted by those objects' pack file + * offsets. + * + * @param objectsSortedByIndexPosition + * the objects whose forward index file positions should be + * written, sorted by forward index file position; not modified + * during method + * @throws IOException + * if writing the output fails + */ + protected abstract void writeBody( + List<? extends PackedObjectInfo> objectsSortedByIndexPosition) + throws IOException; + + private void writeFooter(byte[] packChecksum) throws IOException { + out.write(packChecksum); + byte[] selfChecksum = out.getMessageDigest().digest(); + out.write(selfChecksum); + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1.java new file mode 100644 index 0000000000..7630724d09 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndexWriterV1.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2023, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.storage.file; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; + +import org.eclipse.jgit.transport.PackedObjectInfo; +import org.eclipse.jgit.util.IntList; +import org.eclipse.jgit.util.IntList.IntComparator; + +/** + * Writes reverse index files following the version 1 format. + * <p> + * The file format is specified at + * https://git-scm.com/docs/pack-format#_pack_rev_files_have_the_format. + */ +final class PackReverseIndexWriterV1 extends PackReverseIndexWriter { + private static final int OID_VERSION_SHA1 = 1; + + private static final int DEFAULT_OID_VERSION = OID_VERSION_SHA1; + + PackReverseIndexWriterV1(final OutputStream dst) { + super(dst); + } + + @Override + protected void writeHeader() throws IOException { + out.write(MAGIC); + dataOutput.writeInt(VERSION_1); + dataOutput.writeInt(DEFAULT_OID_VERSION); + } + + @Override + protected void writeBody(List<? extends PackedObjectInfo> objectsByIndexPos) + throws IOException { + IntList positionsByOffset = IntList.filledWithRange(0, + objectsByIndexPos.size()); + positionsByOffset + .sort(new IndexPositionsByOffsetComparator(objectsByIndexPos)); + + for (int i = 0; i < positionsByOffset.size(); i++) { + int indexPosition = positionsByOffset.get(i); + dataOutput.writeInt(indexPosition); + } + } + + private static class IndexPositionsByOffsetComparator + implements IntComparator { + private List<? extends PackedObjectInfo> objectsByIndexPos; + + private IndexPositionsByOffsetComparator( + List<? extends PackedObjectInfo> objectsByIndexPos) { + this.objectsByIndexPos = objectsByIndexPos; + } + + @Override + public int compare(int firstIndexPosition, int secondIndexPosition) { + return Long.compare(getOffset(firstIndexPosition), + getOffset(secondIndexPosition)); + } + + private long getOffset(int indexPosition) { + return objectsByIndexPos.get(indexPosition).getOffset(); + } + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java index 8b0ea4fcd6..106313db63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java @@ -158,36 +158,40 @@ class PackedBatchRefUpdate extends BatchRefUpdate { } Map<String, LockFile> locks = null; + LockFile packedRefsLock = null; refdb.inProcessPackedRefsLock.lock(); try { - PackedRefList oldPackedList; + // During clone locking isn't needed since no refs exist yet. + // This also helps to avoid problems with refs only differing in + // case on a case insensitive filesystem (bug 528497) if (!refdb.isInClone() && shouldLockLooseRefs) { locks = lockLooseRefs(pending); if (locks == null) { return; } - oldPackedList = refdb.pack(locks); - } else { - // During clone locking isn't needed since no refs exist yet. - // This also helps to avoid problems with refs only differing in - // case on a case insensitive filesystem (bug 528497) - oldPackedList = refdb.getPackedRefs(); + refdb.pack(locks); } + + packedRefsLock = refdb.lockPackedRefsOrThrow(); + PackedRefList oldPackedList = refdb.refreshPackedRefs(); RefList<Ref> newRefs = applyUpdates(walk, oldPackedList, pending); if (newRefs == null) { return; } - LockFile packedRefsLock = refdb.lockPackedRefs(); - if (packedRefsLock == null) { - lockFailure(pending.get(0), pending); - return; - } - // commitPackedRefs removes lock file (by renaming over real file). refdb.commitPackedRefs(packedRefsLock, newRefs, oldPackedList, true); + } catch (LockFailedException e) { + lockFailure(pending.get(0), pending); + return; } finally { try { unlockAll(locks); + if (packedRefsLock != null) { + // This will be no-op if commitPackedRefs is successful as + // it will remove the lock file (by renaming over real + // file). + packedRefsLock.unlock(); + } } finally { refdb.inProcessPackedRefsLock.unlock(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java index e9abb02379..695721ec42 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java @@ -155,7 +155,7 @@ public class RefDirectory extends RefDatabase { * {@code RepositoryCache} is used, this lock instance will be used by all * threads. */ - final ReentrantLock inProcessPackedRefsLock = new ReentrantLock(true); + final ReentrantLock inProcessPackedRefsLock; /** * Number of modifications made to this database. @@ -179,6 +179,20 @@ public class RefDirectory extends RefDatabase { private final TrustPackedRefsStat trustPackedRefsStat; + RefDirectory(RefDirectory refDb) { + parent = refDb.parent; + gitDir = refDb.gitDir; + refsDir = refDb.refsDir; + logsDir = refDb.logsDir; + logsRefsDir = refDb.logsRefsDir; + packedRefsFile = refDb.packedRefsFile; + looseRefs.set(refDb.looseRefs.get()); + packedRefs.set(refDb.packedRefs.get()); + trustFolderStat = refDb.trustFolderStat; + trustPackedRefsStat = refDb.trustPackedRefsStat; + inProcessPackedRefsLock = refDb.inProcessPackedRefsLock; + } + RefDirectory(FileRepository db) { final FS fs = db.getFS(); parent = db; @@ -197,6 +211,7 @@ public class RefDirectory extends RefDatabase { .getEnum(ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_TRUST_PACKED_REFS_STAT, TrustPackedRefsStat.UNSET); + inProcessPackedRefsLock = new ReentrantLock(true); } Repository getRepository() { @@ -223,6 +238,15 @@ public class RefDirectory extends RefDatabase { return new File(logsDir, name); } + /** + * Create a cache of this {@link RefDirectory}. + * + * @return a cached RefDirectory. + */ + public SnapshottingRefDirectory createSnapshottingRefDirectory() { + return new SnapshottingRefDirectory(this); + } + /** {@inheritDoc} */ @Override public void create() throws IOException { @@ -575,18 +599,26 @@ public class RefDirectory extends RefDatabase { else { detachingSymbolicRef = detach && ref.isSymbolic(); } - RefDirectoryUpdate refDirUpdate = new RefDirectoryUpdate(this, ref); + RefDirectoryUpdate refDirUpdate = createRefDirectoryUpdate(ref); if (detachingSymbolicRef) refDirUpdate.setDetachingSymbolicRef(); return refDirUpdate; } + RefDirectoryUpdate createRefDirectoryUpdate(Ref ref) { + return new RefDirectoryUpdate(this, ref); + } + /** {@inheritDoc} */ @Override public RefDirectoryRename newRename(String fromName, String toName) throws IOException { RefDirectoryUpdate from = newUpdate(fromName, false); RefDirectoryUpdate to = newUpdate(toName, false); + return createRefDirectoryRename(from, to); + } + + RefDirectoryRename createRefDirectoryRename(RefDirectoryUpdate from, RefDirectoryUpdate to) { return new RefDirectoryRename(from, to); } @@ -643,16 +675,16 @@ public class RefDirectory extends RefDatabase { // Write the packed-refs file using an atomic update. We might // wind up reading it twice, before and after the lock, to ensure // we don't miss an edit made externally. - final PackedRefList packed = getPackedRefs(); + PackedRefList packed = getPackedRefs(); if (packed.contains(name)) { inProcessPackedRefsLock.lock(); try { LockFile lck = lockPackedRefsOrThrow(); try { - PackedRefList cur = readPackedRefs(); - int idx = cur.find(name); + packed = refreshPackedRefs(); + int idx = packed.find(name); if (0 <= idx) { - commitPackedRefs(lck, cur.remove(idx), packed, true); + commitPackedRefs(lck, packed.remove(idx), packed, true); } } finally { lck.unlock(); @@ -674,8 +706,7 @@ public class RefDirectory extends RefDatabase { int levels = levelsIn(name) - 2; delete(logFor(name), levels); if (dst.getStorage().isLoose()) { - update.unlock(); - delete(fileFor(name), levels); + deleteAndUnlock(fileFor(name), levels, update); } modCnt.incrementAndGet(); @@ -697,17 +728,17 @@ public class RefDirectory extends RefDatabase { pack(refs, Collections.emptyMap()); } - PackedRefList pack(Map<String, LockFile> heldLocks) throws IOException { - return pack(heldLocks.keySet(), heldLocks); + void pack(Map<String, LockFile> heldLocks) throws IOException { + pack(heldLocks.keySet(), heldLocks); } - private PackedRefList pack(Collection<String> refs, + private void pack(Collection<String> refs, Map<String, LockFile> heldLocks) throws IOException { for (LockFile ol : heldLocks.values()) { ol.requireLock(); } if (refs.isEmpty()) { - return null; + return; } FS fs = parent.getFS(); @@ -716,13 +747,13 @@ public class RefDirectory extends RefDatabase { try { LockFile lck = lockPackedRefsOrThrow(); try { - final PackedRefList packed = getPackedRefs(); - RefList<Ref> cur = readPackedRefs(); + PackedRefList oldPacked = refreshPackedRefs(); + RefList<Ref> newPacked = oldPacked; // Iterate over all refs to be packed boolean dirty = false; for (String refName : refs) { - Ref oldRef = readRef(refName, cur); + Ref oldRef = readRef(refName, newPacked); if (oldRef == null) { continue; // A non-existent ref is already correctly packed. } @@ -739,21 +770,20 @@ public class RefDirectory extends RefDatabase { } dirty = true; - int idx = cur.find(refName); + int idx = newPacked.find(refName); if (idx >= 0) { - cur = cur.set(idx, newRef); + newPacked = newPacked.set(idx, newRef); } else { - cur = cur.add(idx, newRef); + newPacked = newPacked.add(idx, newRef); } } if (!dirty) { // All requested refs were already packed accurately - return packed; + return; } // The new content for packed-refs is collected. Persist it. - PackedRefList result = commitPackedRefs(lck, cur, packed, - false); + commitPackedRefs(lck, newPacked, oldPacked,false); // Now delete the loose refs which are now packed for (String refName : refs) { @@ -780,9 +810,9 @@ public class RefDirectory extends RefDatabase { if (currentLooseRef == null || currentLooseRef.isSymbolic()) { continue; } - Ref packedRef = cur.get(refName); + Ref packedRef = newPacked.get(refName); ObjectId clr_oid = currentLooseRef.getObjectId(); - if (clr_oid != null + if (clr_oid != null && packedRef != null && clr_oid.equals(packedRef.getObjectId())) { RefList<LooseRef> curLoose, newLoose; do { @@ -794,7 +824,7 @@ public class RefDirectory extends RefDatabase { newLoose = curLoose.remove(idx); } while (!looseRefs.compareAndSet(curLoose, newLoose)); int levels = levelsIn(refName) - 2; - delete(refFile, levels, rLck); + deleteAndUnlock(refFile, levels, rLck); } } finally { if (shouldUnlock) { @@ -804,7 +834,6 @@ public class RefDirectory extends RefDatabase { } // Don't fire refsChanged. The refs have not change, only their // storage. - return result; } finally { lck.unlock(); } @@ -825,7 +854,7 @@ public class RefDirectory extends RefDatabase { return null; } - private LockFile lockPackedRefsOrThrow() throws IOException { + LockFile lockPackedRefsOrThrow() throws IOException { LockFile lck = lockPackedRefs(); if (lck == null) { throw new LockFailedException(packedRefsFile); @@ -924,9 +953,18 @@ public class RefDirectory extends RefDatabase { break; } + return refreshPackedRefs(curList); + } + + PackedRefList refreshPackedRefs() throws IOException { + return refreshPackedRefs(packedRefs.get()); + } + + private PackedRefList refreshPackedRefs(PackedRefList curList) + throws IOException { final PackedRefList newList = readPackedRefs(); - if (packedRefs.compareAndSet(curList, newList) - && !curList.id.equals(newList.id)) { + if (packedRefs.compareAndSet(curList, newList) && !curList.id.equals( + newList.id)) { modCnt.incrementAndGet(); } return newList; @@ -957,6 +995,13 @@ public class RefDirectory extends RefDatabase { } } + void compareAndSetPackedRefs(PackedRefList curList, PackedRefList newList) { + if (packedRefs.compareAndSet(curList, newList) + && !curList.id.equals(newList.id)) { + modCnt.incrementAndGet(); + } + } + private RefList<Ref> parsePackedRefs(BufferedReader br) throws IOException { RefList.Builder<Ref> all = new RefList.Builder<>(); @@ -1015,12 +1060,9 @@ public class RefDirectory extends RefDatabase { return new StringBuilder(end - off).append(src, off, end).toString(); } - PackedRefList commitPackedRefs(final LockFile lck, final RefList<Ref> refs, + void commitPackedRefs(final LockFile lck, final RefList<Ref> refs, final PackedRefList oldPackedList, boolean changed) throws IOException { - // Can't just return packedRefs.get() from this method; it might have been - // updated again after writePackedRefs() returns. - AtomicReference<PackedRefList> result = new AtomicReference<>(); new RefWriter(refs) { @Override protected void writeFile(String name, byte[] content) @@ -1051,10 +1093,8 @@ public class RefDirectory extends RefDatabase { if (changed) { modCnt.incrementAndGet(); } - result.set(newPackedList); } }.writePackedRefs(); - return result.get(); } private Ref readRef(String name, RefList<Ref> packed) throws IOException { @@ -1234,7 +1274,7 @@ public class RefDirectory extends RefDatabase { File tmp = File.createTempFile("renamed_", "_ref", refsDir); //$NON-NLS-1$ //$NON-NLS-2$ String name = Constants.R_REFS + tmp.getName(); Ref ref = new ObjectIdRef.Unpeeled(NEW, name, null); - return new RefDirectoryUpdate(this, ref); + return createRefDirectoryUpdate(ref); } /** @@ -1261,19 +1301,37 @@ public class RefDirectory extends RefDatabase { } static void delete(File file, int depth) throws IOException { - delete(file, depth, null); + delete(file); + deleteEmptyParentDirs(file, depth); } - private static void delete(File file, int depth, LockFile rLck) - throws IOException { + private static void delete(File file) throws IOException { if (!file.delete() && file.isFile()) { - throw new IOException(MessageFormat.format( - JGitText.get().fileCannotBeDeleted, file)); + throw new IOException( + MessageFormat.format(JGitText.get().fileCannotBeDeleted, + file)); } + } + private static void deleteAndUnlock(File file, int depth, + RefDirectoryUpdate refUpdate) throws IOException { + delete(file); + if (refUpdate != null) { + refUpdate.unlock(); // otherwise cannot delete parent directories emptied by the update + } + deleteEmptyParentDirs(file, depth); + } + + private static void deleteAndUnlock(File file, int depth, LockFile rLck) + throws IOException { + delete(file); if (rLck != null) { - rLck.unlock(); // otherwise cannot delete dir below + rLck.unlock(); // otherwise cannot delete parent directories of the lock file } + deleteEmptyParentDirs(file, depth); + } + + private static void deleteEmptyParentDirs(File file, int depth) { File dir = file.getParentFile(); for (int i = 0; i < depth; ++i) { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java index 2c0ade681b..d07299e45a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java @@ -59,6 +59,15 @@ class RefDirectoryRename extends RefRename { refdb = src.getRefDatabase(); } + /** + * Get the ref directory associated with this rename. + * + * @return the ref directory. + */ + protected RefDirectory getRefDirectory() { + return refdb; + } + /** {@inheritDoc} */ @Override protected Result doRename() throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java index 0dcb3196c5..62373a0a7b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java @@ -54,6 +54,7 @@ class RefDirectoryUpdate extends RefUpdate { String name = dst.getName(); lock = new LockFile(database.fileFor(name)); if (lock.lock()) { + doAfterLocking(name); dst = database.findRef(name); setOldObjectId(dst != null ? dst.getObjectId() : null); return true; @@ -141,4 +142,14 @@ class RefDirectoryUpdate extends RefUpdate { return Result.NEW; return Result.FORCED; } + + /** + * Do any actions needed immediately after a lock on the ref is acquired + * + * @param name + * the name of the reference. + */ + protected void doAfterLocking(String name) { + // No actions by default + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java new file mode 100644 index 0000000000..eaa26ed4f3 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. + * 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 v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.internal.storage.file; + +import org.eclipse.jgit.lib.ProgressMonitor; +import org.eclipse.jgit.lib.Ref; +import org.eclipse.jgit.lib.RefUpdate; +import org.eclipse.jgit.revwalk.RevWalk; + +import java.io.IOException; +import java.util.List; + +/** + * Snapshotting write-through cache of a {@link RefDirectory}. + * <p> + * This is intended to be short-term write-through snapshot based cache used in + * a request scope to avoid re-reading packed-refs on each read. A future + * improvement could also snapshot loose refs. + * <p> + * Only use this class when concurrent writes from other requests (not using the + * same instance of SnapshottingRefDirectory) generally need not be visible to + * the current request. The exception to this is when such writes would cause + * writes from this snapshot to fail due to their base ref value being + * outdated. + */ +class SnapshottingRefDirectory extends RefDirectory { + final RefDirectory refDb; + + private volatile boolean isValid; + + /** + * Create a snapshotting write-through cache of a {@link RefDirectory}. + * + * @param refDb + * a reference to the ref database + */ + SnapshottingRefDirectory(RefDirectory refDb) { + super(refDb); + this.refDb = refDb; + } + + /** + * Lazily initializes and returns a PackedRefList snapshot. + * <p> + * A newer snapshot will be returned when a ref update is performed using + * this {@link SnapshottingRefDirectory}. + */ + @Override + PackedRefList getPackedRefs() throws IOException { + if (!isValid) { + synchronized (this) { + if (!isValid) { + refreshSnapshot(); + } + } + } + return packedRefs.get(); + } + + /** {@inheritDoc} */ + @Override + void delete(RefDirectoryUpdate update) throws IOException { + refreshSnapshot(); + super.delete(update); + } + + /** {@inheritDoc} */ + @Override + public RefDirectoryUpdate newUpdate(String name, boolean detach) + throws IOException { + refreshSnapshot(); + return super.newUpdate(name, detach); + } + + /** {@inheritDoc} */ + @Override + public PackedBatchRefUpdate newBatchUpdate() { + return new SnapshotPackedBatchRefUpdate(this); + } + + /** {@inheritDoc} */ + @Override + public PackedBatchRefUpdate newBatchUpdate(boolean shouldLockLooseRefs) { + return new SnapshotPackedBatchRefUpdate(this, shouldLockLooseRefs); + } + + /** {@inheritDoc} */ + @Override + RefDirectoryUpdate newTemporaryUpdate() throws IOException { + refreshSnapshot(); + return super.newTemporaryUpdate(); + } + + @Override + RefDirectoryUpdate createRefDirectoryUpdate(Ref ref) { + return new SnapshotRefDirectoryUpdate(this, ref); + } + + @Override + RefDirectoryRename createRefDirectoryRename(RefDirectoryUpdate from, + RefDirectoryUpdate to) { + return new SnapshotRefDirectoryRename(from, to); + } + + synchronized void invalidateSnapshot() { + isValid = false; + } + + /** + * Refresh our snapshot by calling the underlying RefDirectory's + * getPackedRefs(). + * <p> + * Update the in-memory copy of the underlying RefDirectory's packed-refs to + * avoid the overhead of re-reading packed-refs on each new snapshot as the + * packed-refs of the underlying RefDirectory may not get updated if most + * threads use this snapshot. + * + * @throws IOException + * if an IO error occurred + */ + private synchronized void refreshSnapshot() throws IOException { + compareAndSetPackedRefs(packedRefs.get(), refDb.getPackedRefs()); + isValid = true; + } + + @FunctionalInterface + private interface SupplierThrowsException<R, E extends Exception> { + R call() throws E; + } + + @FunctionalInterface + private interface FunctionThrowsException<A, R, E extends Exception> { + R apply(A a) throws E; + } + + @FunctionalInterface + private interface TriConsumerThrowsException<A1, A2, A3, E extends Exception> { + void accept(A1 a1, A2 a2, A3 a3) throws E; + } + + private static <T> T invalidateSnapshotOnError( + SupplierThrowsException<T, IOException> f, SnapshottingRefDirectory refDb) + throws IOException { + return invalidateSnapshotOnError(a -> f.call(), null, refDb); + } + + private static <A, R> R invalidateSnapshotOnError( + FunctionThrowsException<A, R, IOException> f, A a, + SnapshottingRefDirectory refDb) throws IOException { + try { + return f.apply(a); + } catch (IOException e) { + refDb.invalidateSnapshot(); + throw e; + } + } + + private static <A1, A2, A3> void invalidateSnapshotOnError( + TriConsumerThrowsException<A1, A2, A3, IOException> f, A1 a1, A2 a2, + A3 a3, SnapshottingRefDirectory refDb) throws IOException { + try { + f.accept(a1, a2, a3); + } catch (IOException e) { + refDb.invalidateSnapshot(); + throw e; + } + } + + private static class SnapshotRefDirectoryUpdate extends RefDirectoryUpdate { + SnapshotRefDirectoryUpdate(RefDirectory r, Ref ref) { + super(r, ref); + } + + @Override + public Result forceUpdate() throws IOException { + return invalidateSnapshotOnError(super::forceUpdate, + getRefDatabase()); + } + + @Override + public Result update() throws IOException { + return invalidateSnapshotOnError(super::update, getRefDatabase()); + } + + @Override + public Result update(RevWalk walk) throws IOException { + return invalidateSnapshotOnError(super::update, walk, + getRefDatabase()); + } + + @Override + public Result delete() throws IOException { + return invalidateSnapshotOnError(super::delete, getRefDatabase()); + } + + @Override + public Result delete(RevWalk walk) throws IOException { + return invalidateSnapshotOnError(super::delete, walk, + getRefDatabase()); + } + + @Override + public Result link(String target) throws IOException { + return invalidateSnapshotOnError(super::link, target, + getRefDatabase()); + } + + /** + * Invalidate the SnapshottingRefDirectory snapshot after locking the + * ref. + * <p> + * Doing this after locking the ref ensures that the upcoming write is + * not based on a cached value. + * + * @param name + * the name of the reference. + */ + @Override + protected void doAfterLocking(String name) { + getRefDatabase().invalidateSnapshot(); + } + + @Override + public SnapshottingRefDirectory getRefDatabase() { + return (SnapshottingRefDirectory) super.getRefDatabase(); + } + } + + private static class SnapshotRefDirectoryRename extends RefDirectoryRename { + SnapshotRefDirectoryRename(RefDirectoryUpdate src, + RefDirectoryUpdate dst) { + super(src, dst); + } + + @Override + public RefUpdate.Result rename() throws IOException { + return invalidateSnapshotOnError(super::rename, getRefDirectory()); + } + + @Override + public SnapshottingRefDirectory getRefDirectory() { + return (SnapshottingRefDirectory) super.getRefDirectory(); + } + } + + private static class SnapshotPackedBatchRefUpdate + extends PackedBatchRefUpdate { + SnapshotPackedBatchRefUpdate(RefDirectory refdb) { + super(refdb); + } + + SnapshotPackedBatchRefUpdate(RefDirectory refdb, + boolean shouldLockLooseRefs) { + super(refdb, shouldLockLooseRefs); + } + + @Override + public void execute(RevWalk walk, ProgressMonitor monitor, + List<String> options) throws IOException { + invalidateSnapshotOnError(super::execute, + walk, monitor, options, getRefDatabase()); + } + + @Override + public void execute(RevWalk walk, ProgressMonitor monitor) + throws IOException { + invalidateSnapshotOnError((rw, m, a3) -> super.execute(rw, m), walk, + monitor, null, getRefDatabase()); + } + + @Override + public SnapshottingRefDirectory getRefDatabase() { + return (SnapshottingRefDirectory) super.getRefDatabase(); + } + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java index adad411c6f..d580083795 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java @@ -71,6 +71,15 @@ public enum PackExt { return 1 << getPosition(); } + /** + * Format a temporary file extension for this PackExt. + * + * @return a temporary file extension + */ + public String getTmpExtension() { + return String.format(".%s_tmp", ext); //$NON-NLS-1$ + } + /** {@inheritDoc} */ @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java index 60edc76997..9f8ab351f6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java @@ -62,6 +62,7 @@ import org.eclipse.jgit.internal.storage.file.PackBitmapIndexBuilder; import org.eclipse.jgit.internal.storage.file.PackBitmapIndexWriterV1; import org.eclipse.jgit.internal.storage.file.PackIndexWriter; import org.eclipse.jgit.internal.storage.file.PackObjectSizeIndexWriter; +import org.eclipse.jgit.internal.storage.file.PackReverseIndexWriter; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.AsyncObjectSizeQueue; import org.eclipse.jgit.lib.BatchingProgressMonitor; @@ -1159,6 +1160,38 @@ public class PackWriter implements AutoCloseable { } /** + * Whether the writer will write a reverse index file. The configuration + * flag must be on and the writer must be able to write corresponding + * forward index. + * + * @return whether the writer will write a reverse index file + */ + public boolean isReverseIndexEnabled() { + // Only write the reverse index if the writer is configured to and the + // forward index that it would correspond to will be written. + return config.isWriteReverseIndex() && !isIndexDisabled(); + } + + /** + * Write the pack's reverse index file to the output stream. + * + * @param stream + * where to write the file contents to + * @throws IOException + * if writing to the stream fails + */ + public void writeReverseIndex(OutputStream stream) throws IOException { + if (!isReverseIndexEnabled()) { + return; + } + long writeStart = System.currentTimeMillis(); + PackReverseIndexWriter writer = PackReverseIndexWriter + .createWriter(stream); + writer.write(sortByName(), packcsum); + stats.timeWriting += System.currentTimeMillis() - writeStart; + } + + /** * Create a bitmap index file to match the pack file just written. * <p> * Called after {@link #prepareBitmapIndex(ProgressMonitor)}. @@ -1712,6 +1745,11 @@ public class PackWriter implements AutoCloseable { } throw new IOException(JGitText .get().packingCancelledDuringObjectsWriting, e); + } catch (Throwable e) { + if (e1 != null) { + e.addSuppressed(e1); + } + throw e; } } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java index e2bebfefdb..d2367cc3d5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java @@ -521,6 +521,16 @@ public class BatchRefUpdate { monitor.endTask(); } + /** + * Get the ref database associated with this update. + * + * @return the ref database. + * @since 6.6 + */ + protected RefDatabase getRefDatabase() { + return refdb; + } + private static boolean isMissing(RevWalk walk, ObjectId id) throws IOException { if (id.equals(ObjectId.zeroId())) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index 7d6f40a51b..056861d85a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -751,6 +751,13 @@ public final class ConfigConstants { public static final String CONFIG_KEY_BITMAP_RECENT_COMMIT_COUNT = "bitmaprecentcommitspan"; /** + * The "pack.writeReverseIndex" key + * + * @since 6.6 + */ + public static final String CONFIG_KEY_WRITE_REVERSE_INDEX = "writeReverseIndex"; + + /** * The "pack.buildBitmaps" key * @since 5.8 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileModeCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileModeCache.java new file mode 100644 index 0000000000..073bf7a0ca --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileModeCache.java @@ -0,0 +1,309 @@ +/* + * Copyright (C) 2023, Thomas Wolf <twolf@apache.org> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.lib; + +import java.io.File; +import java.io.IOException; +import java.nio.file.InvalidPathException; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import java.nio.file.attribute.BasicFileAttributeView; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.jgit.annotations.NonNull; +import org.eclipse.jgit.util.FS; +import org.eclipse.jgit.util.FileUtils; + +/** + * A hierarchical cache of {@link FileMode}s per git path. + * + * @since 6.6.1 + */ +public class FileModeCache { + + @NonNull + private final CacheItem root = new CacheItem(FileMode.TREE); + + @NonNull + private final Repository repo; + + /** + * Creates a new {@link FileModeCache} for a {@link Repository}. + * + * @param repo + * {@link Repository} this cache is for + */ + public FileModeCache(@NonNull Repository repo) { + this.repo = repo; + } + + /** + * Retrieves the {@link Repository}. + * + * @return the {@link Repository} this {@link FileModeCache} was created for + */ + @NonNull + public Repository getRepository() { + return repo; + } + + /** + * Obtains the {@link CacheItem} for the working tree root. + * + * @return the {@link CacheItem} + */ + @NonNull + public CacheItem getRoot() { + return root; + } + + /** + * Ensure that the given parent directory exists, and cache the information + * that gitPath refers to a file. + * + * @param gitPath + * of the file to be written + * @param parentDir + * directory in which the file shall be placed, assumed to be the + * parent of the {@code gitPath} + * @param makeSpace + * whether to delete a possibly existing file at + * {@code parentDir} + * @throws IOException + * if the directory cannot be created, if necessary + */ + public void safeCreateParentDirectory(String gitPath, File parentDir, + boolean makeSpace) throws IOException { + CacheItem cachedParent = safeCreateDirectory(gitPath, parentDir, + makeSpace); + cachedParent.remove(gitPath.substring(gitPath.lastIndexOf('/') + 1)); + } + + /** + * Ensures the given directory {@code dir} with the given git path exists. + * + * @param gitPath + * of a file to be written + * @param dir + * directory in which the file shall be placed, assumed to be the + * parent of the {@code gitPath} + * @param makeSpace + * whether to remove a file that already at that name + * @return A {@link CacheItem} describing the directory, which is guaranteed + * to exist + * @throws IOException + * if the directory cannot be made to exist at the given + * location + */ + public CacheItem safeCreateDirectory(String gitPath, File dir, + boolean makeSpace) throws IOException { + FS fs = repo.getFS(); + int i = gitPath.lastIndexOf('/'); + String parentPath = null; + if (i >= 0) { + if ((makeSpace && dir.isFile()) || fs.isSymLink(dir)) { + FileUtils.delete(dir); + } + parentPath = gitPath.substring(0, i); + deleteSymlinkParent(fs, parentPath, repo.getWorkTree()); + } + FileUtils.mkdirs(dir, true); + CacheItem cachedParent = getRoot(); + if (parentPath != null) { + cachedParent = add(parentPath, FileMode.TREE); + } + return cachedParent; + } + + private void deleteSymlinkParent(FS fs, String gitPath, File workingTree) + throws IOException { + if (!fs.supportsSymlinks()) { + return; + } + String[] parts = gitPath.split("/"); //$NON-NLS-1$ + int n = parts.length; + CacheItem cached = getRoot(); + File p = workingTree; + for (int i = 0; i < n; i++) { + p = new File(p, parts[i]); + CacheItem cachedChild = cached != null ? cached.child(parts[i]) + : null; + boolean delete = false; + if (cachedChild != null) { + if (FileMode.SYMLINK.equals(cachedChild.getMode())) { + delete = true; + } + } else { + try { + Path nioPath = FileUtils.toPath(p); + BasicFileAttributes attributes = nioPath.getFileSystem() + .provider() + .getFileAttributeView(nioPath, + BasicFileAttributeView.class, + LinkOption.NOFOLLOW_LINKS) + .readAttributes(); + if (attributes.isSymbolicLink()) { + delete = p.isDirectory(); + } else if (attributes.isRegularFile()) { + break; + } + } catch (InvalidPathException | IOException e) { + // If we can't get the attributes the path does not exist, + // or if it does a subsequent mkdirs() will also throw an + // exception. + break; + } + } + if (delete) { + // Deletes the symlink + FileUtils.delete(p, FileUtils.SKIP_MISSING); + if (cached != null) { + cached.remove(parts[i]); + } + break; + } + cached = cachedChild; + } + } + + /** + * Records the given {@link FileMode} for the given git path in the cache. + * If an entry already exists for the given path, the previously cached file + * mode is overwritten. + * + * @param gitPath + * to cache the {@link FileMode} for + * @param finalMode + * {@link FileMode} to cache + * @return the {@link CacheItem} for the path + */ + @NonNull + private CacheItem add(String gitPath, FileMode finalMode) { + if (gitPath.isEmpty()) { + throw new IllegalArgumentException(); + } + String[] parts = gitPath.split("/"); //$NON-NLS-1$ + int n = parts.length; + int i = 0; + CacheItem curr = getRoot(); + while (i < n) { + CacheItem next = curr.child(parts[i]); + if (next == null) { + break; + } + curr = next; + i++; + } + if (i == n) { + curr.setMode(finalMode); + } else { + while (i < n) { + curr = curr.insert(parts[i], + i + 1 == n ? finalMode : FileMode.TREE); + i++; + } + } + return curr; + } + + /** + * An item from a {@link FileModeCache}, recording information about a git + * path (known from context). + */ + public static class CacheItem { + + @NonNull + private FileMode mode; + + private Map<String, CacheItem> children; + + /** + * Creates a new {@link CacheItem}. + * + * @param mode + * {@link FileMode} to cache + */ + public CacheItem(@NonNull FileMode mode) { + this.mode = mode; + } + + /** + * Retrieves the cached {@link FileMode}. + * + * @return the {@link FileMode} + */ + @NonNull + public FileMode getMode() { + return mode; + } + + /** + * Retrieves an immediate child of this {@link CacheItem} by name. + * + * @param childName + * name of the child to get + * @return the {@link CacheItem}, or {@code null} if no such child is + * known + */ + public CacheItem child(String childName) { + if (children == null) { + return null; + } + return children.get(childName); + } + + /** + * Inserts a new cached {@link FileMode} as an immediate child of this + * {@link CacheItem}. If there is already a child with the same name, it + * is overwritten. + * + * @param childName + * name of the child to create + * @param childMode + * {@link FileMode} to cache + * @return the new {@link CacheItem} created for the child + */ + public CacheItem insert(String childName, @NonNull FileMode childMode) { + if (!FileMode.TREE.equals(mode)) { + throw new IllegalArgumentException(); + } + if (children == null) { + children = new HashMap<>(); + } + CacheItem newItem = new CacheItem(childMode); + children.put(childName, newItem); + return newItem; + } + + /** + * Removes the immediate child with the given name. + * + * @param childName + * name of the child to remove + * @return the previously cached {@link CacheItem}, if any + */ + public CacheItem remove(String childName) { + if (children == null) { + return null; + } + return children.remove(childName); + } + + void setMode(@NonNull FileMode mode) { + this.mode = mode; + if (!FileMode.TREE.equals(mode)) { + children = null; + } + } + } + +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java index e56513d4e9..04c17be392 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -3,8 +3,8 @@ * Copyright (C) 2010-2012, Matthias Sohn <matthias.sohn@sap.com> * Copyright (C) 2012, Research In Motion Limited * Copyright (C) 2017, Obeo (mathieu.cartaud@obeo.fr) - * Copyright (C) 2018, 2022 Thomas Wolf <twolf@apache.org> - * Copyright (C) 2022, Google Inc. and others + * Copyright (C) 2018, 2023 Thomas Wolf <twolf@apache.org> + * Copyright (C) 2023, Google Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -47,6 +47,7 @@ import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm; import org.eclipse.jgit.diff.RawText; import org.eclipse.jgit.diff.RawTextComparator; import org.eclipse.jgit.diff.Sequence; +import org.eclipse.jgit.dircache.Checkout; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheBuildIterator; import org.eclipse.jgit.dircache.DirCacheBuilder; @@ -79,7 +80,6 @@ import org.eclipse.jgit.treewalk.TreeWalk.OperationType; import org.eclipse.jgit.treewalk.WorkingTreeIterator; import org.eclipse.jgit.treewalk.WorkingTreeOptions; import org.eclipse.jgit.treewalk.filter.TreeFilter; -import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.LfsFactory; import org.eclipse.jgit.util.LfsFactory.LfsInputStream; import org.eclipse.jgit.util.TemporaryBuffer; @@ -205,6 +205,12 @@ public class ResolveMerger extends ThreeWayMerger { private boolean indexChangesWritten; /** + * {@link Checkout} to use for actually checking out files if + * {@link #inCore} is {@code false}. + */ + private Checkout checkout; + + /** * @param repo * the {@link Repository}. * @param dirCache @@ -223,6 +229,7 @@ public class ResolveMerger extends ThreeWayMerger { this.inCoreFileSizeLimit = getInCoreFileSizeLimit(config); this.checkoutMetadataByPath = new HashMap<>(); this.cleanupMetadataByPath = new HashMap<>(); + this.checkout = new Checkout(nonNullRepo(), workingTreeOptions); } /** @@ -350,9 +357,8 @@ public class ResolveMerger extends ThreeWayMerger { } // All content operations are successfully done. If we can now write - // the - // new index we are on quite safe ground. Even if the checkout of - // files coming from "theirs" fails the user can work around such + // the new index we are on quite safe ground. Even if the checkout + // of files coming from "theirs" fails the user can work around such // failures by checking out the index again. if (!builder.commit()) { revertModifiedFiles(); @@ -518,14 +524,14 @@ public class ResolveMerger extends ThreeWayMerger { for (Map.Entry<String, DirCacheEntry> entry : toBeCheckedOut .entrySet()) { DirCacheEntry dirCacheEntry = entry.getValue(); + String gitPath = entry.getKey(); if (dirCacheEntry.getFileMode() == FileMode.GITLINK) { - new File(nonNullRepo().getWorkTree(), entry.getKey()) - .mkdirs(); + checkout.checkoutGitlink(dirCacheEntry, gitPath); } else { - DirCacheCheckout.checkoutEntry(repo, dirCacheEntry, reader, - false, checkoutMetadataByPath.get(entry.getKey()), - workingTreeOptions); - result.modifiedFiles.add(entry.getKey()); + checkout.checkout(dirCacheEntry, + checkoutMetadataByPath.get(gitPath), reader, + gitPath); + result.modifiedFiles.add(gitPath); } } } @@ -550,9 +556,8 @@ public class ResolveMerger extends ThreeWayMerger { for (String path : result.modifiedFiles) { DirCacheEntry entry = dirCache.getEntry(path); if (entry != null) { - DirCacheCheckout.checkoutEntry(repo, entry, reader, false, - cleanupMetadataByPath.get(path), - workingTreeOptions); + checkout.checkout(entry, cleanupMetadataByPath.get(path), + reader, path); } } } @@ -586,6 +591,8 @@ public class ResolveMerger extends ThreeWayMerger { if (inCore) { return; } + checkout.safeCreateParentDirectory(path, file.getParentFile(), + false); CheckoutMetadata metadata = new CheckoutMetadata(streamType, smudgeCommand); @@ -1576,15 +1583,11 @@ public class ResolveMerger extends ThreeWayMerger { Attributes attributes) throws IOException { File workTree = nonNullRepo().getWorkTree(); - FS fs = nonNullRepo().getFS(); - File of = new File(workTree, tw.getPathString()); - File parentFolder = of.getParentFile(); + String gitPath = tw.getPathString(); + File of = new File(workTree, gitPath); EolStreamType eol = workTreeUpdater.detectCheckoutStreamType(attributes); - if (!fs.exists(parentFolder)) { - parentFolder.mkdirs(); - } workTreeUpdater.updateFileWithContent(rawMerged::openInputStream, - eol, tw.getSmudgeCommand(attributes), of.getPath(), of); + eol, tw.getSmudgeCommand(attributes), gitPath, of); return of; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java index 98a2804ee4..04300a9765 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022, Google Inc. and others + * Copyright (C) 2023, Google Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -9,6 +9,11 @@ */ package org.eclipse.jgit.patch; +import static org.eclipse.jgit.diff.DiffEntry.ChangeType.ADD; +import static org.eclipse.jgit.diff.DiffEntry.ChangeType.COPY; +import static org.eclipse.jgit.diff.DiffEntry.ChangeType.DELETE; +import static org.eclipse.jgit.diff.DiffEntry.ChangeType.MODIFY; +import static org.eclipse.jgit.diff.DiffEntry.ChangeType.RENAME; import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; import java.io.ByteArrayInputStream; @@ -33,7 +38,6 @@ import java.util.stream.Collectors; import java.util.zip.InflaterInputStream; import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.api.errors.FilterFailedException; -import org.eclipse.jgit.api.errors.PatchApplyException; import org.eclipse.jgit.api.errors.PatchFormatException; import org.eclipse.jgit.attributes.Attribute; import org.eclipse.jgit.attributes.Attributes; @@ -48,6 +52,7 @@ import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata; import org.eclipse.jgit.dircache.DirCacheCheckout.StreamSupplier; import org.eclipse.jgit.dircache.DirCacheEntry; import org.eclipse.jgit.dircache.DirCacheIterator; +import org.eclipse.jgit.errors.CorruptObjectException; import org.eclipse.jgit.errors.IndexWriteException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.Config; @@ -55,6 +60,7 @@ import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.CoreConfig.EolStreamType; import org.eclipse.jgit.lib.FileMode; +import org.eclipse.jgit.lib.FileModeCache; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.ObjectLoader; @@ -77,6 +83,7 @@ import org.eclipse.jgit.util.LfsFactory; import org.eclipse.jgit.util.LfsFactory.LfsInputStream; import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.StringUtils; +import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.TemporaryBuffer; import org.eclipse.jgit.util.TemporaryBuffer.LocalFile; import org.eclipse.jgit.util.io.BinaryDeltaInputStream; @@ -134,11 +141,8 @@ public class PatchApplier { * ID of the tree to apply the patch in * @param oi * to be used for modifying objects - * @throws IOException - * in case of I/O errors */ - public PatchApplier(Repository repo, RevTree beforeTree, ObjectInserter oi) - throws IOException { + public PatchApplier(Repository repo, RevTree beforeTree, ObjectInserter oi) { this.repo = repo; this.beforeTree = beforeTree; inserter = oi; @@ -147,16 +151,48 @@ public class PatchApplier { /** * A wrapper for returning both the applied tree ID and the applied files - * list. + * list, as well as file specific errors. * * @since 6.3 */ public static class Result { + /** + * A wrapper for a patch applying error that affects a given file. + * + * @since 6.6 + */ + public static class Error { + + private String msg; + private String oldFileName; + private @Nullable HunkHeader hh; + + private Error(String msg, String oldFileName, + @Nullable HunkHeader hh) { + this.msg = msg; + this.oldFileName = oldFileName; + this.hh = hh; + } + + @Override + public String toString() { + if (hh != null) { + return MessageFormat.format(JGitText.get().patchApplyErrorWithHunk, + oldFileName, hh, msg); + } + return MessageFormat.format(JGitText.get().patchApplyErrorWithoutHunk, + oldFileName, msg); + } + + } + private ObjectId treeId; private List<String> paths; + private List<Error> errors = new ArrayList<>(); + /** * @return List of modified paths. */ @@ -170,6 +206,19 @@ public class PatchApplier { public ObjectId getTreeId() { return treeId; } + + /** + * @return Errors occurred while applying the patch. + * + * @since 6.6 + */ + public List<Error> getErrors() { + return errors; + } + + private void addError(String msg,String oldFileName, @Nullable HunkHeader hh) { + errors.add(new Error(msg, oldFileName, hh)); + } } /** @@ -180,12 +229,13 @@ public class PatchApplier { * @return the result of the patch * @throws PatchFormatException * if the patch cannot be parsed - * @throws PatchApplyException - * if the patch cannot be applied + * @throws IOException + * if the patch read fails + * @deprecated use {@link #applyPatch(Patch)} instead */ + @Deprecated public Result applyPatch(InputStream patchInput) - throws PatchFormatException, PatchApplyException { - Result result = new Result(); + throws PatchFormatException, IOException { Patch p = new Patch(); try (InputStream inStream = patchInput) { p.parse(inStream); @@ -193,105 +243,107 @@ public class PatchApplier { if (!p.getErrors().isEmpty()) { throw new PatchFormatException(p.getErrors()); } + } + return applyPatch(p); + } - DirCache dirCache = inCore() ? DirCache.read(reader, beforeTree) - : repo.lockDirCache(); - - DirCacheBuilder dirCacheBuilder = dirCache.builder(); - Set<String> modifiedPaths = new HashSet<>(); - for (FileHeader fh : p.getFiles()) { - ChangeType type = fh.getChangeType(); - switch (type) { - case ADD: { - File f = getFile(fh.getNewPath()); - if (f != null) { - try { - FileUtils.mkdirs(f.getParentFile(), true); - FileUtils.createNewFile(f); - } catch (IOException e) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().createNewFileFailed, f), e); - } - } - apply(fh.getNewPath(), dirCache, dirCacheBuilder, f, fh); + /** + * Applies the given patch + * + * @param p + * the patch to apply. + * @return the result of the patch + * @throws IOException + * @since 6.6 + */ + public Result applyPatch(Patch p) throws IOException { + Result result = new Result(); + DirCache dirCache = inCore() ? DirCache.read(reader, beforeTree) + : repo.lockDirCache(); + + FileModeCache directoryCache = new FileModeCache(repo); + DirCacheBuilder dirCacheBuilder = dirCache.builder(); + Set<String> modifiedPaths = new HashSet<>(); + for (FileHeader fh : p.getFiles()) { + ChangeType type = fh.getChangeType(); + File src = getFile(fh.getOldPath()); + File dest = getFile(fh.getNewPath()); + if (!verifyExistence(fh, src, dest, result)) { + continue; + } + switch (type) { + case ADD: { + if (dest != null) { + directoryCache.safeCreateParentDirectory(fh.getNewPath(), + dest.getParentFile(), false); + FileUtils.createNewFile(dest); } - break; - case MODIFY: - apply(fh.getOldPath(), dirCache, dirCacheBuilder, - getFile(fh.getOldPath()), fh); - break; - case DELETE: - if (!inCore()) { - File old = getFile(fh.getOldPath()); - if (!old.delete()) - throw new PatchApplyException(MessageFormat.format( - JGitText.get().cannotDeleteFile, old)); - } - break; - case RENAME: { - File src = getFile(fh.getOldPath()); - File dest = getFile(fh.getNewPath()); - - if (!inCore()) { - /* - * this is odd: we rename the file on the FS, but - * apply() will write a fresh stream anyway, which will - * overwrite if there were hunks in the patch. - */ - try { - FileUtils.mkdirs(dest.getParentFile(), true); - FileUtils.rename(src, dest, - StandardCopyOption.ATOMIC_MOVE); - } catch (IOException e) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().renameFileFailed, src, dest), - e); - } - } - String pathWithOriginalContent = inCore() ? - fh.getOldPath() : fh.getNewPath(); - apply(pathWithOriginalContent, dirCache, dirCacheBuilder, dest, fh); - break; + apply(fh.getNewPath(), dirCache, dirCacheBuilder, dest, fh, result); + } + break; + case MODIFY: { + apply(fh.getOldPath(), dirCache, dirCacheBuilder, src, fh, result); + break; + } + case DELETE: { + if (!inCore()) { + if (!src.delete()) + throw new IOException(MessageFormat.format( + JGitText.get().cannotDeleteFile, src)); } - case COPY: { - File dest = getFile(fh.getNewPath()); - if (!inCore()) { - File src = getFile(fh.getOldPath()); - FileUtils.mkdirs(dest.getParentFile(), true); - Files.copy(src.toPath(), dest.toPath()); - } - apply(fh.getOldPath(), dirCache, dirCacheBuilder, dest, fh); - break; + break; + } + case RENAME: { + if (!inCore()) { + /* + * this is odd: we rename the file on the FS, but + * apply() will write a fresh stream anyway, which will + * overwrite if there were hunks in the patch. + */ + directoryCache.safeCreateParentDirectory(fh.getNewPath(), + dest.getParentFile(), false); + FileUtils.rename(src, dest, + StandardCopyOption.ATOMIC_MOVE); } + String pathWithOriginalContent = inCore() ? + fh.getOldPath() : fh.getNewPath(); + apply(pathWithOriginalContent, dirCache, dirCacheBuilder, dest, fh, result); + break; + } + case COPY: { + if (!inCore()) { + directoryCache.safeCreateParentDirectory(fh.getNewPath(), + dest.getParentFile(), false); + Files.copy(src.toPath(), dest.toPath()); } - if (fh.getChangeType() != ChangeType.DELETE) - modifiedPaths.add(fh.getNewPath()); - if (fh.getChangeType() != ChangeType.COPY - && fh.getChangeType() != ChangeType.ADD) - modifiedPaths.add(fh.getOldPath()); + apply(fh.getOldPath(), dirCache, dirCacheBuilder, dest, fh, result); + break; } - - // We processed the patch. Now add things that weren't changed. - for (int i = 0; i < dirCache.getEntryCount(); i++) { - DirCacheEntry dce = dirCache.getEntry(i); - if (!modifiedPaths.contains(dce.getPathString()) - || dce.getStage() != DirCacheEntry.STAGE_0) - dirCacheBuilder.add(dce); } + if (fh.getChangeType() != DELETE) + modifiedPaths.add(fh.getNewPath()); + if (fh.getChangeType() != COPY + && fh.getChangeType() != ADD) + modifiedPaths.add(fh.getOldPath()); + } - if (inCore()) - dirCacheBuilder.finish(); - else if (!dirCacheBuilder.commit()) { - throw new IndexWriteException(); - } + // We processed the patch. Now add things that weren't changed. + for (int i = 0; i < dirCache.getEntryCount(); i++) { + DirCacheEntry dce = dirCache.getEntry(i); + if (!modifiedPaths.contains(dce.getPathString()) + || dce.getStage() != DirCacheEntry.STAGE_0) + dirCacheBuilder.add(dce); + } - result.treeId = dirCache.writeTree(inserter); - result.paths = modifiedPaths.stream().sorted() - .collect(Collectors.toList()); - } catch (IOException e) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().patchApplyException, e.getMessage()), e); + if (inCore()) + dirCacheBuilder.finish(); + else if (!dirCacheBuilder.commit()) { + throw new IndexWriteException(); } + + result.treeId = dirCache.writeTree(inserter); + result.paths = modifiedPaths.stream().sorted() + .collect(Collectors.toList()); return result; } @@ -302,36 +354,81 @@ public class PatchApplier { /* returns null if the path is not found. */ @Nullable private TreeWalk getTreeWalkForFile(String path, DirCache cache) - throws PatchApplyException { - try { - if (inCore()) { - // Only this branch may return null. - // TODO: it would be nice if we could return a TreeWalk at EOF - // iso. null. - return TreeWalk.forPath(repo, path, beforeTree); - } - TreeWalk walk = new TreeWalk(repo); - - // Use a TreeWalk with a DirCacheIterator to pick up the correct - // clean/smudge filters. - int cacheTreeIdx = walk.addTree(new DirCacheIterator(cache)); - FileTreeIterator files = new FileTreeIterator(repo); - if (FILE_TREE_INDEX != walk.addTree(files)) - throw new IllegalStateException(); - - walk.setFilter(AndTreeFilter.create( - PathFilterGroup.createFromStrings(path), - new NotIgnoredFilter(FILE_TREE_INDEX))); - walk.setOperationType(OperationType.CHECKIN_OP); - walk.setRecursive(true); - files.setDirCacheIterator(walk, cacheTreeIdx); - return walk; - } catch (IOException e) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().patchApplyException, e.getMessage()), e); + throws IOException { + if (inCore()) { + // Only this branch may return null. + // TODO: it would be nice if we could return a TreeWalk at EOF + // iso. null. + return TreeWalk.forPath(repo, path, beforeTree); + } + TreeWalk walk = new TreeWalk(repo); + + // Use a TreeWalk with a DirCacheIterator to pick up the correct + // clean/smudge filters. + int cacheTreeIdx = walk.addTree(new DirCacheIterator(cache)); + FileTreeIterator files = new FileTreeIterator(repo); + if (FILE_TREE_INDEX != walk.addTree(files)) + throw new IllegalStateException(); + + walk.setFilter(AndTreeFilter.create( + PathFilterGroup.createFromStrings(path), + new NotIgnoredFilter(FILE_TREE_INDEX))); + walk.setOperationType(OperationType.CHECKIN_OP); + walk.setRecursive(true); + files.setDirCacheIterator(walk, cacheTreeIdx); + return walk; + } + + private boolean fileExists(String path, @Nullable File f) + throws IOException { + if (f != null) { + return f.exists(); + } + return inCore() && TreeWalk.forPath(repo, path, beforeTree) != null; + } + + private boolean verifyExistence(FileHeader fh, File src, File dest, + Result result) throws IOException { + boolean isValid = true; + boolean srcShouldExist = List.of(MODIFY, DELETE, RENAME, COPY) + .contains(fh.getChangeType()); + boolean destShouldNotExist = List.of(ADD, RENAME, COPY) + .contains(fh.getChangeType()); + if (srcShouldExist != fileExists(fh.getOldPath(), src)) { + result.addError(MessageFormat.format(srcShouldExist + ? JGitText.get().applyPatchWithSourceOnNonExistentSource + : JGitText + .get().applyPatchWithoutSourceOnAlreadyExistingSource, + fh.getPatchType()), fh.getOldPath(), null); + isValid = false; + } + if (destShouldNotExist && fileExists(fh.getNewPath(), dest)) { + result.addError(MessageFormat.format(JGitText + .get().applyPatchWithCreationOverAlreadyExistingDestination, + fh.getPatchType()), fh.getNewPath(), null); + isValid = false; } + if (srcShouldExist && !validGitPath(fh.getOldPath())) { + result.addError(JGitText.get().applyPatchSourceInvalid, + fh.getOldPath(), null); + isValid = false; + } + if (destShouldNotExist && !validGitPath(fh.getNewPath())) { + result.addError(JGitText.get().applyPatchDestInvalid, + fh.getNewPath(), null); + isValid = false; + } + return isValid; } + private boolean validGitPath(String path) { + try { + SystemReader.getInstance().checkPath(path); + return true; + } catch (CorruptObjectException e) { + return false; + } + } private static final int FILE_TREE_INDEX = 1; /** @@ -348,135 +445,135 @@ public class PatchApplier { * The file to update with new contents. Null for inCore usage. * @param fh * The patch header. - * @throws PatchApplyException + * @param result + * The patch application result. + * @throws IOException */ private void apply(String pathWithOriginalContent, DirCache dirCache, - DirCacheBuilder dirCacheBuilder, @Nullable File f, FileHeader fh) - throws PatchApplyException { + DirCacheBuilder dirCacheBuilder, @Nullable File f, FileHeader fh, Result result) + throws IOException { if (PatchType.BINARY.equals(fh.getPatchType())) { // This patch type just says "something changed". We can't do // anything with that. // Maybe this should return an error code, though? return; } - try { - TreeWalk walk = getTreeWalkForFile(pathWithOriginalContent, dirCache); - boolean loadedFromTreeWalk = false; - // CR-LF handling is determined by whether the file or the patch - // have CR-LF line endings. - boolean convertCrLf = inCore() || needsCrLfConversion(f, fh); - EolStreamType streamType = convertCrLf ? EolStreamType.TEXT_CRLF + TreeWalk walk = getTreeWalkForFile(pathWithOriginalContent, dirCache); + boolean loadedFromTreeWalk = false; + // CR-LF handling is determined by whether the file or the patch + // have CR-LF line endings. + boolean convertCrLf = inCore() || needsCrLfConversion(f, fh); + EolStreamType streamType = convertCrLf ? EolStreamType.TEXT_CRLF + : EolStreamType.DIRECT; + String smudgeFilterCommand = null; + StreamSupplier fileStreamSupplier = null; + ObjectId fileId = ObjectId.zeroId(); + if (walk == null) { + // For new files with inCore()==true, TreeWalk.forPath can be + // null. Stay with defaults. + } else if (inCore()) { + fileId = walk.getObjectId(0); + ObjectLoader loader = LfsFactory.getInstance() + .applySmudgeFilter(repo, reader.open(fileId, OBJ_BLOB), + null); + byte[] data = loader.getBytes(); + convertCrLf = RawText.isCrLfText(data); + fileStreamSupplier = () -> new ByteArrayInputStream(data); + streamType = convertCrLf ? EolStreamType.TEXT_CRLF : EolStreamType.DIRECT; - String smudgeFilterCommand = null; - StreamSupplier fileStreamSupplier = null; - ObjectId fileId = ObjectId.zeroId(); - if (walk == null) { - // For new files with inCore()==true, TreeWalk.forPath can be - // null. Stay with defaults. - } else if (inCore()) { - fileId = walk.getObjectId(0); - ObjectLoader loader = LfsFactory.getInstance() - .applySmudgeFilter(repo, reader.open(fileId, OBJ_BLOB), - null); - byte[] data = loader.getBytes(); - convertCrLf = RawText.isCrLfText(data); - fileStreamSupplier = () -> new ByteArrayInputStream(data); - streamType = convertCrLf ? EolStreamType.TEXT_CRLF - : EolStreamType.DIRECT; - smudgeFilterCommand = walk - .getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE); + smudgeFilterCommand = walk + .getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE); + loadedFromTreeWalk = true; + } else if (walk.next()) { + // If the file on disk has no newline characters, + // convertCrLf will be false. In that case we want to honor the + // normal git settings. + streamType = convertCrLf ? EolStreamType.TEXT_CRLF + : walk.getEolStreamType(OperationType.CHECKOUT_OP); + smudgeFilterCommand = walk + .getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE); + FileTreeIterator file = walk.getTree(FILE_TREE_INDEX, + FileTreeIterator.class); + if (file != null) { + fileId = file.getEntryObjectId(); + fileStreamSupplier = file::openEntryStream; loadedFromTreeWalk = true; - } else if (walk.next()) { - // If the file on disk has no newline characters, - // convertCrLf will be false. In that case we want to honor the - // normal git settings. - streamType = convertCrLf ? EolStreamType.TEXT_CRLF - : walk.getEolStreamType(OperationType.CHECKOUT_OP); - smudgeFilterCommand = walk - .getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE); - FileTreeIterator file = walk.getTree(FILE_TREE_INDEX, - FileTreeIterator.class); - if (file != null) { - fileId = file.getEntryObjectId(); - fileStreamSupplier = file::openEntryStream; - loadedFromTreeWalk = true; - } else { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().cannotReadFile, - pathWithOriginalContent)); - } + } else { + throw new IOException(MessageFormat.format( + JGitText.get().cannotReadFile, + pathWithOriginalContent)); } + } - if (fileStreamSupplier == null) - fileStreamSupplier = inCore() ? InputStream::nullInputStream - : () -> new FileInputStream(f); + if (fileStreamSupplier == null) + fileStreamSupplier = inCore() ? InputStream::nullInputStream + : () -> new FileInputStream(f); + + FileMode fileMode = fh.getNewMode() != null ? fh.getNewMode() + : FileMode.REGULAR_FILE; + ContentStreamLoader resultStreamLoader; + if (PatchType.GIT_BINARY.equals(fh.getPatchType())) { + // binary patches are processed in a streaming fashion. Some + // binary patches do random access on the input data, so we can't + // overwrite the file while we're streaming. + resultStreamLoader = applyBinary(pathWithOriginalContent, f, fh, + fileStreamSupplier, fileId, result); + } else { + String filterCommand = walk != null + ? walk.getFilterCommand( + Constants.ATTR_FILTER_TYPE_CLEAN) + : null; + RawText raw = getRawText(f, fileStreamSupplier, fileId, + pathWithOriginalContent, loadedFromTreeWalk, filterCommand, + convertCrLf); + resultStreamLoader = applyText(raw, fh, result); + } + if (resultStreamLoader == null || !result.getErrors().isEmpty()) { + return; + } - FileMode fileMode = fh.getNewMode() != null ? fh.getNewMode() - : FileMode.REGULAR_FILE; - ContentStreamLoader resultStreamLoader; - if (PatchType.GIT_BINARY.equals(fh.getPatchType())) { - // binary patches are processed in a streaming fashion. Some - // binary patches do random access on the input data, so we can't - // overwrite the file while we're streaming. - resultStreamLoader = applyBinary(pathWithOriginalContent, f, fh, - fileStreamSupplier, fileId); - } else { - String filterCommand = walk != null - ? walk.getFilterCommand( - Constants.ATTR_FILTER_TYPE_CLEAN) - : null; - RawText raw = getRawText(f, fileStreamSupplier, fileId, - pathWithOriginalContent, loadedFromTreeWalk, filterCommand, - convertCrLf); - resultStreamLoader = applyText(raw, fh); - } - - if (f != null) { - // Write to a buffer and copy to the file only if everything was - // fine. - TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null); - try { - CheckoutMetadata metadata = new CheckoutMetadata(streamType, - smudgeFilterCommand); - - try (TemporaryBuffer buf = buffer) { - DirCacheCheckout.getContent(repo, pathWithOriginalContent, - metadata, resultStreamLoader.supplier, workingTreeOptions, - buf); - } - try (InputStream bufIn = buffer.openInputStream()) { - Files.copy(bufIn, f.toPath(), - StandardCopyOption.REPLACE_EXISTING); - } - } finally { - buffer.destroy(); + if (f != null) { + // Write to a buffer and copy to the file only if everything was + // fine. + TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null); + try { + CheckoutMetadata metadata = new CheckoutMetadata(streamType, + smudgeFilterCommand); + + try (TemporaryBuffer buf = buffer) { + DirCacheCheckout.getContent(repo, pathWithOriginalContent, + metadata, resultStreamLoader.supplier, workingTreeOptions, + buf); } - - repo.getFS().setExecute(f, - fileMode == FileMode.EXECUTABLE_FILE); - } - - Instant lastModified = f == null ? null - : repo.getFS().lastModifiedInstant(f); - Attributes attributes = walk != null ? walk.getAttributes() - : new Attributes(); - - DirCacheEntry dce = insertToIndex( - resultStreamLoader.supplier.load(), - fh.getNewPath().getBytes(StandardCharsets.UTF_8), fileMode, - lastModified, resultStreamLoader.length, - attributes.get(Constants.ATTR_FILTER)); - dirCacheBuilder.add(dce); - if (PatchType.GIT_BINARY.equals(fh.getPatchType()) - && fh.getNewId() != null && fh.getNewId().isComplete() - && !fh.getNewId().toObjectId().equals(dce.getObjectId())) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().applyBinaryResultOidWrong, - pathWithOriginalContent)); + try (InputStream bufIn = buffer.openInputStream()) { + Files.copy(bufIn, f.toPath(), + StandardCopyOption.REPLACE_EXISTING); + } + } finally { + buffer.destroy(); } - } catch (IOException | UnsupportedOperationException e) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().patchApplyException, e.getMessage()), e); + + repo.getFS().setExecute(f, + fileMode == FileMode.EXECUTABLE_FILE); + } + + Instant lastModified = f == null ? null + : repo.getFS().lastModifiedInstant(f); + Attributes attributes = walk != null ? walk.getAttributes() + : new Attributes(); + + DirCacheEntry dce = insertToIndex( + resultStreamLoader.supplier.load(), + fh.getNewPath().getBytes(StandardCharsets.UTF_8), fileMode, + lastModified, resultStreamLoader.length, + attributes.get(Constants.ATTR_FILTER)); + dirCacheBuilder.add(dce); + if (PatchType.GIT_BINARY.equals(fh.getPatchType()) + && fh.getNewId() != null && fh.getNewId().isComplete() + && !fh.getNewId().toObjectId().equals(dce.getObjectId())) { + result.addError(MessageFormat.format( + JGitText.get().applyBinaryResultOidWrong, + pathWithOriginalContent), fh.getOldPath(), null); } } @@ -640,12 +737,12 @@ public class PatchApplier { } } - private void checkOid(ObjectId baseId, ObjectId id, ChangeType type, File f, - String path) throws PatchApplyException, IOException { + private boolean checkOid(ObjectId baseId, ObjectId id, ChangeType type, File f, + String path, Result result) throws IOException { boolean hashOk = false; if (id != null) { hashOk = baseId.equals(id); - if (!hashOk && ChangeType.ADD.equals(type) + if (!hashOk && ADD.equals(type) && ObjectId.zeroId().equals(baseId)) { // We create a new file. The OID of an empty file is not the // zero id! @@ -660,9 +757,10 @@ public class PatchApplier { } } if (!hashOk) { - throw new PatchApplyException(MessageFormat - .format(JGitText.get().applyBinaryBaseOidWrong, path)); + result.addError(MessageFormat + .format(JGitText.get().applyBinaryBaseOidWrong, path), path, null); } + return hashOk; } private boolean inCore() { @@ -700,18 +798,19 @@ public class PatchApplier { * a supplier for the contents of the old file * @param id * SHA1 for the old content - * @return a loader for the new content. - * @throws PatchApplyException + * @param result + * The patch application result + * @return a loader for the new content, or null if invalid. * @throws IOException * @throws UnsupportedOperationException */ - private ContentStreamLoader applyBinary(String path, File f, FileHeader fh, - StreamSupplier inputSupplier, ObjectId id) - throws PatchApplyException, IOException, - UnsupportedOperationException { + private @Nullable ContentStreamLoader applyBinary(String path, File f, FileHeader fh, + StreamSupplier inputSupplier, ObjectId id, Result result) + throws UnsupportedOperationException, IOException { if (!fh.getOldId().isComplete() || !fh.getNewId().isComplete()) { - throw new PatchApplyException(MessageFormat - .format(JGitText.get().applyBinaryOidTooShort, path)); + result.addError(MessageFormat + .format(JGitText.get().applyBinaryOidTooShort, path), path, null); + return null; } BinaryHunk hunk = fh.getForwardBinaryHunk(); // A BinaryHunk has the start at the "literal" or "delta" token. Data @@ -723,8 +822,10 @@ public class PatchApplier { case LITERAL_DEFLATED: { // This just overwrites the file. We need to check the hash of // the base. - checkOid(fh.getOldId().toObjectId(), id, fh.getChangeType(), f, - path); + if (!checkOid(fh.getOldId().toObjectId(), id, fh.getChangeType(), f, + path, result)) { + return null; + } StreamSupplier supp = () -> new InflaterInputStream( new BinaryHunkInputStream(new ByteArrayInputStream( hunk.getBuffer(), start, length))); @@ -756,8 +857,8 @@ public class PatchApplier { } } - private ContentStreamLoader applyText(RawText rt, FileHeader fh) - throws IOException, PatchApplyException { + private @Nullable ContentStreamLoader applyText(RawText rt, FileHeader fh, Result result) + throws IOException { List<ByteBuffer> oldLines = new ArrayList<>(rt.size()); for (int i = 0; i < rt.size(); i++) { oldLines.add(rt.getRawString(i)); @@ -771,8 +872,8 @@ public class PatchApplier { for (HunkHeader hh : fh.getHunks()) { // We assume hunks to be ordered if (hh.getNewStartLine() <= lastHunkNewLine) { - throw new PatchApplyException(MessageFormat - .format(JGitText.get().patchApplyException, hh)); + result.addError(JGitText.get().applyTextPatchUnorderedHunks, fh.getOldPath(), hh); + return null; } lastHunkNewLine = hh.getNewStartLine(); @@ -793,8 +894,9 @@ public class PatchApplier { newLines.clear(); break; } - throw new PatchApplyException(MessageFormat - .format(JGitText.get().patchApplyException, hh)); + result.addError(JGitText.get().applyTextPatchSingleClearingHunk, + fh.getOldPath(), hh); + return null; } // Hunk lines as reported by the hunk may be off, so don't rely on // them. @@ -805,8 +907,9 @@ public class PatchApplier { lineNumberShift = 0; } if (applyAt < afterLastHunk) { - throw new PatchApplyException(MessageFormat - .format(JGitText.get().patchApplyException, hh)); + result.addError(JGitText.get().applyTextPatchUnorderedHunkApplications, + fh.getOldPath(), hh); + return null; } boolean applies = false; int oldLinesInHunk = hh.getLinesContext() @@ -844,8 +947,9 @@ public class PatchApplier { } } if (!applies) { - throw new PatchApplyException(MessageFormat - .format(JGitText.get().patchApplyException, hh)); + result.addError(JGitText.get().applyTextPatchCannotApplyHunk, + fh.getOldPath(), hh); + return null; } // Hunk applies at applyAt. Apply it, and update afterLastHunk and // lineNumberShift diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevPriorityQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevPriorityQueue.java new file mode 100644 index 0000000000..233dd64a3c --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevPriorityQueue.java @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2023, GerritForge Ltd + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.revwalk; + +import java.util.concurrent.atomic.AtomicInteger; + +import org.eclipse.jgit.annotations.Nullable; +import org.eclipse.jgit.errors.IncorrectObjectTypeException; +import org.eclipse.jgit.errors.MissingObjectException; +import org.eclipse.jgit.internal.JGitText; + +import java.io.IOException; +import java.util.Comparator; +import java.util.PriorityQueue; + +/** + * A queue of commits sorted by commit time order using a Java PriorityQueue. + * For the commits with the same commit time insertion order will be preserved. + */ +class DateRevPriorityQueue extends DateRevQueue { + private PriorityQueue<RevCommitEntry> queue; + + private final AtomicInteger sequence = new AtomicInteger(1); + + /** + * Create an empty queue of commits sorted by commit time order. + */ + public DateRevPriorityQueue() { + this(false); + } + + /** + * Create an empty queue of commits sorted by commit time order. + * + * @param firstParent + * treat first element as a parent + */ + DateRevPriorityQueue(boolean firstParent) { + super(firstParent); + initPriorityQueue(); + } + + private void initPriorityQueue() { + sequence.set(1); + queue = new PriorityQueue<>(Comparator.comparingInt( + (RevCommitEntry ent) -> ent.getEntry().getCommitTime()) + .reversed() + .thenComparingInt(RevCommitEntry::getInsertSequenceNumber)); + } + + DateRevPriorityQueue(Generator s) throws MissingObjectException, + IncorrectObjectTypeException, IOException { + this(s.firstParent); + for (;;) { + final RevCommit c = s.next(); + if (c == null) { + break; + } + add(c); + } + } + + @Override + public void add(RevCommit c) { + // PriorityQueue does not accept null values. To keep the same behaviour + // do the same check and throw the same exception before creating entry + if (c == null) { + throw new NullPointerException(JGitText.get().nullRevCommit); + } + queue.add(new RevCommitEntry(sequence.getAndIncrement(), c)); + } + + @Override + public RevCommit next() { + RevCommitEntry entry = queue.poll(); + return entry == null ? null : entry.getEntry(); + } + + /** + * Peek at the next commit, without removing it. + * + * @return the next available commit; null if there are no commits left. + */ + @Override + public @Nullable RevCommit peek() { + RevCommitEntry entry = queue.peek(); + return entry == null ? null : entry.getEntry(); + } + + /** + * {@inheritDoc} + */ + @Override + public void clear() { + sequence.set(1); + queue.clear(); + } + + @Override + boolean everbodyHasFlag(int f) { + return queue.stream().map(RevCommitEntry::getEntry) + .noneMatch(c -> (c.flags & f) == 0); + } + + @Override + boolean anybodyHasFlag(int f) { + return queue.stream().map(RevCommitEntry::getEntry) + .anyMatch(c -> (c.flags & f) != 0); + } + + @Override + int outputType() { + return outputType | SORT_COMMIT_TIME_DESC; + } + + @Override + public String toString() { + final StringBuilder s = new StringBuilder(); + for (RevCommitEntry e : queue) { + describe(s, e.getEntry()); + } + return s.toString(); + } + + private static class RevCommitEntry { + private final int insertSequenceNumber; + + private final RevCommit entry; + + public RevCommitEntry(int insertSequenceNumber, RevCommit entry) { + this.insertSequenceNumber = insertSequenceNumber; + this.entry = entry; + } + + public int getInsertSequenceNumber() { + return insertSequenceNumber; + } + + public RevCommit getEntry() { + return entry; + } + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java index 0cabf07057..905dcb62ad 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java @@ -8,11 +8,11 @@ * * SPDX-License-Identifier: BSD-3-Clause */ - package org.eclipse.jgit.revwalk; import java.io.IOException; +import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.errors.MissingObjectException; @@ -36,11 +36,17 @@ public class DateRevQueue extends AbstractRevQueue { private int last = -1; - /** Create an empty date queue. */ + /** Create an empty DateRevQueue. */ public DateRevQueue() { super(false); } + /** + * Create an empty DateRevQueue. + * + * @param firstParent + * treat first element as a parent + */ DateRevQueue(boolean firstParent) { super(firstParent); } @@ -56,7 +62,6 @@ public class DateRevQueue extends AbstractRevQueue { } } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { sinceLastIndex++; @@ -102,7 +107,6 @@ public class DateRevQueue extends AbstractRevQueue { } } - /** {@inheritDoc} */ @Override public RevCommit next() { final Entry q = head; @@ -135,11 +139,10 @@ public class DateRevQueue extends AbstractRevQueue { * * @return the next available commit; null if there are no commits left. */ - public RevCommit peek() { + public @Nullable RevCommit peek() { return head != null ? head.commit : null; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -173,7 +176,6 @@ public class DateRevQueue extends AbstractRevQueue { return outputType | SORT_COMMIT_TIME_DESC; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java index 9da7105566..2fb3a60690 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; import java.util.List; +import java.util.Optional; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.annotations.Nullable; @@ -236,7 +237,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { idBuffer = new MutableObjectId(); objects = new ObjectIdOwnerMap<>(); roots = new ArrayList<>(); - queue = new DateRevQueue(false); + queue = newDateRevQueue(false); pending = new StartGenerator(this); sorting = EnumSet.of(RevSort.NONE); filter = RevFilter.ALL; @@ -245,6 +246,30 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { commitGraph = null; } + static AbstractRevQueue newDateRevQueue(boolean firstParent) { + if(usePriorityQueue()) { + return new DateRevPriorityQueue(firstParent); + } + + return new DateRevQueue(firstParent); + } + + static DateRevQueue newDateRevQueue(Generator g) throws IOException { + if(usePriorityQueue()) { + return new DateRevPriorityQueue(g); + } + + return new DateRevQueue(g); + } + + @SuppressWarnings("boxing") + private static boolean usePriorityQueue() { + return Optional + .ofNullable(System.getProperty("REVWALK_USE_PRIORITY_QUEUE")) //$NON-NLS-1$ + .map(Boolean::parseBoolean) + .orElse(false); + } + /** * Get the reader this walker is using to load objects. * @@ -550,6 +575,12 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { reset(~freeFlags & APP_FLAGS); filter = RevFilter.ALL; treeFilter = TreeFilter.ALL; + + // Make sure commit is parsed from commit-graph + if ((needle.flags & PARSED) == 0) { + needle.parseHeaders(this); + } + int cutoff = needle.getGeneration(); for (Ref r : haystacks) { if (monitor.isCancelled()) { return result; @@ -565,6 +596,10 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { boolean commitFound = false; RevCommit next; while ((next = next()) != null) { + if (next.getGeneration() < cutoff) { + markUninteresting(next); + uninteresting.add(next); + } if (References.isSameObject(next, needle) || (next.flags & TEMP_MARK) != 0) { result.add(r); @@ -838,7 +873,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { assertNotStarted(); assertNoCommitsMarkedStart(); firstParent = enable; - queue = new DateRevQueue(firstParent); + queue = newDateRevQueue(firstParent); pending = new StartGenerator(this); } @@ -1556,7 +1591,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { } roots.clear(); - queue = new DateRevQueue(firstParent); + queue = newDateRevQueue(firstParent); pending = new StartGenerator(this); } @@ -1577,7 +1612,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { firstParent = false; objects.clear(); roots.clear(); - queue = new DateRevQueue(firstParent); + queue = newDateRevQueue(firstParent); pending = new StartGenerator(this); shallowCommitsInitialized = false; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java index a79901ca10..414af30486 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java @@ -93,10 +93,11 @@ class StartGenerator extends Generator { final DateRevQueue pending; int pendingOutputType = 0; - if (q instanceof DateRevQueue) - pending = (DateRevQueue)q; - else - pending = new DateRevQueue(q); + if (q instanceof DateRevQueue) { + pending = (DateRevQueue) q; + } else { + pending = RevWalk.newDateRevQueue(q); + } if (tf != TreeFilter.ALL) { int rewriteFlag; if (w.getRewriteParents()) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java index a8180d1d8d..be87e07f22 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java @@ -27,7 +27,11 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DELTA_CACHE_SIZE; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DELTA_COMPRESSION; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_DEPTH; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_INDEXVERSION; +import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_MIN_BYTES_OBJ_SIZE_INDEX; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_MIN_SIZE_PREVENT_RACYPACK; +import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACK_KEPT_OBJECTS; +import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRESERVE_OLD_PACKS; +import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRUNE_PRESERVED; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_REUSE_DELTAS; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_REUSE_OBJECTS; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_SEARCH_FOR_REUSE_TIMEOUT; @@ -36,11 +40,8 @@ import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_THREADS; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WAIT_PREVENT_RACYPACK; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WINDOW; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WINDOW_MEMORY; -import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_MIN_BYTES_OBJ_SIZE_INDEX; +import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_WRITE_REVERSE_INDEX; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_PACK_SECTION; -import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PACK_KEPT_OBJECTS; -import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRESERVE_OLD_PACKS; -import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_KEY_PRUNE_PRESERVED; import static org.eclipse.jgit.lib.ConfigConstants.CONFIG_REPACK_SECTION; import java.time.Duration; @@ -164,6 +165,14 @@ public class PackConfig { public static final int DEFAULT_INDEX_VERSION = 2; /** + * Default value of the write reverse index option: {@value} + * + * @see #setWriteReverseIndex(boolean) + * @since 6.6 + */ + public static final boolean DEFAULT_WRITE_REVERSE_INDEX = false; + + /** * Default value of the build bitmaps option: {@value} * * @see #setBuildBitmaps(boolean) @@ -304,6 +313,8 @@ public class PackConfig { private int indexVersion = DEFAULT_INDEX_VERSION; + private boolean writeReverseIndex = DEFAULT_WRITE_REVERSE_INDEX; + private boolean buildBitmaps = DEFAULT_BUILD_BITMAPS; private boolean packKeptObjects = DEFAULT_PACK_KEPT_OBJECTS; @@ -387,6 +398,7 @@ public class PackConfig { this.threads = cfg.threads; this.executor = cfg.executor; this.indexVersion = cfg.indexVersion; + this.writeReverseIndex = cfg.writeReverseIndex; this.buildBitmaps = cfg.buildBitmaps; this.packKeptObjects = cfg.packKeptObjects; this.bitmapContiguousCommitCount = cfg.bitmapContiguousCommitCount; @@ -989,6 +1001,31 @@ public class PackConfig { } /** + * True if the writer should write reverse index files. + * + * Default setting: {@value #DEFAULT_WRITE_REVERSE_INDEX} + * + * @return whether the writer should write reverse index files + * @since 6.6 + */ + public boolean isWriteReverseIndex() { + return writeReverseIndex; + } + + /** + * Set whether the writer will write reverse index files. + * + * Default setting: {@value #DEFAULT_WRITE_REVERSE_INDEX} + * + * @param writeReverseIndex + * whether the writer should write reverse index files + * @since 6.6 + */ + public void setWriteReverseIndex(boolean writeReverseIndex) { + this.writeReverseIndex = writeReverseIndex; + } + + /** * True if writer is allowed to build bitmaps for indexes. * * Default setting: {@value #DEFAULT_BUILD_BITMAPS} @@ -1329,6 +1366,8 @@ public class PackConfig { setSinglePack(rc.getBoolean(CONFIG_PACK_SECTION, CONFIG_KEY_SINGLE_PACK, getSinglePack())); + setWriteReverseIndex(rc.getBoolean(CONFIG_PACK_SECTION, + CONFIG_KEY_WRITE_REVERSE_INDEX, isWriteReverseIndex())); boolean buildBitmapsFromConfig = rc.getBoolean(CONFIG_PACK_SECTION, CONFIG_KEY_BUILD_BITMAPS, isBuildBitmaps()); setBuildBitmaps(buildBitmapsFromConfig); @@ -1394,6 +1433,7 @@ public class PackConfig { b.append(", reuseDeltas=").append(isReuseDeltas()); //$NON-NLS-1$ b.append(", reuseObjects=").append(isReuseObjects()); //$NON-NLS-1$ b.append(", deltaCompress=").append(isDeltaCompress()); //$NON-NLS-1$ + b.append(", writeReverseIndex=").append(isWriteReverseIndex()); //$NON-NLS-1$ b.append(", buildBitmaps=").append(isBuildBitmaps()); //$NON-NLS-1$ b.append(", bitmapContiguousCommitCount=") //$NON-NLS-1$ .append(getBitmapContiguousCommitCount()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java index 686e9cc6c8..9d9f5495fe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java @@ -171,6 +171,9 @@ public class AmazonS3 { /** S3 Bucket Domain. */ private final String domain; + /** S3 Protocol, "https" or "http"; defaults to "http". */ + private final String protocol; + /** S3 Region. */ private final String region; @@ -183,6 +186,7 @@ public class AmazonS3 { String CRYPTO_ALG = "crypto.algorithm"; //$NON-NLS-1$ String CRYPTO_VER = "crypto.version"; //$NON-NLS-1$ String ACL = "acl"; //$NON-NLS-1$ + String PROTOCOL = "protocol"; //$NON-NLS-1$ String DOMAIN = "domain"; //$NON-NLS-1$ String REGION = "region"; //$NON-NLS-1$ String HTTP_RETRY = "httpclient.retry-max"; //$NON-NLS-1$ @@ -246,6 +250,8 @@ public class AmazonS3 { awsApiSignatureVersion)); } + protocol = props.getProperty(Keys.PROTOCOL, "http"); //$NON-NLS-1$ + domain = props.getProperty(Keys.DOMAIN, "s3.amazonaws.com"); //$NON-NLS-1$ publicKey = props.getProperty(Keys.ACCESS_KEY); @@ -590,7 +596,8 @@ public class AmazonS3 { final String key, final Map<String, String> args) throws IOException { final StringBuilder urlstr = new StringBuilder(); - urlstr.append("http://"); //$NON-NLS-1$ + urlstr.append(protocol); + urlstr.append("://"); //$NON-NLS-1$ urlstr.append(bucket); urlstr.append('.'); urlstr.append(domain); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java index be36d2b834..8909380176 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java @@ -37,6 +37,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; import org.eclipse.jgit.errors.PackProtocolException; import org.eclipse.jgit.errors.RemoteRepositoryException; @@ -215,6 +216,8 @@ public abstract class BasePackFetchConnection extends BasePackConnection private boolean allowOfsDelta; + private boolean useNegotiationTip; + private boolean noDone; private boolean noProgress; @@ -259,9 +262,11 @@ public abstract class BasePackFetchConnection extends BasePackConnection final FetchConfig cfg = getFetchConfig(); allowOfsDelta = cfg.allowOfsDelta; maxHaves = cfg.maxHaves; + useNegotiationTip = cfg.useNegotiationTip; } else { allowOfsDelta = true; maxHaves = Integer.MAX_VALUE; + useNegotiationTip = false; } includeTags = transport.getTagOpt() != TagOpt.NO_TAGS; @@ -297,14 +302,35 @@ public abstract class BasePackFetchConnection extends BasePackConnection final int maxHaves; + final boolean useNegotiationTip; + FetchConfig(Config c) { allowOfsDelta = c.getBoolean("repack", "usedeltabaseoffset", true); //$NON-NLS-1$ //$NON-NLS-2$ maxHaves = c.getInt("fetch", "maxhaves", Integer.MAX_VALUE); //$NON-NLS-1$ //$NON-NLS-2$ + useNegotiationTip = c.getBoolean("fetch", "usenegotiationtip", //$NON-NLS-1$ //$NON-NLS-2$ + false); } FetchConfig(boolean allowOfsDelta, int maxHaves) { + this(allowOfsDelta, maxHaves, false); + } + + /** + * @param allowOfsDelta + * when true optimizes the pack size by deltafying base + * object + * @param maxHaves + * max haves to be sent per negotiation + * @param useNegotiationTip + * if true uses the wanted refs instead of all refs as source + * of the "have" list to send. + * @since 6.6 + */ + FetchConfig(boolean allowOfsDelta, int maxHaves, + boolean useNegotiationTip) { this.allowOfsDelta = allowOfsDelta; this.maxHaves = maxHaves; + this.useNegotiationTip = useNegotiationTip; } } @@ -384,7 +410,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection noProgress = monitor == NullProgressMonitor.INSTANCE; markRefsAdvertised(); - markReachable(have, maxTimeWanted(want)); + markReachable(want, have, maxTimeWanted(want)); if (TransferConfig.ProtocolVersion.V2 .equals(getProtocolVersion())) { @@ -662,9 +688,17 @@ public abstract class BasePackFetchConnection extends BasePackConnection return maxTime; } - private void markReachable(Set<ObjectId> have, int maxTime) + private void markReachable(Collection<Ref> want, Set<ObjectId> have, + int maxTime) throws IOException { + Set<String> wantRefs = want.stream().map(Ref::getName) + .collect(Collectors.toSet()); + for (Ref r : local.getRefDatabase().getRefs()) { + if (useNegotiationTip && !wantRefs.contains(r.getName())) { + continue; + } + ObjectId id = r.getPeeledObjectId(); if (id == null) id = r.getObjectId(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java index f02160e457..c510194ee6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java @@ -111,7 +111,7 @@ class FetchProcess { for (PackLock lock : packLocks) { lock.unlock(); } - } catch (IOException e) { + } catch (Throwable e) { if (e1 != null) { e.addSuppressed(e1); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java index 405373a0f9..df034bdc8b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -588,6 +588,17 @@ public class TransportHttp extends HttpTransport implements WalkTransport, this.headers = headers; } + /** + * Get additional headers on the HTTP connection + * + * @return unmodifiable map of additional name:values that are set as + * headers on the HTTP connection + * @since 6.6 + */ + public Map<String, String> getAdditionalHeaders() { + return Collections.unmodifiableMap(headers); + } + private NoRemoteRepositoryException createNotFoundException(URIish u, URL url, String msg) { String text; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index a7b379a532..8b97ee10ca 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -1189,6 +1189,7 @@ public class UploadPack implements Closeable { PackStatistics.Accumulator accumulator = new PackStatistics.Accumulator(); Instant negotiateStart = Instant.now(); + accumulator.advertised = advertised.size(); ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig); FetchV2Request req = parser.parseFetchRequest(pckIn); @@ -1209,6 +1210,7 @@ public class UploadPack implements Closeable { // TODO(ifrade): Avoid mutating the parsed request. req.getWantIds().addAll(wantedRefs.values()); wantIds = req.getWantIds(); + accumulator.wants = wantIds.size(); boolean sectionSent = false; boolean mayHaveShallow = req.getDepth() != 0 @@ -1766,7 +1768,6 @@ public class UploadPack implements Closeable { && line.length() == PACKET_HAVE.length() + 40) { peerHas.add(ObjectId .fromString(line.substring(PACKET_HAVE.length()))); - accumulator.haves++; } else if (line.equals(PACKET_DONE)) { last = processHaveLines(peerHas, last, pckOut, accumulator, Option.NONE); @@ -1798,6 +1799,7 @@ public class UploadPack implements Closeable { parseWants(accumulator); if (peerHas.isEmpty()) return last; + accumulator.haves += peerHas.size(); sentReady = false; int haveCnt = 0; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java index ed8f450c53..cc6c252fa1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java @@ -530,9 +530,10 @@ class WalkFetchConnection extends BaseFetchConnection { // are unusable and we shouldn't consult them again. // try { - if (pack.tmpIdx != null) + if (pack.tmpIdx != null) { FileUtils.delete(pack.tmpIdx); - } catch (IOException e) { + } + } catch (Throwable e) { if (e1 != null) { e.addSuppressed(e1); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index d8a61ec97a..b5d6610d52 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -399,6 +399,35 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } } + private long possiblyFilteredLength(Entry e, long len) throws IOException { + if (getCleanFilterCommand() == null && getEolStreamType( + OperationType.CHECKIN_OP) == EolStreamType.DIRECT) { + return len; + } + + if (len <= MAXIMUM_FILE_SIZE_TO_READ_FULLY) { + InputStream is = e.openInputStream(); + try { + ByteBuffer rawbuf = IO.readWholeStream(is, (int) len); + rawbuf = filterClean(rawbuf.array(), rawbuf.limit()); + return rawbuf.limit(); + } finally { + safeClose(is); + } + } + + if (getCleanFilterCommand() == null && isBinary(e)) { + return len; + } + + InputStream is = filterClean(e.openInputStream()); + try { + return computeLength(is); + } finally { + safeClose(is); + } + } + private InputStream possiblyFilteredInputStream(final Entry e, final InputStream is, final long len) throws IOException { @@ -417,11 +446,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } if (getCleanFilterCommand() == null && isBinary(e)) { - canonLen = len; - return is; - } + canonLen = len; + return is; + } - final InputStream lenIs = filterClean(e.openInputStream()); + final InputStream lenIs = filterClean(e.openInputStream()); try { canonLen = computeLength(lenIs); } finally { @@ -595,15 +624,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { public long getEntryContentLength() throws IOException { if (canonLen == -1) { long rawLen = getEntryLength(); - if (rawLen == 0) + if (rawLen == 0) { canonLen = 0; - InputStream is = current().openInputStream(); - try { - // canonLen gets updated here - possiblyFilteredInputStream(current(), is, current() - .getLength()); - } finally { - safeClose(is); + } else { + canonLen = possiblyFilteredLength(current(), + current().getLength()); } } return canonLen; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java index de8777f592..635dd6a1cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java @@ -37,6 +37,24 @@ public class IntList { } /** + * Create a list initialized with the values of the given range. + * + * @param start + * the beginning of the range, inclusive + * @param end + * the end of the range, exclusive + * @return the list initialized with the given range + * @since 6.6 + */ + public static IntList filledWithRange(int start, int end) { + IntList list = new IntList(end - start); + for (int val = start; val < end; val++) { + list.add(val); + } + return list; + } + + /** * Get number of entries in this list. * * @return number of entries in this list. @@ -126,6 +144,60 @@ public class IntList { add(val); } + /** + * Sort the entries of the list in-place, according to the comparator. + * + * @param comparator + * provides the comparison values for sorting the entries + * @since 6.6 + */ + public void sort(IntComparator comparator) { + quickSort(0, count - 1, comparator); + } + + /** + * Quick sort has average time complexity of O(n log n) and O(log n) space + * complexity (for recursion on the stack). + * <p> + * Implementation based on https://www.baeldung.com/java-quicksort. + * + * @param begin + * the index to begin partitioning at, inclusive + * @param end + * the index to end partitioning at, inclusive + * @param comparator + * provides the comparison values for sorting the entries + */ + private void quickSort(int begin, int end, IntComparator comparator) { + if (begin < end) { + int partitionIndex = partition(begin, end, comparator); + + quickSort(begin, partitionIndex - 1, comparator); + quickSort(partitionIndex + 1, end, comparator); + } + } + + private int partition(int begin, int end, IntComparator comparator) { + int pivot = entries[end]; + int writeSmallerIdx = (begin - 1); + + for (int findSmallerIdx = begin; findSmallerIdx < end; findSmallerIdx++) { + if (comparator.compare(entries[findSmallerIdx], pivot) <= 0) { + writeSmallerIdx++; + + int biggerVal = entries[writeSmallerIdx]; + entries[writeSmallerIdx] = entries[findSmallerIdx]; + entries[findSmallerIdx] = biggerVal; + } + } + + int pivotIdx = writeSmallerIdx + 1; + entries[end] = entries[pivotIdx]; + entries[pivotIdx] = pivot; + + return pivotIdx; + } + private void grow() { final int[] n = new int[(entries.length + 16) * 3 / 2]; System.arraycopy(entries, 0, n, 0, count); @@ -145,4 +217,24 @@ public class IntList { r.append(']'); return r.toString(); } + + /** + * A comparator of primitive ints. + * + * @since 6.6 + */ + public interface IntComparator { + + /** + * Compares the two int arguments for order. + * + * @param first + * the first int to compare + * @param second + * the second int to compare + * @return a negative number if first < second, 0 if first == second, or + * a positive number if first > second + */ + int compare(int first, int second); + } } @@ -18,7 +18,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> <packaging>pom</packaging> - <version>6.5.1-SNAPSHOT</version> + <version>6.6.2-SNAPSHOT</version> <name>JGit - Parent</name> <url>${jgit-url}</url> @@ -150,35 +150,36 @@ <java.version>11</java.version> <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest> - <jgit-last-release-version>6.4.0.202211300538-r</jgit-last-release-version> + <jgit-last-release-version>6.5.0.202303070854-r</jgit-last-release-version> <ant-version>1.10.12</ant-version> - <apache-sshd-version>2.9.2</apache-sshd-version> + <apache-sshd-version>2.10.0</apache-sshd-version> <jsch-version>0.1.55</jsch-version> <jzlib-version>1.1.3</jzlib-version> - <javaewah-version>1.1.13</javaewah-version> + <javaewah-version>1.2.3</javaewah-version> <junit-version>4.13.2</junit-version> <test-fork-count>1C</test-fork-count> <args4j-version>2.33</args4j-version> - <commons-compress-version>1.22</commons-compress-version> + <commons-compress-version>1.23.0</commons-compress-version> <osgi-core-version>6.0.0</osgi-core-version> - <servlet-api-version>4.0.0</servlet-api-version> - <jetty-version>10.0.13</jetty-version> - <japicmp-version>0.17.1</japicmp-version> + <servlet-api-version>4.0.4</servlet-api-version> + <jetty-version>10.0.15</jetty-version> + <japicmp-version>0.17.2</japicmp-version> <httpclient-version>4.5.14</httpclient-version> <httpcore-version>4.4.16</httpcore-version> - <slf4j-version>1.7.30</slf4j-version> - <maven-javadoc-plugin-version>3.4.1</maven-javadoc-plugin-version> + <slf4j-version>1.7.36</slf4j-version> + <maven-javadoc-plugin-version>3.5.0</maven-javadoc-plugin-version> <gson-version>2.10.1</gson-version> - <bouncycastle-version>1.72</bouncycastle-version> - <spotbugs-maven-plugin-version>4.7.3.0</spotbugs-maven-plugin-version> - <maven-project-info-reports-plugin-version>3.4.2</maven-project-info-reports-plugin-version> + <bouncycastle-version>1.73</bouncycastle-version> + <spotbugs-maven-plugin-version>4.7.3.4</spotbugs-maven-plugin-version> + <maven-project-info-reports-plugin-version>3.4.3</maven-project-info-reports-plugin-version> <maven-jxr-plugin-version>3.3.0</maven-jxr-plugin-version> - <maven-surefire-plugin-version>3.0.0-M8</maven-surefire-plugin-version> + <maven-surefire-plugin-version>3.0.0</maven-surefire-plugin-version> <maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version> - <maven-compiler-plugin-version>3.10.1</maven-compiler-plugin-version> - <plexus-compiler-version>2.12.1</plexus-compiler-version> + <maven-compiler-plugin-version>3.11.0</maven-compiler-plugin-version> + <plexus-compiler-version>2.13.0</plexus-compiler-version> <hamcrest-version>2.2</hamcrest-version> - <assertj-version>3.20.2</assertj-version> + <assertj-version>3.24.2</assertj-version> + <jna-version>5.13.0</jna-version> <!-- Properties to enable jacoco code coverage analysis --> <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> @@ -274,7 +275,6 @@ <forkCount>${test-fork-count}</forkCount> <reuseForks>true</reuseForks> <argLine>@{argLine}</argLine> - <rerunFailingTestsCount>3</rerunFailingTestsCount> </configuration> </plugin> @@ -332,7 +332,7 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> - <version>0.8.8</version> + <version>0.8.10</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -364,12 +364,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> - <version>3.0.0</version> + <version>3.1.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> - <version>3.1.0</version> + <version>3.1.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -379,12 +379,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <version>3.3.0</version> + <version>3.3.1</version> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> - <version>2.7.7</version> + <version>2.7.11</version> </plugin> <plugin> <groupId>org.eclipse.dash</groupId> @@ -398,7 +398,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.1.0</version> + <version>3.3.0</version> <executions> <execution> <id>enforce-maven</id> @@ -699,8 +699,8 @@ </dependency> <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> <version>${servlet-api-version}</version> </dependency> @@ -794,6 +794,18 @@ <artifactId>assertj-core</artifactId> <version>${assertj-version}</version> </dependency> + + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>${jna-version}</version> + </dependency> + + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>${jna-version}</version> + </dependency> </dependencies> </dependencyManagement> @@ -887,7 +899,7 @@ <dependency> <groupId>org.eclipse.jdt</groupId> <artifactId>ecj</artifactId> - <version>3.31.0</version> + <version>3.33.0</version> </dependency> </dependencies> </plugin> diff --git a/tools/BUILD b/tools/BUILD index 1e671087d6..dd081d9178 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -68,7 +68,7 @@ java_package_configuration( "-Xep:LiteralClassName:ERROR", "-Xep:MissingFail:ERROR", "-Xep:MissingOverride:ERROR", - "-Xep:MutableConstantField:ERROR", + "-Xep:MutableConstantField:WARN", "-Xep:NarrowingCompoundAssignment:ERROR", "-Xep:NonAtomicVolatileUpdate:ERROR", "-Xep:NonOverridingEquals:ERROR", diff --git a/tools/remote-bazelrc b/tools/remote-bazelrc index 58f794e18b..0c558f8136 100644 --- a/tools/remote-bazelrc +++ b/tools/remote-bazelrc @@ -30,8 +30,6 @@ build:remote --disk_cache= # Set several flags related to specifying the platform, toolchain and java # properties. -build:remote --host_javabase=@rbe_jdk11//java:jdk -build:remote --javabase=@rbe_jdk11//java:jdk build:remote --crosstool_top=@rbe_jdk11//cc:toolchain build:remote --extra_toolchains=@rbe_jdk11//config:cc-toolchain build:remote --extra_execution_platforms=@rbe_jdk11//config:platform |