From d2044aed4fc49bc5fe5053febe410b1aa6a95093 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 15 Dec 2015 00:22:13 +0100 Subject: JGit v4.2.0.201512141825-rc1 Change-Id: Id725ea888acd23793d37de2864ec0727160a2eaf Signed-off-by: Matthias Sohn --- org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ant.test/pom.xml | 2 +- org.eclipse.jgit.ant/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ant/pom.xml | 2 +- org.eclipse.jgit.archive/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit.archive/pom.xml | 2 +- org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.apache/pom.xml | 2 +- org.eclipse.jgit.http.server/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.server/pom.xml | 2 +- org.eclipse.jgit.http.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.test/pom.xml | 2 +- org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.junit.http/pom.xml | 2 +- org.eclipse.jgit.junit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.junit/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml | 2 +- .../org.eclipse.jgit.http.apache.feature/feature.xml | 2 +- .../org.eclipse.jgit.http.apache.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml | 2 +- .../org.eclipse.jgit.pgm.source.feature/feature.xml | 2 +- .../org.eclipse.jgit.pgm.source.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml | 2 +- .../org.eclipse.jgit.source.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml | 2 +- .../org.eclipse.jgit.target/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml | 2 +- org.eclipse.jgit.packaging/pom.xml | 2 +- org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.pgm.test/pom.xml | 2 +- org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit.pgm/pom.xml | 2 +- org.eclipse.jgit.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.test/pom.xml | 2 +- org.eclipse.jgit.ui/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ui/pom.xml | 2 +- org.eclipse.jgit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit/pom.xml | 2 +- pom.xml | 2 +- 46 files changed, 49 insertions(+), 49 deletions(-) diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index c3b9a3790a..d1e8019f94 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ant.test -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: org.apache.tools.ant, diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index f8bf0838b3..340c850afd 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.ant.test diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index 0cdf8bac2a..8a4a19aca2 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: org.apache.tools.ant, org.eclipse.jgit.storage.file;version="[4.2.0,4.3.0)" diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 1a445ea877..82cdbe23a7 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -48,7 +48,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.ant diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF index 2bd0164225..08912dedec 100644 --- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.archive -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF index 8d7846b6a5..95a70d1671 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: 4.2.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.archive;version="4.2.0.qualifier";roots="." +Bundle-Version: 4.2.0.201512141825-rc1 +Eclipse-SourceBundle: org.eclipse.jgit.archive;version="4.2.0.201512141825-rc1";roots="." diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml index c93da4bf49..76fe2ebfbc 100644 --- a/org.eclipse.jgit.archive/pom.xml +++ b/org.eclipse.jgit.archive/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.archive diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF index 07f364c535..2c25b49a21 100644 --- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.http.apache -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-Localization: plugin Bundle-Vendor: %Provider-Name diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml index 68d3c22691..0f08cf1161 100644 --- a/org.eclipse.jgit.http.apache/pom.xml +++ b/org.eclipse.jgit.http.apache/pom.xml @@ -48,7 +48,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.http.apache diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index 78c41c487c..a25a1a3a2d 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Localization: plugin Bundle-Vendor: %provider_name Export-Package: org.eclipse.jgit.http.server;version="4.2.0", diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index 9859a1d126..a4b235e810 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.http.server diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index f8bd4915f9..9f01eebc32 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index dd52a89e6c..0605f97ec1 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.http.test diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 32bca1bda0..e97e3f1926 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index a61e6801a9..237e2c8e2b 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.junit.http diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index 7449004ba8..c7f6baca49 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index bf281e62b2..a1d37903b7 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.junit 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 99e153edc6..091afbdba2 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 @@ 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 e0bdd3871e..26d474477e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature 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 ac37d07715..0aa72ac49a 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 @@ 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 b1f8302fd5..e42e4c3458 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature 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 00f368cd73..f89f28c652 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 @@ 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 2bef9a6d31..1a9a1794aa 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature 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 254852f2c7..6fa5e0bfe4 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 @@ 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 91e00170b1..34bbb0b4a0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml index f7766ea3a2..a402da6b19 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml index cc3b182797..022f45d740 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature 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 b6e6869feb..77e3311acf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.repository 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 967d6c23d5..3512979ab4 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 @@ 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 8fd1da658f..7ae6ec5566 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.feature 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 572ac376ee..be87360397 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: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 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 8699688649..16484e5e01 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -49,7 +49,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.target diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index dd329b4b08..3b9a2bee94 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 pom JGit Tycho Parent diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index db23c3b55f..fbf5cc03e7 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index 955674a062..31d011b5fe 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.pgm.test diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index 567fd05750..ca5ecbfb76 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-Localization: plugin diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index a3fef2e29a..6a0206091f 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: 4.2.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.2.0.qualifier";roots="." +Bundle-Version: 4.2.0.201512141825-rc1 +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.2.0.201512141825-rc1";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index ca2ead2925..6c49adcc88 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.pgm diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 37fd367171..24e137fd98 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 539caff149..0ccd2d17d4 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.test diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index 4e2db1bfcc..3f014171ef 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.eclipse.jgit.awtui;version="4.2.0" diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 6a56f8cf33..b0c35111ea 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit.ui diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 2a953b559d..552880c605 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 4.2.0.qualifier +Bundle-Version: 4.2.0.201512141825-rc1 Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index a03d7df6ce..3b0b27641e 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: 4.2.0.qualifier -Eclipse-SourceBundle: org.eclipse.jgit;version="4.2.0.qualifier";roots="." +Bundle-Version: 4.2.0.201512141825-rc1 +Eclipse-SourceBundle: org.eclipse.jgit;version="4.2.0.201512141825-rc1";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index 4f98323e5d..0ebae4794d 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 org.eclipse.jgit diff --git a/pom.xml b/pom.xml index 6b41708354..99d8253452 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent pom - 4.2.0-SNAPSHOT + 4.2.0.201512141825-rc1 JGit - Parent ${jgit-url} -- cgit v1.2.3 From 1ed5382b37453309580e11a11cf4c3bb134813fa Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 14:59:55 +0900 Subject: CommitCommand: Remove redundant null check Repository.getWorkTree is annotated as @NonNull, so the check for it returning null is redundant. Change-Id: I597b0f774ff857b8900519f14a1a17a904cf7c6f Signed-off-by: David Pursehouse --- org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java index 9466dab74e..6828ed338f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java @@ -179,7 +179,7 @@ public class CommitCommand extends GitCommand { processOptions(state, rw); - if (all && !repo.isBare() && repo.getWorkTree() != null) { + if (all && !repo.isBare()) { try (Git git = new Git(repo)) { git.add() .addFilepattern(".") //$NON-NLS-1$ -- cgit v1.2.3 From 56634de0cc3b0fd0d66bd867210e7e2d74451cea Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 15:06:10 +0900 Subject: RefUpdateTest: Add null check to prevent potential NPE Change-Id: I64b1850c3bb80b09409044461ca3fdde1c46d4bb Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java index 8744ed1bd6..4ae92ccbe2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java @@ -751,7 +751,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { assertNull(db.resolve(toName)); assertEquals(oldFromLog.toString(), db.getReflogReader(fromName) .getReverseEntries().toString()); - if (oldHeadId != null) + if (oldHeadId != null && oldHeadLog != null) assertEquals(oldHeadLog.toString(), db.getReflogReader( Constants.HEAD).getReverseEntries().toString()); } finally { -- cgit v1.2.3 From 0352276da7790667cd32e55f64386f742b42cd16 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 15:09:20 +0900 Subject: RefUpdateTest: Use try-with-resource for auto-closable types Change-Id: I25c8db0e410aa2a4a53dc7d8863e4a6efefcf7cb Signed-off-by: David Pursehouse --- .../jgit/internal/storage/file/RefUpdateTest.java | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java index 4ae92ccbe2..48434189e4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java @@ -558,13 +558,15 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { assertEquals(ppid, db.resolve("refs/heads/master")); // real test - RevCommit old = new RevWalk(db).parseCommit(ppid); - RefUpdate updateRef2 = db.updateRef("refs/heads/master"); - updateRef2.setExpectedOldObjectId(old); - updateRef2.setNewObjectId(pid); - Result update2 = updateRef2.update(); - assertEquals(Result.FAST_FORWARD, update2); - assertEquals(pid, db.resolve("refs/heads/master")); + try (RevWalk rw = new RevWalk(db)) { + RevCommit old = rw.parseCommit(ppid); + RefUpdate updateRef2 = db.updateRef("refs/heads/master"); + updateRef2.setExpectedOldObjectId(old); + updateRef2.setNewObjectId(pid); + Result update2 = updateRef2.update(); + assertEquals(Result.FAST_FORWARD, update2); + assertEquals(pid, db.resolve("refs/heads/master")); + } } /** @@ -707,9 +709,10 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { // Create new Repository instance, to reread caches and make sure our // assumptions are persistent. - Repository ndb = new FileRepository(db.getDirectory()); - assertEquals(rb2, ndb.resolve("refs/heads/new/name")); - assertNull(ndb.resolve("refs/heads/b")); + try (Repository ndb = new FileRepository(db.getDirectory())) { + assertEquals(rb2, ndb.resolve("refs/heads/new/name")); + assertNull(ndb.resolve("refs/heads/b")); + } } public void tryRenameWhenLocked(String toLock, String fromName, -- cgit v1.2.3 From 559e49364820a14c349ca47881b6614fabdee6a4 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 15:17:46 +0900 Subject: RevParse: Remove superfluous semicolon Change-Id: I5975bc58d7933dafb3e7a8d891e9f6878b98a9a1 Signed-off-by: David Pursehouse --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java index 4456fd5348..e02fffd650 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java @@ -56,7 +56,7 @@ import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.Option; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.pgm.internal.CLIText;; +import org.eclipse.jgit.pgm.internal.CLIText; @Command(usage = "usage_RevParse") class RevParse extends TextBuiltin { -- cgit v1.2.3 From 8d3584f4d389919be3e1b427bf8b9d887070fe64 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 19 Jan 2016 13:07:24 +0100 Subject: Remove org.eclipse.jgit.updatesite project from tools/version.sh We don't need to update versions for this project which was removed a long time ago. Change-Id: Ie2d030134942add152847581797db3a213ec4c9e Signed-off-by: Matthias Sohn --- tools/version.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/version.sh b/tools/version.sh index a2f81290d6..81ffe06b25 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -144,17 +144,6 @@ perl -pi~ -e ' } ' org.eclipse.jgit.packaging/org.*.feature/pom.xml -perl -pi~ -e ' - if ($ARGV ne $old_argv) { - $seen_version = 0; - $old_argv = $ARGV; - } - if ($seen_version < 5) { - $seen_version++ if - s{<(version)>.*}{<${1}>'"$POM_V"'}; - } - ' org.eclipse.jgit.packaging/org.eclipse.jgit.updatesite/pom.xml - perl -pi~ -e ' if ($ARGV ne $old_argv) { $seen_version = 0; -- cgit v1.2.3 From 20f272a71c2c4cafc1adf881817042d43e0c5329 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 19 Jan 2016 13:10:20 +0100 Subject: Prepare 4.2.0-SNAPSHOT builds Change-Id: Ibe38a95bf36db0c0ed948280b28c416943ec0329 Signed-off-by: Matthias Sohn --- org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ant.test/pom.xml | 2 +- org.eclipse.jgit.ant/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ant/pom.xml | 2 +- org.eclipse.jgit.archive/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit.archive/pom.xml | 2 +- org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.apache/pom.xml | 2 +- org.eclipse.jgit.http.server/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.server/pom.xml | 2 +- org.eclipse.jgit.http.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.test/pom.xml | 2 +- org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.junit.http/pom.xml | 2 +- org.eclipse.jgit.junit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.junit/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml | 2 +- .../org.eclipse.jgit.http.apache.feature/feature.xml | 2 +- .../org.eclipse.jgit.http.apache.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml | 2 +- .../org.eclipse.jgit.pgm.source.feature/feature.xml | 2 +- .../org.eclipse.jgit.pgm.source.feature/pom.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml | 2 +- .../org.eclipse.jgit.source.feature/feature.xml | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml | 2 +- .../org.eclipse.jgit.target/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml | 2 +- org.eclipse.jgit.packaging/pom.xml | 2 +- org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.pgm.test/pom.xml | 2 +- org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit.pgm/pom.xml | 2 +- org.eclipse.jgit.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.test/pom.xml | 2 +- org.eclipse.jgit.ui/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ui/pom.xml | 2 +- org.eclipse.jgit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF | 4 ++-- org.eclipse.jgit/pom.xml | 2 +- pom.xml | 2 +- 46 files changed, 49 insertions(+), 49 deletions(-) diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index d1e8019f94..c3b9a3790a 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ant.test -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: org.apache.tools.ant, diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index 340c850afd..f8bf0838b3 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.ant.test diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index 8a4a19aca2..0cdf8bac2a 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: org.apache.tools.ant, org.eclipse.jgit.storage.file;version="[4.2.0,4.3.0)" diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 82cdbe23a7..1a445ea877 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -48,7 +48,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.ant diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF index 08912dedec..2bd0164225 100644 --- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.archive -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF index 95a70d1671..8d7846b6a5 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: 4.2.0.201512141825-rc1 -Eclipse-SourceBundle: org.eclipse.jgit.archive;version="4.2.0.201512141825-rc1";roots="." +Bundle-Version: 4.2.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.archive;version="4.2.0.qualifier";roots="." diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml index 76fe2ebfbc..c93da4bf49 100644 --- a/org.eclipse.jgit.archive/pom.xml +++ b/org.eclipse.jgit.archive/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.archive diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF index 2c25b49a21..07f364c535 100644 --- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.jgit.http.apache -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-Localization: plugin Bundle-Vendor: %Provider-Name diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml index 0f08cf1161..68d3c22691 100644 --- a/org.eclipse.jgit.http.apache/pom.xml +++ b/org.eclipse.jgit.http.apache/pom.xml @@ -48,7 +48,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.http.apache diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index a25a1a3a2d..78c41c487c 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Export-Package: org.eclipse.jgit.http.server;version="4.2.0", diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index a4b235e810..9859a1d126 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.http.server diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 9f01eebc32..f8bd4915f9 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 0605f97ec1..dd52a89e6c 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.http.test diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index e97e3f1926..32bca1bda0 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index 237e2c8e2b..a61e6801a9 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.junit.http diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index c7f6baca49..7449004ba8 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index a1d37903b7..bf281e62b2 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.junit 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 091afbdba2..99e153edc6 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 @@ 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 26d474477e..e0bdd3871e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature 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 0aa72ac49a..ac37d07715 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 @@ 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 e42e4c3458..b1f8302fd5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature 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 f89f28c652..00f368cd73 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 @@ 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 1a9a1794aa..2bef9a6d31 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature 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 6fa5e0bfe4..254852f2c7 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 @@ 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 34bbb0b4a0..91e00170b1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml index a402da6b19..f7766ea3a2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml index 022f45d740..cc3b182797 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature 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 77e3311acf..b6e6869feb 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.repository 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 3512979ab4..967d6c23d5 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 @@ 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 7ae6ec5566..8fd1da658f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.feature 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 be87360397..572ac376ee 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: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml index 16484e5e01..8699688649 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -49,7 +49,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.target diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 3b9a2bee94..dd329b4b08 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit jgit.tycho.parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT pom JGit Tycho Parent diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index fbf5cc03e7..db23c3b55f 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index 31d011b5fe..955674a062 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.pgm.test diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index ca5ecbfb76..567fd05750 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-Localization: plugin diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 6a0206091f..a3fef2e29a 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: 4.2.0.201512141825-rc1 -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.2.0.201512141825-rc1";roots="." +Bundle-Version: 4.2.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.2.0.qualifier";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 6c49adcc88..ca2ead2925 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -50,7 +50,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.pgm diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 24e137fd98..37fd367171 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 0ccd2d17d4..539caff149 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.test diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index 3f014171ef..4e2db1bfcc 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Vendor: %provider_name Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.eclipse.jgit.awtui;version="4.2.0" diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index b0c35111ea..6a56f8cf33 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -52,7 +52,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit.ui diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 552880c605..2a953b559d 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 4.2.0.201512141825-rc1 +Bundle-Version: 4.2.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index 3b0b27641e..a03d7df6ce 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: 4.2.0.201512141825-rc1 -Eclipse-SourceBundle: org.eclipse.jgit;version="4.2.0.201512141825-rc1";roots="." +Bundle-Version: 4.2.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit;version="4.2.0.qualifier";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index 0ebae4794d..4f98323e5d 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -53,7 +53,7 @@ org.eclipse.jgit org.eclipse.jgit-parent - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT org.eclipse.jgit diff --git a/pom.xml b/pom.xml index 99d8253452..6b41708354 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ org.eclipse.jgit org.eclipse.jgit-parent pom - 4.2.0.201512141825-rc1 + 4.2.0-SNAPSHOT JGit - Parent ${jgit-url} -- cgit v1.2.3 From d1e821ec3fb234607a4701446a55b2cea7f78fa4 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 15:25:28 +0900 Subject: Don't use deprecated constructors of CmdLineException Change-Id: If01fa896537209821d6a7a262ee978572195a397 Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/pgm/RevParse.java | 4 +++- .../jgit/pgm/opt/AbstractTreeIteratorHandler.java | 12 ++++++------ .../src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java | 4 ++-- .../src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java | 16 +++++++++------- .../src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java | 10 +++++----- .../src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java | 5 ++++- 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java index e02fffd650..e32fc9cab4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java @@ -57,6 +57,7 @@ import org.kohsuke.args4j.Option; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.pgm.internal.CLIText; +import org.eclipse.jgit.pgm.opt.CmdLineParser; @Command(usage = "usage_RevParse") class RevParse extends TextBuiltin { @@ -78,7 +79,8 @@ class RevParse extends TextBuiltin { } } else { if (verify && commits.size() > 1) { - throw new CmdLineException(CLIText.get().needSingleRevision); + final CmdLineParser clp = new CmdLineParser(this); + throw new CmdLineException(clp, CLIText.get().needSingleRevision); } for (final ObjectId o : commits) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java index 229fb67b0c..6b8a61d4d1 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java @@ -109,7 +109,7 @@ public class AbstractTreeIteratorHandler extends try { dirc = DirCache.read(new File(name), FS.DETECTED); } catch (IOException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notAnIndexFile, name), e); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notAnIndexFile, name), e); } setter.addValue(new DirCacheIterator(dirc)); return 1; @@ -119,20 +119,20 @@ public class AbstractTreeIteratorHandler extends try { id = clp.getRepository().resolve(name); } catch (IOException e) { - throw new CmdLineException(e.getMessage()); + throw new CmdLineException(clp, e.getMessage()); } if (id == null) - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); final CanonicalTreeParser p = new CanonicalTreeParser(); try (ObjectReader curs = clp.getRepository().newObjectReader()) { p.reset(curs, clp.getRevWalk().parseTree(id)); } catch (MissingObjectException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); } catch (IncorrectObjectTypeException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); } catch (IOException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); } setter.addValue(p); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java index fa24d4b02f..364809d835 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java @@ -86,14 +86,14 @@ public class ObjectIdHandler extends OptionHandler { try { id = clp.getRepository().resolve(name); } catch (IOException e) { - throw new CmdLineException(e.getMessage()); + throw new CmdLineException(clp, e.getMessage()); } if (id != null) { setter.addValue(id); return 1; } - throw new CmdLineException(MessageFormat.format(CLIText.get().notAnObject, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notAnObject, name)); } @Override diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java index b1be128db1..9ae56e4eaf 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java @@ -96,8 +96,10 @@ public class RevCommitHandler extends OptionHandler { final int dot2 = name.indexOf(".."); //$NON-NLS-1$ if (dot2 != -1) { if (!option.isMultiValued()) - throw new CmdLineException(MessageFormat.format(CLIText.get().onlyOneMetaVarExpectedIn - , option.metaVar(), name)); + throw new CmdLineException(clp, + MessageFormat.format( + CLIText.get().onlyOneMetaVarExpectedIn, + option.metaVar(), name)); final String left = name.substring(0, dot2); final String right = name.substring(dot2 + 2); @@ -116,20 +118,20 @@ public class RevCommitHandler extends OptionHandler { try { id = clp.getRepository().resolve(name); } catch (IOException e) { - throw new CmdLineException(e.getMessage()); + throw new CmdLineException(clp, e.getMessage()); } if (id == null) - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); final RevCommit c; try { c = clp.getRevWalk().parseCommit(id); } catch (MissingObjectException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); } catch (IncorrectObjectTypeException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notACommit, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notACommit, name)); } catch (IOException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); } if (interesting) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java index eb155af9f4..e2879e076a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java @@ -89,20 +89,20 @@ public class RevTreeHandler extends OptionHandler { try { id = clp.getRepository().resolve(name); } catch (IOException e) { - throw new CmdLineException(e.getMessage()); + throw new CmdLineException(clp, e.getMessage()); } if (id == null) - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); final RevTree c; try { c = clp.getRevWalk().parseTree(id); } catch (MissingObjectException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); } catch (IncorrectObjectTypeException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().notATree, name)); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().notATree, name)); } catch (IOException e) { - throw new CmdLineException(MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); + throw new CmdLineException(clp, MessageFormat.format(CLIText.get().cannotReadBecause, name, e.getMessage())); } setter.addValue(c); return 1; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java index c62ef0d2b8..96f3ed0afa 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java @@ -63,6 +63,8 @@ import org.eclipse.jgit.pgm.internal.CLIText; * we can execute at runtime with the remaining arguments of the parser. */ public class SubcommandHandler extends OptionHandler { + private final org.eclipse.jgit.pgm.opt.CmdLineParser clp; + /** * Create a new handler for the command name. *

@@ -75,6 +77,7 @@ public class SubcommandHandler extends OptionHandler { public SubcommandHandler(final CmdLineParser parser, final OptionDef option, final Setter setter) { super(parser, option, setter); + clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } @Override @@ -82,7 +85,7 @@ public class SubcommandHandler extends OptionHandler { final String name = params.getParameter(0); final CommandRef cr = CommandCatalog.get(name); if (cr == null) - throw new CmdLineException(MessageFormat.format( + throw new CmdLineException(clp, MessageFormat.format( CLIText.get().notAJgitCommand, name)); // Force option parsing to stop. Everything after us should -- cgit v1.2.3 From 9ddc0ed83d56a54950fc91b459d473267144f194 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 16:37:39 +0900 Subject: Add $NON-NLS to suppress "Non-externalized string literal" warnings Change-Id: I3e6f83ad2bc7d493e2c1ab5a8c60affa2b49c386 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/pgm/AbstractFetchCommand.java | 16 ++++++++-------- .../src/org/eclipse/jgit/pgm/Config.java | 2 +- .../src/org/eclipse/jgit/pgm/Log.java | 2 +- .../src/org/eclipse/jgit/pgm/Push.java | 20 ++++++++++---------- .../src/org/eclipse/jgit/pgm/Reset.java | 4 ++-- .../org/eclipse/jgit/pgm/debug/DiffAlgorithms.java | 20 ++++++++++---------- .../eclipse/jgit/pgm/debug/RebuildCommitGraph.java | 4 ++-- .../org/eclipse/jgit/pgm/debug/ShowPackDelta.java | 4 ++-- .../eclipse/jgit/pgm/debug/TextHashFunctions.java | 8 ++++---- .../src/org/eclipse/jgit/transport/URIish.java | 2 +- 10 files changed, 41 insertions(+), 41 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java index fde0a78bf6..2cee2cb007 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java @@ -129,20 +129,20 @@ abstract class AbstractFetchCommand extends TextBuiltin { final TrackingRefUpdate u) { final RefUpdate.Result r = u.getResult(); if (r == RefUpdate.Result.LOCK_FAILURE) - return "[lock fail]"; + return "[lock fail]"; //$NON-NLS-1$ if (r == RefUpdate.Result.IO_FAILURE) - return "[i/o error]"; + return "[i/o error]"; //$NON-NLS-1$ if (r == RefUpdate.Result.REJECTED) - return "[rejected]"; + return "[rejected]"; //$NON-NLS-1$ if (ObjectId.zeroId().equals(u.getNewObjectId())) - return "[deleted]"; + return "[deleted]"; //$NON-NLS-1$ if (r == RefUpdate.Result.NEW) { if (u.getRemoteName().startsWith(Constants.R_HEADS)) - return "[new branch]"; + return "[new branch]"; //$NON-NLS-1$ else if (u.getLocalName().startsWith(Constants.R_TAGS)) - return "[new tag]"; - return "[new]"; + return "[new tag]"; //$NON-NLS-1$ + return "[new]"; //$NON-NLS-1$ } if (r == RefUpdate.Result.FORCED) { @@ -158,7 +158,7 @@ abstract class AbstractFetchCommand extends TextBuiltin { } if (r == RefUpdate.Result.NO_CHANGE) - return "[up to date]"; + return "[up to date]"; //$NON-NLS-1$ return "[" + r.name() + "]"; //$NON-NLS-1$//$NON-NLS-2$ } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java index 8569e9278e..faae13a4d7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java @@ -74,7 +74,7 @@ class Config extends TextBuiltin { list(); else throw new NotSupportedException( - "only --list option is currently supported"); + "only --list option is currently supported"); //$NON-NLS-1$ } private void list() throws IOException, ConfigInvalidException { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java index d43424c7ce..6947cdd100 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java @@ -324,7 +324,7 @@ class Log extends RevWalkTextBuiltin { return false; if (emptyLine) outw.println(); - outw.print("Notes"); + outw.print("Notes"); //$NON-NLS-1$ if (label != null) { outw.print(" ("); //$NON-NLS-1$ outw.print(label); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java index 9098c1263d..33ea1deb8e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java @@ -182,15 +182,15 @@ class Push extends TextBuiltin { switch (rru.getStatus()) { case OK: if (rru.isDelete()) - printUpdateLine('-', "[deleted]", null, remoteName, null); + printUpdateLine('-', "[deleted]", null, remoteName, null); //$NON-NLS-1$ else { final Ref oldRef = result.getAdvertisedRef(remoteName); if (oldRef == null) { final String summary; if (remoteName.startsWith(Constants.R_TAGS)) - summary = "[new tag]"; + summary = "[new tag]"; //$NON-NLS-1$ else - summary = "[new branch]"; + summary = "[new branch]"; //$NON-NLS-1$ printUpdateLine('*', summary, srcRef, remoteName, null); } else { boolean fastForward = rru.isFastForward(); @@ -206,16 +206,16 @@ class Push extends TextBuiltin { break; case NON_EXISTING: - printUpdateLine('X', "[no match]", null, remoteName, null); + printUpdateLine('X', "[no match]", null, remoteName, null); //$NON-NLS-1$ break; case REJECTED_NODELETE: - printUpdateLine('!', "[rejected]", null, remoteName, + printUpdateLine('!', "[rejected]", null, remoteName, //$NON-NLS-1$ CLIText.get().remoteSideDoesNotSupportDeletingRefs); break; case REJECTED_NONFASTFORWARD: - printUpdateLine('!', "[rejected]", srcRef, remoteName, + printUpdateLine('!', "[rejected]", srcRef, remoteName, //$NON-NLS-1$ CLIText.get().nonFastForward); break; @@ -223,22 +223,22 @@ class Push extends TextBuiltin { final String message = MessageFormat.format( CLIText.get().remoteRefObjectChangedIsNotExpectedOne, safeAbbreviate(reader, rru.getExpectedOldObjectId())); - printUpdateLine('!', "[rejected]", srcRef, remoteName, message); + printUpdateLine('!', "[rejected]", srcRef, remoteName, message); //$NON-NLS-1$ break; case REJECTED_OTHER_REASON: - printUpdateLine('!', "[remote rejected]", srcRef, remoteName, rru + printUpdateLine('!', "[remote rejected]", srcRef, remoteName, rru //$NON-NLS-1$ .getMessage()); break; case UP_TO_DATE: if (verbose) - printUpdateLine('=', "[up to date]", srcRef, remoteName, null); + printUpdateLine('=', "[up to date]", srcRef, remoteName, null); //$NON-NLS-1$ break; case NOT_ATTEMPTED: case AWAITING_REPORT: - printUpdateLine('?', "[unexpected push-process behavior]", srcRef, + printUpdateLine('?', "[unexpected push-process behavior]", srcRef, //$NON-NLS-1$ remoteName, rru.getMessage()); break; } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java index 6ba076290e..4d3af4b560 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java @@ -89,7 +89,7 @@ class Reset extends TextBuiltin { if (hard) mode = selectMode(mode, ResetType.HARD); if (mode == null) - throw die("no reset mode set"); + throw die("no reset mode set"); //$NON-NLS-1$ command.setMode(mode); } command.call(); @@ -98,7 +98,7 @@ class Reset extends TextBuiltin { private static ResetType selectMode(ResetType mode, ResetType want) { if (mode != null) - throw die("reset modes are mutually exclusive, select one"); + throw die("reset modes are mutually exclusive, select one"); //$NON-NLS-1$ return want; } } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index d856989011..c96f2c1ba4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java @@ -136,7 +136,7 @@ class DiffAlgorithms extends TextBuiltin { protected void run() throws Exception { mxBean = ManagementFactory.getThreadMXBean(); if (!mxBean.isCurrentThreadCpuTimeSupported()) - throw die("Current thread CPU time not supported on this JRE"); + throw die("Current thread CPU time not supported on this JRE"); //$NON-NLS-1$ if (gitDirs.isEmpty()) { RepositoryBuilder rb = new RepositoryBuilder() // @@ -248,18 +248,18 @@ class DiffAlgorithms extends TextBuiltin { File parent = directory.getParentFile(); if (name.equals(Constants.DOT_GIT) && parent != null) name = parent.getName(); - outw.println(name + ": start at " + startId.name()); + outw.println(name + ": start at " + startId.name()); //$NON-NLS-1$ } - outw.format(" %12d files, %8d commits\n", valueOf(files), + outw.format(" %12d files, %8d commits\n", valueOf(files), //$NON-NLS-1$ valueOf(commits)); - outw.format(" N=%10d min lines, %8d max lines\n", valueOf(minN), + outw.format(" N=%10d min lines, %8d max lines\n", valueOf(minN), //$NON-NLS-1$ valueOf(maxN)); - outw.format("%-25s %12s ( %12s %12s )\n", // - "Algorithm", "Time(ns)", "Time(ns) on", "Time(ns) on"); - outw.format("%-25s %12s ( %12s %12s )\n", // - "", "", "N=" + minN, "N=" + maxN); + outw.format("%-25s %12s ( %12s %12s )\n", //$NON-NLS-1$ + "Algorithm", "Time(ns)", "Time(ns) on", "Time(ns) on"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + outw.format("%-25s %12s ( %12s %12s )\n", //$NON-NLS-1$ + "", "", "N=" + minN, "N=" + maxN); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ outw.println("-----------------------------------------------------" //$NON-NLS-1$ + "----------------"); //$NON-NLS-1$ @@ -335,9 +335,9 @@ class DiffAlgorithms extends TextBuiltin { } } } catch (IllegalArgumentException e) { - throw die("Cannot determine names", e); + throw die("Cannot determine names", e); //$NON-NLS-1$ } catch (IllegalAccessException e) { - throw die("Cannot determine names", e); + throw die("Cannot determine names", e); //$NON-NLS-1$ } return all; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java index 6260cd99fa..e2f93f4814 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java @@ -167,7 +167,7 @@ class RebuildCommitGraph extends TextBuiltin { } } - pm.beginTask("Rewriting commits", queue.size()); + pm.beginTask("Rewriting commits", queue.size()); //$NON-NLS-1$ try (ObjectInserter oi = db.newObjectInserter()) { final ObjectId emptyTree = oi.insert(Constants.OBJ_TREE, new byte[] {}); @@ -203,7 +203,7 @@ class RebuildCommitGraph extends TextBuiltin { newc.setAuthor(new PersonIdent(me, new Date(t.commitTime))); newc.setCommitter(newc.getAuthor()); newc.setParentIds(newParents); - newc.setMessage("ORIGINAL " + t.oldId.name() + "\n"); //$NON-NLS-2$ + newc.setMessage("ORIGINAL " + t.oldId.name() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ t.newId = oi.insert(newc); rewrites.put(t.oldId, t.newId); pm.update(1); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java index d3eb245cd9..150fe6eecb 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java @@ -87,9 +87,9 @@ class ShowPackDelta extends TextBuiltin { long size = reader.getObjectSize(obj, obj.getType()); try { if (BinaryDelta.getResultSize(delta) != size) - throw die("Object " + obj.name() + " is not a delta"); + throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$ } catch (ArrayIndexOutOfBoundsException bad) { - throw die("Object " + obj.name() + " is not a delta"); + throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$ } outw.println(BinaryDelta.format(delta)); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index 887ad08af7..062f4e7a1f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -349,10 +349,10 @@ class TextHashFunctions extends TextBuiltin { name = parent.getName(); outw.println(name + ":"); //$NON-NLS-1$ } - outw.format(" %6d files; %5d avg. unique lines/file\n", // + outw.format(" %6d files; %5d avg. unique lines/file\n", //$NON-NLS-1$ valueOf(fileCnt), // valueOf(lineCnt / fileCnt)); - outw.format("%-20s %-15s %9s\n", "Hash", "Fold", "Max Len"); + outw.format("%-20s %-15s %9s\n", "Hash", "Fold", "Max Len"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ outw.println("-----------------------------------------------"); //$NON-NLS-1$ String lastHashName = null; for (Function fun : all) { @@ -405,9 +405,9 @@ class TextHashFunctions extends TextBuiltin { } } } catch (IllegalArgumentException e) { - throw new RuntimeException("Cannot determine names", e); + throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$ } catch (IllegalAccessException e) { - throw new RuntimeException("Cannot determine names", e); + throw new RuntimeException("Cannot determine names", e); //$NON-NLS-1$ } List all = new ArrayList(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java index 9aeb840ebe..2f9dfa1d6b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java @@ -715,7 +715,7 @@ public class URIish implements Serializable { */ public String getHumanishName() throws IllegalArgumentException { String s = getPath(); - if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$ + if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$ //$NON-NLS-2$ s = getHost(); if (s == null) // $NON-NLS-1$ throw new IllegalArgumentException(); -- cgit v1.2.3 From 75e096c80ad3ad413c4ebb0b5369dc6417db00d9 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:01:50 +0900 Subject: Suppress "The allocated object is never used" warning in tests Change-Id: Ibb405e0b36ce5a2cb30268a7de31ab2bd079ad80 Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java | 3 +++ .../eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java | 3 +++ .../tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java | 1 + .../tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java | 2 ++ .../tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java | 2 ++ org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java | 2 ++ 6 files changed, 13 insertions(+) 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 dc7181aece..05fa007904 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 @@ -69,6 +69,7 @@ public class DirCacheEntryTest { assertFalse(isValidPath("a\u0000b")); } + @SuppressWarnings("unused") private static boolean isValidPath(String path) { try { new DirCacheEntry(path); @@ -78,6 +79,7 @@ public class DirCacheEntryTest { } } + @SuppressWarnings("unused") @Test public void testCreate_ByStringPath() { assertEquals("a", new DirCacheEntry("a").getPathString()); @@ -91,6 +93,7 @@ public class DirCacheEntryTest { } } + @SuppressWarnings("unused") @Test public void testCreate_ByStringPathAndStage() { DirCacheEntry e; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java index 280d6040cc..2d72d2373b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java @@ -72,6 +72,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { .findGitDir(d).getGitDir()); } + @SuppressWarnings("unused") @Test public void emptyRepositoryFormatVersion() throws Exception { Repository r = createWorkRepository(); @@ -83,6 +84,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { new FileRepository(r.getDirectory()); } + @SuppressWarnings("unused") @Test public void invalidRepositoryFormatVersion() throws Exception { Repository r = createWorkRepository(); @@ -99,6 +101,7 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { } } + @SuppressWarnings("unused") @Test public void unknownRepositoryFormatVersion() throws Exception { Repository r = createWorkRepository(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java index 5670a9634d..a92ff8d04e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java @@ -364,6 +364,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { assertNotSame(db.getConfig(), db2.getConfig()); } + @SuppressWarnings("unused") @Test public void test008_FailOnWrongVersion() throws IOException { final File cfg = new File(db.getDirectory(), Constants.CONFIG); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java index 315c495606..1515a07ac4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java @@ -75,11 +75,13 @@ public class T0001_PersonIdentTest { p.toExternalString()); } + @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void nullForNameShouldThrowIllegalArgumentException() { new PersonIdent(null, "author@example.com"); } + @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void nullForEmailShouldThrowIllegalArgumentException() { new PersonIdent("A U Thor", null); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java index e9ae1909ea..3661677cd9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java @@ -195,6 +195,7 @@ public class SideBandOutputStreamTest { assertEquals(1, flushCnt[0]); } + @SuppressWarnings("unused") @Test public void testConstructor_RejectsBadChannel() { try { @@ -220,6 +221,7 @@ public class SideBandOutputStreamTest { } } + @SuppressWarnings("unused") @Test public void testConstructor_RejectsBadBufferSize() { try { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java index 76eb18afdf..0fda72cf9d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java @@ -64,6 +64,7 @@ public class URIishTest { private static final String GIT_SCHEME = "git://"; + @SuppressWarnings("unused") @Test public void shouldRaiseErrorOnEmptyURI() throws Exception { try { @@ -74,6 +75,7 @@ public class URIishTest { } } + @SuppressWarnings("unused") @Test public void shouldRaiseErrorOnNullURI() throws Exception { try { -- cgit v1.2.3 From 3b63a242efff6ee2e3f3d87d40b8fbdd1fddacd3 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:25:56 +0900 Subject: URIishTest: Use @Test annotation's `expected` argument Specify the expected exception in the annotation, instead of catching it and calling `fail()` when it wasn't raised. Change-Id: I8a640c0e42353533e4e73b85b50c224dc060f2d7 Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/transport/URIishTest.java | 46 +++++----------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java index 0fda72cf9d..2078dd337b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java @@ -51,7 +51,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.io.File; import java.io.IOException; @@ -65,25 +64,15 @@ public class URIishTest { private static final String GIT_SCHEME = "git://"; @SuppressWarnings("unused") - @Test + @Test(expected = URISyntaxException.class) public void shouldRaiseErrorOnEmptyURI() throws Exception { - try { - new URIish(""); - fail("expecting an exception"); - } catch (URISyntaxException e) { - // expected - } + new URIish(""); } @SuppressWarnings("unused") - @Test + @Test(expected = URISyntaxException.class) public void shouldRaiseErrorOnNullURI() throws Exception { - try { - new URIish((String) null); - fail("expecting an exception"); - } catch (URISyntaxException e) { - // expected - } + new URIish((String) null); } @Test @@ -594,34 +583,19 @@ public class URIishTest { assertEquals(u, new URIish(str)); } - @Test + @Test(expected = IllegalArgumentException.class) public void testGetNullHumanishName() { - try { - new URIish().getHumanishName(); - fail("path must be not null"); - } catch (IllegalArgumentException e) { - // expected - } + new URIish().getHumanishName(); } - @Test + @Test(expected = IllegalArgumentException.class) public void testGetEmptyHumanishName() throws URISyntaxException { - try { - new URIish(GIT_SCHEME).getHumanishName(); - fail("empty path is useless"); - } catch (IllegalArgumentException e) { - // expected - } + new URIish(GIT_SCHEME).getHumanishName(); } - @Test + @Test(expected = IllegalArgumentException.class) public void testGetAbsEmptyHumanishName() { - try { - new URIish().getHumanishName(); - fail("empty path is useless"); - } catch (IllegalArgumentException e) { - // expected - } + new URIish().getHumanishName(); } @Test -- cgit v1.2.3 From 9d721de69bd160c070f6de7ce6a011fd955c9679 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:38:18 +0900 Subject: BranchTest: Create Git instances in try-with-resource Change-Id: I8becee479fab91a18e6daffd6f4fd57338c9d120 Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/pgm/BranchTest.java | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java index 4200cd05cf..d1bd5baceb 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BranchTest.java @@ -57,7 +57,9 @@ public class BranchTest extends CLIRepositoryTestCase { @Before public void setUp() throws Exception { super.setUp(); - new Git(db).commit().setMessage("initial commit").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); + } } @Test @@ -77,13 +79,15 @@ public class BranchTest extends CLIRepositoryTestCase { @Test public void testListContains() throws Exception { - new Git(db).branchCreate().setName("initial").call(); - RevCommit second = new Git(db).commit().setMessage("second commit") - .call(); - assertArrayOfLinesEquals(new String[] { " initial", "* master", "" }, - execute("git branch --contains 6fd41be")); - assertArrayOfLinesEquals(new String[] { "* master", "" }, - execute("git branch --contains " + second.name())); + try (Git git = new Git(db)) { + git.branchCreate().setName("initial").call(); + RevCommit second = git.commit().setMessage("second commit") + .call(); + assertArrayOfLinesEquals(new String[] { " initial", "* master", "" }, + execute("git branch --contains 6fd41be")); + assertArrayOfLinesEquals(new String[] { "* master", "" }, + execute("git branch --contains " + second.name())); + } } @Test -- cgit v1.2.3 From 7f84e40f31c692df57c75719bb1733dbb8d0eb40 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:49:26 +0900 Subject: CheckoutTest: Create Git instances in try-with-resource Change-Id: I49a03f7bee0b61c062ce160674f9aa0cd1bcc8ba Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/pgm/CheckoutTest.java | 591 +++++++++++---------- 1 file changed, 306 insertions(+), 285 deletions(-) diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java index 939a9f6fdd..cb36d057e4 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CheckoutTest.java @@ -66,27 +66,33 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void testCheckoutSelf() throws Exception { - new Git(db).commit().setMessage("initial commit").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); - assertStringArrayEquals("Already on 'master'", - execute("git checkout master")); + assertStringArrayEquals("Already on 'master'", + execute("git checkout master")); + } } @Test public void testCheckoutBranch() throws Exception { - new Git(db).commit().setMessage("initial commit").call(); - new Git(db).branchCreate().setName("side").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); + git.branchCreate().setName("side").call(); - assertStringArrayEquals("Switched to branch 'side'", - execute("git checkout side")); + assertStringArrayEquals("Switched to branch 'side'", + execute("git checkout side")); + } } @Test public void testCheckoutNewBranch() throws Exception { - new Git(db).commit().setMessage("initial commit").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); - assertStringArrayEquals("Switched to a new branch 'side'", - execute("git checkout -b side")); + assertStringArrayEquals("Switched to a new branch 'side'", + execute("git checkout -b side")); + } } @Test @@ -98,11 +104,13 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void testCheckoutNewBranchThatAlreadyExists() throws Exception { - new Git(db).commit().setMessage("initial commit").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); - assertStringArrayEquals( - "fatal: A branch named 'master' already exists.", - execute("git checkout -b master")); + assertStringArrayEquals( + "fatal: A branch named 'master' already exists.", + execute("git checkout -b master")); + } } @Test @@ -120,32 +128,35 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void testCheckoutHead() throws Exception { - new Git(db).commit().setMessage("initial commit").call(); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); - assertStringArrayEquals("", execute("git checkout HEAD")); + assertStringArrayEquals("", execute("git checkout HEAD")); + } } @Test public void testCheckoutExistingBranchWithConflict() throws Exception { - Git git = new Git(db); - writeTrashFile("a", "Hello world a"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("commit file a").call(); - git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/b", "Hello world b"); - git.add().addFilepattern("a/b").call(); - git.commit().setMessage("commit folder a").call(); - git.rm().addFilepattern("a").call(); - writeTrashFile("a", "New Hello world a"); - git.add().addFilepattern(".").call(); - - String[] execute = execute("git checkout branch_1"); - assertEquals( - "error: Your local changes to the following files would be overwritten by checkout:", - execute[0]); - assertEquals("\ta", execute[1]); + try (Git git = new Git(db)) { + writeTrashFile("a", "Hello world a"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("commit file a").call(); + git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/b", "Hello world b"); + git.add().addFilepattern("a/b").call(); + git.commit().setMessage("commit folder a").call(); + git.rm().addFilepattern("a").call(); + writeTrashFile("a", "New Hello world a"); + git.add().addFilepattern(".").call(); + + String[] execute = execute("git checkout branch_1"); + assertEquals( + "error: Your local changes to the following files would be overwritten by checkout:", + execute[0]); + assertEquals("\ta", execute[1]); + } } /** @@ -167,41 +178,43 @@ public class CheckoutTest extends CLIRepositoryTestCase { */ @Test public void testCheckoutWithMissingWorkingTreeFile() throws Exception { - Git git = new Git(db); - File fileA = writeTrashFile("a", "Hello world a"); - writeTrashFile("b", "Hello world b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add files a & b").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - writeTrashFile("a", "b"); - git.add().addFilepattern("a").call(); - git.commit().setMessage("modify file a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - FileUtils.delete(fileA); - - git.checkout().setName(branch_1.getName()).call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - assertEquals("Hello world a", read(fileA)); + try (Git git = new Git(db)) { + File fileA = writeTrashFile("a", "Hello world a"); + writeTrashFile("b", "Hello world b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add files a & b").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + writeTrashFile("a", "b"); + git.add().addFilepattern("a").call(); + git.commit().setMessage("modify file a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + FileUtils.delete(fileA); + + git.checkout().setName(branch_1.getName()).call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + assertEquals("Hello world a", read(fileA)); + } } @Test public void testCheckoutOrphan() throws Exception { - Git git = new Git(db); - git.commit().setMessage("initial commit").call(); - - assertStringArrayEquals("Switched to a new branch 'new_branch'", - execute("git checkout --orphan new_branch")); - assertEquals("refs/heads/new_branch", - db.exactRef("HEAD").getTarget().getName()); - RevCommit commit = git.commit().setMessage("orphan commit").call(); - assertEquals(0, commit.getParentCount()); + try (Git git = new Git(db)) { + git.commit().setMessage("initial commit").call(); + + assertStringArrayEquals("Switched to a new branch 'new_branch'", + execute("git checkout --orphan new_branch")); + assertEquals("refs/heads/new_branch", + db.exactRef("HEAD").getTarget().getName()); + RevCommit commit = git.commit().setMessage("orphan commit").call(); + assertEquals(0, commit.getParentCount()); + } } /** @@ -224,33 +237,34 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void fileModeTestMissingThenFolderWithFileInWorkingTree() throws Exception { - Git git = new Git(db); - writeTrashFile("b", "Hello world b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add file b").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - File folderA = new File(db.getWorkTree(), "a"); - FileUtils.mkdirs(folderA); - writeTrashFile("a/c", "Hello world c"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add folder a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); - - FileUtils.delete(folderA, FileUtils.RECURSIVE); - writeTrashFile("a", "b"); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - git.checkout().setName(branch_1.getName()).call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + try (Git git = new Git(db)) { + writeTrashFile("b", "Hello world b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add file b").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + File folderA = new File(db.getWorkTree(), "a"); + FileUtils.mkdirs(folderA); + writeTrashFile("a/c", "Hello world c"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add folder a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + + FileUtils.delete(folderA, FileUtils.RECURSIVE); + writeTrashFile("a", "b"); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + git.checkout().setName(branch_1.getName()).call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + } } /** @@ -272,30 +286,31 @@ public class CheckoutTest extends CLIRepositoryTestCase { */ @Test public void fileModeTestFolderWithMissingInWorkingTree() throws Exception { - Git git = new Git(db); - writeTrashFile("b", "Hello world b"); - writeTrashFile("a", "b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add file b & file a").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - File folderA = new File(db.getWorkTree(), "a"); - FileUtils.mkdirs(folderA); - writeTrashFile("a/c", "Hello world c"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add folder a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); - - FileUtils.delete(folderA, FileUtils.RECURSIVE); - - git.checkout().setName(branch_1.getName()).call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + try (Git git = new Git(db)) { + writeTrashFile("b", "Hello world b"); + writeTrashFile("a", "b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add file b & file a").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + File folderA = new File(db.getWorkTree(), "a"); + FileUtils.mkdirs(folderA); + writeTrashFile("a/c", "Hello world c"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add folder a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + + FileUtils.delete(folderA, FileUtils.RECURSIVE); + + git.checkout().setName(branch_1.getName()).call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + } } /** @@ -317,32 +332,33 @@ public class CheckoutTest extends CLIRepositoryTestCase { */ @Test public void fileModeTestMissingWithFolderInWorkingTree() throws Exception { - Git git = new Git(db); - writeTrashFile("b", "Hello world b"); - writeTrashFile("a", "b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add file b & file a").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - git.commit().setMessage("delete file a").call(); - - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/c", "Hello world c"); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); - - CheckoutConflictException exception = null; - try { - git.checkout().setName(branch_1.getName()).call(); - } catch (CheckoutConflictException e) { - exception = e; + try (Git git = new Git(db)) { + writeTrashFile("b", "Hello world b"); + writeTrashFile("a", "b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add file b & file a").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + git.commit().setMessage("delete file a").call(); + + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/c", "Hello world c"); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + + CheckoutConflictException exception = null; + try { + git.checkout().setName(branch_1.getName()).call(); + } catch (CheckoutConflictException e) { + exception = e; + } + assertNotNull(exception); + assertEquals(2, exception.getConflictingPaths().size()); + assertEquals("a", exception.getConflictingPaths().get(0)); + assertEquals("a/c", exception.getConflictingPaths().get(1)); } - assertNotNull(exception); - assertEquals(2, exception.getConflictingPaths().size()); - assertEquals("a", exception.getConflictingPaths().get(0)); - assertEquals("a/c", exception.getConflictingPaths().get(1)); } /** @@ -364,40 +380,41 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void fileModeTestFolderThenMissingWithFileInWorkingTree() throws Exception { - Git git = new Git(db); - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/c", "Hello world c"); - writeTrashFile("b", "Hello world b"); - git.add().addFilepattern(".").call(); - RevCommit commit1 = git.commit().setMessage("add folder a & file b") - .call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - RevCommit commit2 = git.commit().setMessage("delete folder a").call(); - - TreeWalk tw = new TreeWalk(db); - tw.addTree(commit1.getTree()); - tw.addTree(commit2.getTree()); - List scan = DiffEntry.scan(tw); - assertEquals(1, scan.size()); - assertEquals(FileMode.MISSING, scan.get(0).getNewMode()); - assertEquals(FileMode.TREE, scan.get(0).getOldMode()); - - writeTrashFile("a", "b"); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - CheckoutConflictException exception = null; - try { - git.checkout().setName(branch_1.getName()).call(); - } catch (CheckoutConflictException e) { - exception = e; + try (Git git = new Git(db)) { + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/c", "Hello world c"); + writeTrashFile("b", "Hello world b"); + git.add().addFilepattern(".").call(); + RevCommit commit1 = git.commit().setMessage("add folder a & file b") + .call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + RevCommit commit2 = git.commit().setMessage("delete folder a").call(); + + TreeWalk tw = new TreeWalk(db); + tw.addTree(commit1.getTree()); + tw.addTree(commit2.getTree()); + List scan = DiffEntry.scan(tw); + assertEquals(1, scan.size()); + assertEquals(FileMode.MISSING, scan.get(0).getNewMode()); + assertEquals(FileMode.TREE, scan.get(0).getOldMode()); + + writeTrashFile("a", "b"); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + CheckoutConflictException exception = null; + try { + git.checkout().setName(branch_1.getName()).call(); + } catch (CheckoutConflictException e) { + exception = e; + } + assertNotNull(exception); + assertEquals(1, exception.getConflictingPaths().size()); + assertEquals("a", exception.getConflictingPaths().get(0)); } - assertNotNull(exception); - assertEquals(1, exception.getConflictingPaths().size()); - assertEquals("a", exception.getConflictingPaths().get(0)); } /** @@ -420,30 +437,31 @@ public class CheckoutTest extends CLIRepositoryTestCase { @Test public void fileModeTestFolderThenFileWithMissingInWorkingTree() throws Exception { - Git git = new Git(db); - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/c", "Hello world c"); - writeTrashFile("b", "Hello world b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add folder a & file b").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - File fileA = new File(db.getWorkTree(), "a"); - writeTrashFile("a", "b"); - git.add().addFilepattern("a").call(); - git.commit().setMessage("add file a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - FileUtils.delete(fileA); - - git.checkout().setName(branch_1.getName()).call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); + try (Git git = new Git(db)) { + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/c", "Hello world c"); + writeTrashFile("b", "Hello world b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add folder a & file b").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + File fileA = new File(db.getWorkTree(), "a"); + writeTrashFile("a", "b"); + git.add().addFilepattern("a").call(); + git.commit().setMessage("add file a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + FileUtils.delete(fileA); + + git.checkout().setName(branch_1.getName()).call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + } } /** @@ -464,38 +482,39 @@ public class CheckoutTest extends CLIRepositoryTestCase { */ @Test public void fileModeTestFileThenFileWithFolderInIndex() throws Exception { - Git git = new Git(db); - writeTrashFile("a", "Hello world a"); - writeTrashFile("b", "Hello world b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add files a & b").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - writeTrashFile("a", "b"); - git.add().addFilepattern("a").call(); - git.commit().setMessage("add file a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - git.rm().addFilepattern("a").call(); - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/c", "Hello world c"); - git.add().addFilepattern(".").call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); - - CheckoutConflictException exception = null; - try { - git.checkout().setName(branch_1.getName()).call(); - } catch (CheckoutConflictException e) { - exception = e; + try (Git git = new Git(db)) { + writeTrashFile("a", "Hello world a"); + writeTrashFile("b", "Hello world b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add files a & b").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + writeTrashFile("a", "b"); + git.add().addFilepattern("a").call(); + git.commit().setMessage("add file a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + git.rm().addFilepattern("a").call(); + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/c", "Hello world c"); + git.add().addFilepattern(".").call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + + CheckoutConflictException exception = null; + try { + git.checkout().setName(branch_1.getName()).call(); + } catch (CheckoutConflictException e) { + exception = e; + } + assertNotNull(exception); + assertEquals(1, exception.getConflictingPaths().size()); + assertEquals("a", exception.getConflictingPaths().get(0)); } - assertNotNull(exception); - assertEquals(1, exception.getConflictingPaths().size()); - assertEquals("a", exception.getConflictingPaths().get(0)); } /** @@ -517,65 +536,67 @@ public class CheckoutTest extends CLIRepositoryTestCase { */ @Test public void fileModeTestFileWithFolderInIndex() throws Exception { - Git git = new Git(db); - writeTrashFile("b", "Hello world b"); - writeTrashFile("a", "b"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("add file b & file a").call(); - Ref branch_1 = git.branchCreate().setName("branch_1").call(); - git.rm().addFilepattern("a").call(); - writeTrashFile("a", "Hello world a"); - git.add().addFilepattern("a").call(); - git.commit().setMessage("add file a").call(); - - FileEntry entry = new FileTreeIterator.FileEntry(new File( - db.getWorkTree(), "a"), db.getFS()); - assertEquals(FileMode.REGULAR_FILE, entry.getMode()); - - git.rm().addFilepattern("a").call(); - FileUtils.mkdirs(new File(db.getWorkTree(), "a")); - writeTrashFile("a/c", "Hello world c"); - git.add().addFilepattern(".").call(); - - entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), - db.getFS()); - assertEquals(FileMode.TREE, entry.getMode()); - - CheckoutConflictException exception = null; - try { - git.checkout().setName(branch_1.getName()).call(); - } catch (CheckoutConflictException e) { - exception = e; + try (Git git = new Git(db)) { + writeTrashFile("b", "Hello world b"); + writeTrashFile("a", "b"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("add file b & file a").call(); + Ref branch_1 = git.branchCreate().setName("branch_1").call(); + git.rm().addFilepattern("a").call(); + writeTrashFile("a", "Hello world a"); + git.add().addFilepattern("a").call(); + git.commit().setMessage("add file a").call(); + + FileEntry entry = new FileTreeIterator.FileEntry(new File( + db.getWorkTree(), "a"), db.getFS()); + assertEquals(FileMode.REGULAR_FILE, entry.getMode()); + + git.rm().addFilepattern("a").call(); + FileUtils.mkdirs(new File(db.getWorkTree(), "a")); + writeTrashFile("a/c", "Hello world c"); + git.add().addFilepattern(".").call(); + + entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"), + db.getFS()); + assertEquals(FileMode.TREE, entry.getMode()); + + CheckoutConflictException exception = null; + try { + git.checkout().setName(branch_1.getName()).call(); + } catch (CheckoutConflictException e) { + exception = e; + } + assertNotNull(exception); + assertEquals(1, exception.getConflictingPaths().size()); + assertEquals("a", exception.getConflictingPaths().get(0)); + + // TODO: ideally we'd like to get two paths from this exception + // assertEquals(2, exception.getConflictingPaths().size()); + // assertEquals("a", exception.getConflictingPaths().get(0)); + // assertEquals("a/c", exception.getConflictingPaths().get(1)); } - assertNotNull(exception); - assertEquals(1, exception.getConflictingPaths().size()); - assertEquals("a", exception.getConflictingPaths().get(0)); - - // TODO: ideally we'd like to get two paths from this exception - // assertEquals(2, exception.getConflictingPaths().size()); - // assertEquals("a", exception.getConflictingPaths().get(0)); - // assertEquals("a/c", exception.getConflictingPaths().get(1)); } @Test public void testCheckoutPath() throws Exception { - Git git = new Git(db); - writeTrashFile("a", "Hello world a"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("commit file a").call(); - git.branchCreate().setName("branch_1").call(); - git.checkout().setName("branch_1").call(); - File b = writeTrashFile("b", "Hello world b"); - git.add().addFilepattern("b").call(); - git.commit().setMessage("commit file b").call(); - File a = writeTrashFile("a", "New Hello world a"); - git.add().addFilepattern(".").call(); - git.commit().setMessage("modified a").call(); - assertArrayEquals(new String[] { "" }, - execute("git checkout HEAD~2 -- a")); - assertEquals("Hello world a", read(a)); - assertArrayEquals(new String[] { "* branch_1", " master", "" }, - execute("git branch")); - assertEquals("Hello world b", read(b)); + try (Git git = new Git(db)) { + writeTrashFile("a", "Hello world a"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("commit file a").call(); + git.branchCreate().setName("branch_1").call(); + git.checkout().setName("branch_1").call(); + File b = writeTrashFile("b", "Hello world b"); + git.add().addFilepattern("b").call(); + git.commit().setMessage("commit file b").call(); + File a = writeTrashFile("a", "New Hello world a"); + git.add().addFilepattern(".").call(); + git.commit().setMessage("modified a").call(); + assertArrayEquals(new String[] { "" }, + execute("git checkout HEAD~2 -- a")); + assertEquals("Hello world a", read(a)); + assertArrayEquals(new String[] { "* branch_1", " master", "" }, + execute("git branch")); + assertEquals("Hello world b", read(b)); + } } } -- cgit v1.2.3 From 78b3f174f21102bb8e36d3a2d16a2956a3265045 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:53:28 +0900 Subject: BranchCommandTest: Create Git instances in try-with-resource Also remove a local variable in one of the tests that was hiding a member variable with the same name. Change-Id: Ia4d94cdbf2d83d8be2645f0a93d8891d01606c59 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/api/BranchCommandTest.java | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java index 910a645e2b..2fe40b99ed 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java @@ -104,37 +104,38 @@ public class BranchCommandTest extends RepositoryTestCase { private Git setUpRepoWithRemote() throws Exception { Repository remoteRepository = createWorkRepository(); - Git remoteGit = new Git(remoteRepository); - // commit something - writeTrashFile("Test.txt", "Hello world"); - remoteGit.add().addFilepattern("Test.txt").call(); - initialCommit = remoteGit.commit().setMessage("Initial commit").call(); - writeTrashFile("Test.txt", "Some change"); - remoteGit.add().addFilepattern("Test.txt").call(); - secondCommit = remoteGit.commit().setMessage("Second commit").call(); - // create a master branch - RefUpdate rup = remoteRepository.updateRef("refs/heads/master"); - rup.setNewObjectId(initialCommit.getId()); - rup.forceUpdate(); - - Repository localRepository = createWorkRepository(); - Git localGit = new Git(localRepository); - StoredConfig config = localRepository.getConfig(); - RemoteConfig rc = new RemoteConfig(config, "origin"); - rc.addURI(new URIish(remoteRepository.getDirectory().getAbsolutePath())); - rc.addFetchRefSpec(new RefSpec("+refs/heads/*:refs/remotes/origin/*")); - rc.update(config); - config.save(); - FetchResult res = localGit.fetch().setRemote("origin").call(); - assertFalse(res.getTrackingRefUpdates().isEmpty()); - rup = localRepository.updateRef("refs/heads/master"); - rup.setNewObjectId(initialCommit.getId()); - rup.forceUpdate(); - rup = localRepository.updateRef(Constants.HEAD); - rup.link("refs/heads/master"); - rup.setNewObjectId(initialCommit.getId()); - rup.update(); - return localGit; + try (Git remoteGit = new Git(remoteRepository)) { + // commit something + writeTrashFile("Test.txt", "Hello world"); + remoteGit.add().addFilepattern("Test.txt").call(); + initialCommit = remoteGit.commit().setMessage("Initial commit").call(); + writeTrashFile("Test.txt", "Some change"); + remoteGit.add().addFilepattern("Test.txt").call(); + secondCommit = remoteGit.commit().setMessage("Second commit").call(); + // create a master branch + RefUpdate rup = remoteRepository.updateRef("refs/heads/master"); + rup.setNewObjectId(initialCommit.getId()); + rup.forceUpdate(); + + Repository localRepository = createWorkRepository(); + Git localGit = new Git(localRepository); + StoredConfig config = localRepository.getConfig(); + RemoteConfig rc = new RemoteConfig(config, "origin"); + rc.addURI(new URIish(remoteRepository.getDirectory().getAbsolutePath())); + rc.addFetchRefSpec(new RefSpec("+refs/heads/*:refs/remotes/origin/*")); + rc.update(config); + config.save(); + FetchResult res = localGit.fetch().setRemote("origin").call(); + assertFalse(res.getTrackingRefUpdates().isEmpty()); + rup = localRepository.updateRef("refs/heads/master"); + rup.setNewObjectId(initialCommit.getId()); + rup.forceUpdate(); + rup = localRepository.updateRef(Constants.HEAD); + rup.link("refs/heads/master"); + rup.setNewObjectId(initialCommit.getId()); + rup.update(); + return localGit; + } } @Test @@ -192,8 +193,7 @@ public class BranchCommandTest extends RepositoryTestCase { @Test public void testListAllBranchesShouldNotDie() throws Exception { - Git git = setUpRepoWithRemote(); - git.branchList().setListMode(ListMode.ALL).call(); + setUpRepoWithRemote().branchList().setListMode(ListMode.ALL).call(); } @Test -- cgit v1.2.3 From 4b93de43bafd419b973ebf242e4ca1dd3b3b87d1 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 17:56:49 +0900 Subject: CheckoutCommandTest: Create Git instances in try-with-resource Also rename a local variable in one of the tests that was hiding a class variable of the same name. Change-Id: Ia9398157b87a78df6eef0b64a833c16ca2e57ce3 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/api/CheckoutCommandTest.java | 97 +++++++++++----------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java index 4bfb128cbc..362d7ac9c9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java @@ -417,20 +417,20 @@ public class CheckoutCommandTest extends RepositoryTestCase { InvalidRemoteException, TransportException { // create second repository Repository db2 = createWorkRepository(); - Git git2 = new Git(db2); - - // setup the second repository to fetch from the first repository - final StoredConfig config = db2.getConfig(); - RemoteConfig remoteConfig = new RemoteConfig(config, "origin"); - URIish uri = new URIish(db.getDirectory().toURI().toURL()); - remoteConfig.addURI(uri); - remoteConfig.update(config); - config.save(); - - // fetch from first repository - RefSpec spec = new RefSpec("+refs/heads/*:refs/remotes/origin/*"); - git2.fetch().setRemote("origin").setRefSpecs(spec).call(); - return db2; + try (Git git2 = new Git(db2)) { + // setup the second repository to fetch from the first repository + final StoredConfig config = db2.getConfig(); + RemoteConfig remoteConfig = new RemoteConfig(config, "origin"); + URIish uri = new URIish(db.getDirectory().toURI().toURL()); + remoteConfig.addURI(uri); + remoteConfig.update(config); + config.save(); + + // fetch from first repository + RefSpec spec = new RefSpec("+refs/heads/*:refs/remotes/origin/*"); + git2.fetch().setRemote("origin").setRefSpecs(spec).call(); + return db2; + } } private CheckoutCommand newOrphanBranchCommand() { @@ -639,40 +639,41 @@ public class CheckoutCommandTest extends RepositoryTestCase { File clean_filter = writeTempFile("sed s/V1/@version/g -"); File smudge_filter = writeTempFile("sed s/@version/V1/g -"); - Git git = new Git(db); - StoredConfig config = git.getRepository().getConfig(); - config.setString("filter", "tstFilter", "smudge", - "sh " + slashify(smudge_filter.getPath())); - config.setString("filter", "tstFilter", "clean", - "sh " + slashify(clean_filter.getPath())); - config.save(); - writeTrashFile(".gitattributes", "*.txt filter=tstFilter"); - git.add().addFilepattern(".gitattributes").call(); - git.commit().setMessage("add attributes").call(); - - writeTrashFile("filterTest.txt", "hello world, V1"); - git.add().addFilepattern("filterTest.txt").call(); - git.commit().setMessage("add filterText.txt").call(); - assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:hello world, @version]", - indexState(CONTENT)); - - git.checkout().setCreateBranch(true).setName("test2").call(); - writeTrashFile("filterTest.txt", "bon giorno world, V1"); - git.add().addFilepattern("filterTest.txt").call(); - git.commit().setMessage("modified filterText.txt").call(); - - assertTrue(git.status().call().isClean()); - assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:bon giorno world, @version]", - indexState(CONTENT)); - - git.checkout().setName("refs/heads/test").call(); - assertTrue(git.status().call().isClean()); - assertEquals( - "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:hello world, @version]", - indexState(CONTENT)); - assertEquals("hello world, V1", read("filterTest.txt")); + try (Git git2 = new Git(db)) { + StoredConfig config = git.getRepository().getConfig(); + config.setString("filter", "tstFilter", "smudge", + "sh " + slashify(smudge_filter.getPath())); + config.setString("filter", "tstFilter", "clean", + "sh " + slashify(clean_filter.getPath())); + config.save(); + writeTrashFile(".gitattributes", "*.txt filter=tstFilter"); + git2.add().addFilepattern(".gitattributes").call(); + git2.commit().setMessage("add attributes").call(); + + writeTrashFile("filterTest.txt", "hello world, V1"); + git2.add().addFilepattern("filterTest.txt").call(); + git2.commit().setMessage("add filterText.txt").call(); + assertEquals( + "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:hello world, @version]", + indexState(CONTENT)); + + git2.checkout().setCreateBranch(true).setName("test2").call(); + writeTrashFile("filterTest.txt", "bon giorno world, V1"); + git2.add().addFilepattern("filterTest.txt").call(); + git2.commit().setMessage("modified filterText.txt").call(); + + assertTrue(git2.status().call().isClean()); + assertEquals( + "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:bon giorno world, @version]", + indexState(CONTENT)); + + git2.checkout().setName("refs/heads/test").call(); + assertTrue(git2.status().call().isClean()); + assertEquals( + "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some other change][filterTest.txt, mode:100644, content:hello world, @version]", + indexState(CONTENT)); + assertEquals("hello world, V1", read("filterTest.txt")); + } } private File writeTempFile(String body) throws IOException { -- cgit v1.2.3