diff options
Diffstat (limited to 'org.eclipse.jgit.pgm')
9 files changed, 67 insertions, 72 deletions
diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs index 06ddbabb48..13c32a6d94 100644 --- a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs @@ -25,7 +25,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod= org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=warning diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index d1e2a3f23e..68a8ece397 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %plugin_name Automatic-Module-Name: org.eclipse.jgit.pgm Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 4.10.1.qualifier +Bundle-Version: 4.11.7.qualifier Bundle-Vendor: %provider_name Bundle-ActivationPolicy: lazy Bundle-Localization: plugin @@ -28,49 +28,49 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)", - org.eclipse.jgit.api;version="[4.10.1,4.11.0)", - org.eclipse.jgit.api.errors;version="[4.10.1,4.11.0)", - org.eclipse.jgit.archive;version="[4.10.1,4.11.0)", - org.eclipse.jgit.awtui;version="[4.10.1,4.11.0)", - org.eclipse.jgit.blame;version="[4.10.1,4.11.0)", - org.eclipse.jgit.diff;version="[4.10.1,4.11.0)", - org.eclipse.jgit.dircache;version="[4.10.1,4.11.0)", - org.eclipse.jgit.errors;version="[4.10.1,4.11.0)", - org.eclipse.jgit.gitrepo;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.ketch;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.dfs;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.file;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.io;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.pack;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.reftable;version="[4.10.1,4.11.0)", - org.eclipse.jgit.internal.storage.reftree;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lfs;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lfs.lib;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lfs.server;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lfs.server.fs;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lfs.server.s3;version="[4.10.1,4.11.0)", - org.eclipse.jgit.lib;version="[4.10.1,4.11.0)", - org.eclipse.jgit.merge;version="[4.10.1,4.11.0)", - org.eclipse.jgit.nls;version="[4.10.1,4.11.0)", - org.eclipse.jgit.notes;version="[4.10.1,4.11.0)", - org.eclipse.jgit.revplot;version="[4.10.1,4.11.0)", - org.eclipse.jgit.revwalk;version="[4.10.1,4.11.0)", - org.eclipse.jgit.revwalk.filter;version="[4.10.1,4.11.0)", - org.eclipse.jgit.storage.file;version="[4.10.1,4.11.0)", - org.eclipse.jgit.storage.pack;version="[4.10.1,4.11.0)", - org.eclipse.jgit.transport;version="[4.10.1,4.11.0)", - org.eclipse.jgit.transport.http.apache;version="[4.10.1,4.11.0)", - org.eclipse.jgit.transport.resolver;version="[4.10.1,4.11.0)", - org.eclipse.jgit.treewalk;version="[4.10.1,4.11.0)", - org.eclipse.jgit.treewalk.filter;version="[4.10.1,4.11.0)", - org.eclipse.jgit.util;version="[4.10.1,4.11.0)", - org.eclipse.jgit.util.io;version="[4.10.1,4.11.0)", + org.eclipse.jgit.api;version="[4.11.7,4.12.0)", + org.eclipse.jgit.api.errors;version="[4.11.7,4.12.0)", + org.eclipse.jgit.archive;version="[4.11.7,4.12.0)", + org.eclipse.jgit.awtui;version="[4.11.7,4.12.0)", + org.eclipse.jgit.blame;version="[4.11.7,4.12.0)", + org.eclipse.jgit.diff;version="[4.11.7,4.12.0)", + org.eclipse.jgit.dircache;version="[4.11.7,4.12.0)", + org.eclipse.jgit.errors;version="[4.11.7,4.12.0)", + org.eclipse.jgit.gitrepo;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.ketch;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.dfs;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.file;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.io;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.pack;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.reftable;version="[4.11.7,4.12.0)", + org.eclipse.jgit.internal.storage.reftree;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lfs;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lfs.lib;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lfs.server;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lfs.server.fs;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lfs.server.s3;version="[4.11.7,4.12.0)", + org.eclipse.jgit.lib;version="[4.11.7,4.12.0)", + org.eclipse.jgit.merge;version="[4.11.7,4.12.0)", + org.eclipse.jgit.nls;version="[4.11.7,4.12.0)", + org.eclipse.jgit.notes;version="[4.11.7,4.12.0)", + org.eclipse.jgit.revplot;version="[4.11.7,4.12.0)", + org.eclipse.jgit.revwalk;version="[4.11.7,4.12.0)", + org.eclipse.jgit.revwalk.filter;version="[4.11.7,4.12.0)", + org.eclipse.jgit.storage.file;version="[4.11.7,4.12.0)", + org.eclipse.jgit.storage.pack;version="[4.11.7,4.12.0)", + org.eclipse.jgit.transport;version="[4.11.7,4.12.0)", + org.eclipse.jgit.transport.http.apache;version="[4.11.7,4.12.0)", + org.eclipse.jgit.transport.resolver;version="[4.11.7,4.12.0)", + org.eclipse.jgit.treewalk;version="[4.11.7,4.12.0)", + org.eclipse.jgit.treewalk.filter;version="[4.11.7,4.12.0)", + org.eclipse.jgit.util;version="[4.11.7,4.12.0)", + org.eclipse.jgit.util.io;version="[4.11.7,4.12.0)", org.kohsuke.args4j;version="[2.33.0,3.0.0)", org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)" -Export-Package: org.eclipse.jgit.console;version="4.10.1"; +Export-Package: org.eclipse.jgit.console;version="4.11.7"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util", - org.eclipse.jgit.pgm;version="4.10.1"; + org.eclipse.jgit.pgm;version="4.11.7"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.pgm.opt, @@ -81,11 +81,11 @@ Export-Package: org.eclipse.jgit.console;version="4.10.1"; org.eclipse.jgit.treewalk, javax.swing, org.eclipse.jgit.transport", - org.eclipse.jgit.pgm.debug;version="4.10.1"; + org.eclipse.jgit.pgm.debug;version="4.11.7"; uses:="org.eclipse.jgit.util.io, org.eclipse.jgit.pgm", - org.eclipse.jgit.pgm.internal;version="4.10.1";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", - org.eclipse.jgit.pgm.opt;version="4.10.1"; + org.eclipse.jgit.pgm.internal;version="4.11.7";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", + org.eclipse.jgit.pgm.opt;version="4.11.7"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.kohsuke.args4j.spi, diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 7d8d4baaea..37f9314ddf 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.10.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.10.1.qualifier";roots="." +Bundle-Version: 4.11.7.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="4.11.7.qualifier";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 165733e698..82043f7b42 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -50,7 +50,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>4.10.1-SNAPSHOT</version> + <version>4.11.7-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm</artifactId> diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java index 086c9766ac..cce889b76e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java @@ -89,8 +89,7 @@ class AmazonS3Client extends TextBuiltin { if ("get".equals(op)) { //$NON-NLS-1$ final URLConnection c = s3.get(bucket, key); int len = c.getContentLength(); - final InputStream in = c.getInputStream(); - try { + try (InputStream in = c.getInputStream()) { outw.flush(); final byte[] tmp = new byte[2048]; while (len > 0) { @@ -103,8 +102,6 @@ class AmazonS3Client extends TextBuiltin { len -= n; } outs.flush(); - } finally { - in.close(); } } else if ("ls".equals(op) || "list".equals(op)) { //$NON-NLS-1$//$NON-NLS-2$ @@ -115,13 +112,12 @@ class AmazonS3Client extends TextBuiltin { s3.delete(bucket, key); } else if ("put".equals(op)) { //$NON-NLS-1$ - final OutputStream os = s3.beginPut(bucket, key, null, null); - final byte[] tmp = new byte[2048]; - int n; - while ((n = ins.read(tmp)) > 0) - os.write(tmp, 0, n); - os.close(); - + try (OutputStream os = s3.beginPut(bucket, key, null, null)) { + final byte[] tmp = new byte[2048]; + int n; + while ((n = ins.read(tmp)) > 0) + os.write(tmp, 0, n); + } } else { throw die(MessageFormat.format(CLIText.get().unsupportedOperation, op)); } @@ -129,13 +125,10 @@ class AmazonS3Client extends TextBuiltin { private Properties properties() { try { - final InputStream in = new FileInputStream(propertyFile); - try { + try (InputStream in = new FileInputStream(propertyFile)) { final Properties p = new Properties(); p.load(in); return p; - } finally { - in.close(); } } catch (FileNotFoundException e) { throw die(MessageFormat.format(CLIText.get().noSuchFile, propertyFile), e); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java index 1f80301f66..6ff39fab04 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java @@ -57,6 +57,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.TextProgressMonitor; import org.eclipse.jgit.pgm.internal.CLIText; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; @@ -90,7 +91,8 @@ class Checkout extends TextBuiltin { } try (Git git = new Git(db)) { - CheckoutCommand command = git.checkout(); + CheckoutCommand command = git.checkout() + .setProgressMonitor(new TextProgressMonitor(errw)); if (paths.size() > 0) { command.setStartPoint(name); if (paths.size() == 1 && paths.get(0).equals(".")) { //$NON-NLS-1$ diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java index 7bab69210b..81aeef8cdd 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java @@ -43,6 +43,8 @@ package org.eclipse.jgit.pgm; +import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -149,7 +151,7 @@ public class CommandCatalog { final BufferedReader cIn; try { final InputStream in = cUrl.openStream(); - cIn = new BufferedReader(new InputStreamReader(in, "UTF-8")); //$NON-NLS-1$ + cIn = new BufferedReader(new InputStreamReader(in, UTF_8)); } catch (IOException err) { // If we cannot read from the service list, go to the next. // diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index b29b097473..a376bc098d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -65,8 +65,7 @@ import java.util.concurrent.TimeUnit; import org.eclipse.jgit.awtui.AwtAuthenticator; import org.eclipse.jgit.awtui.AwtCredentialsProvider; import org.eclipse.jgit.errors.TransportException; -import org.eclipse.jgit.lfs.CleanFilter; -import org.eclipse.jgit.lfs.SmudgeFilter; +import org.eclipse.jgit.lfs.BuiltinLFS; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; import org.eclipse.jgit.pgm.internal.CLIText; @@ -111,8 +110,7 @@ public class Main { */ public Main() { HttpTransport.setConnectionFactory(new HttpClientConnectionFactory()); - CleanFilter.register(); - SmudgeFilter.register(); + BuiltinLFS.register(); gcExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() { private final ThreadFactory baseFactory = Executors .defaultThreadFactory(); @@ -134,6 +132,9 @@ public class Main { * @throws java.lang.Exception */ public static void main(final String[] argv) throws Exception { + // make sure built-in filters are registered + BuiltinLFS.register(); + new Main().run(argv); } 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 5f8ebdb1a9..0e1b398a73 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 @@ -160,11 +160,8 @@ class DiffAlgorithms extends TextBuiltin { else rb.findGitDir(dir); - Repository repo = rb.build(); - try { + try (Repository repo = rb.build()) { run(repo); - } finally { - repo.close(); } } } |