From 913095e39e85d42b07adebb6ad3ef7c4e2ccfedf Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:01:41 +0200 Subject: [PATCH 1/8] Delete deprecated Merger.getBaseCommit() Change-Id: I3b39a2c0d547110709b4c28b66c4694cdef943e8 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/merge/Merger.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java index a76dd350d..983bf5c91 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java @@ -51,7 +51,6 @@ import org.eclipse.jgit.errors.NoMergeBaseException; import org.eclipse.jgit.errors.NoMergeBaseException.MergeBaseFailureReason; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.AnyObjectId; -import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.ObjectReader; @@ -218,38 +217,6 @@ public abstract class Merger { */ public abstract ObjectId getBaseCommitId(); - /** - * Return the merge base of two commits. - *

- * May only be called after {@link #merge(RevCommit...)}. - * - * @param aIdx - * index of the first commit in tips passed to - * {@link #merge(RevCommit...)}. - * @param bIdx - * index of the second commit in tips passed to - * {@link #merge(RevCommit...)}. - * @return the merge base of two commits - * @throws IncorrectObjectTypeException - * one of the input objects is not a commit. - * @throws IOException - * objects are missing or multiple merge bases were found. - * @deprecated use {@link #getBaseCommitId()} instead, as that does not - * require walking the commits again - */ - @Deprecated - public RevCommit getBaseCommit(final int aIdx, final int bIdx) - throws IncorrectObjectTypeException, - IOException { - if (sourceCommits[aIdx] == null) - throw new IncorrectObjectTypeException(sourceObjects[aIdx], - Constants.TYPE_COMMIT); - if (sourceCommits[bIdx] == null) - throw new IncorrectObjectTypeException(sourceObjects[bIdx], - Constants.TYPE_COMMIT); - return getBaseCommit(sourceCommits[aIdx], sourceCommits[bIdx]); - } - /** * Return the merge base of two commits. * From 07114d99a0e653244107d7a82f3c5f7d12e7c682 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:03:58 +0200 Subject: [PATCH 2/8] Delete deprecated TextBuiltin.out Change-Id: I184c2f0e0203fa95e0a117391bae93da0d23a435 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/pgm/TextBuiltin.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java index 8e8b82fe0..56cfc7e8e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java @@ -56,7 +56,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; -import java.io.PrintWriter; import java.text.MessageFormat; import java.util.ResourceBundle; @@ -107,14 +106,6 @@ public abstract class TextBuiltin { */ protected OutputStream outs; - /** - * Stream to output to, typically this is standard output. - * - * @deprecated Use outw instead - */ - @Deprecated - protected PrintWriter out; - /** * Error writer, typically this is standard error. * @@ -172,7 +163,6 @@ public abstract class TextBuiltin { outputEncoding)); else outbufw = new BufferedWriter(new OutputStreamWriter(outs)); - out = new PrintWriter(outbufw); outw = new ThrowingPrintWriter(outbufw); BufferedWriter errbufw; if (outputEncoding != null) From fa56e0deae7e5f1c267b7df05a21b57896a61df2 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:04:54 +0200 Subject: [PATCH 3/8] Delete deprecated TransferConfig.isFsckObjects() Change-Id: Ib7f36282d69a3298b1ac177ae17af0f80d64964f Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/transport/TransferConfig.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java index 60043fff7..138002e63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java @@ -97,15 +97,6 @@ public class TransferConfig { hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); //$NON-NLS-1$ //$NON-NLS-2$ } - /** - * @return strictly verify received objects? - * @deprecated use {@link #newObjectChecker()} instead. - */ - @Deprecated - public boolean isFsckObjects() { - return checkReceivedObjects; - } - /** * @return checker to verify fetched objects, or null if checking is not * enabled in the repository configuration. From 08c8cf027dafec4ab3368ada10de1b223eb3cc80 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:05:40 +0200 Subject: [PATCH 4/8] Delete deprecated UploadPackMayNotContinueException Change-Id: Id298fc860684d2a2288769282fd8ce4475009dc8 Signed-off-by: Matthias Sohn --- .../UploadPackMayNotContinueException.java | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackMayNotContinueException.java diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackMayNotContinueException.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackMayNotContinueException.java deleted file mode 100644 index 5392a0155..000000000 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackMayNotContinueException.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2011, Google Inc. - * and other copyright owners as documented in the project's IP log. - * - * This program and the accompanying materials are made available - * under the terms of the Eclipse Distribution License v1.0 which - * accompanies this distribution, is reproduced below, and is - * available at http://www.eclipse.org/org/documents/edl-v10.php - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * - Neither the name of the Eclipse Foundation, Inc. nor the - * names of its contributors may be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package org.eclipse.jgit.transport; - -/** - * Indicates UploadPack may not continue execution. - * - * @deprecated use {@link ServiceMayNotContinueException} instead. - */ -@Deprecated -public class UploadPackMayNotContinueException extends ServiceMayNotContinueException { - private static final long serialVersionUID = 1L; - - /** Initialize with no message. */ - public UploadPackMayNotContinueException() { - // Do not set a message. - } - - /** - * @param msg - * a message explaining why it cannot continue. This message may - * be shown to an end-user. - */ - public UploadPackMayNotContinueException(String msg) { - super(msg); - } -} From ba51037a69166bac615600c5c4950b9e80f2e827 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:07:20 +0200 Subject: [PATCH 5/8] Delete deprecated WorkingTreeIterator.isModified(DirCacheEntry, boolean) Change-Id: I687c392e5a625fd66c45998c94373aa59921b986 Signed-off-by: Matthias Sohn --- .../jgit/treewalk/WorkingTreeIterator.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 3838149a4..d7c93d1a1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -62,7 +62,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.Comparator; -import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.attributes.AttributesNode; import org.eclipse.jgit.attributes.AttributesRule; import org.eclipse.jgit.diff.RawText; @@ -886,32 +885,6 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { return MetadataDiff.SMUDGED; } - /** - * Checks whether this entry differs from a given entry from the - * {@link DirCache}. - * - * File status information is used and if status is same we consider the - * file identical to the state in the working directory. Native git uses - * more stat fields than we have accessible in Java. - * - * @param entry - * the entry from the dircache we want to compare against - * @param forceContentCheck - * True if the actual file content should be checked if - * modification time differs. - * @return true if content is most likely different. - * @deprecated Use {@link #isModified(DirCacheEntry, boolean, ObjectReader)} - */ - @Deprecated - public boolean isModified(DirCacheEntry entry, boolean forceContentCheck) { - try { - return isModified(entry, forceContentCheck, - repository.newObjectReader()); - } catch (IOException e) { - throw new JGitInternalException(e.getMessage(), e); - } - } - /** * Checks whether this entry differs from a given entry from the * {@link DirCache}. From f6911065471f7bb312e4863d701431813d6fdbdb Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 01:08:42 +0200 Subject: [PATCH 6/8] Delete deprecated FileUtils.setExecute(File, boolean) Change-Id: Ifa63e3743fb4de25e074404c301f860a1ffb5e02 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/util/FileUtil.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java index bd38b14e3..f5babedd0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java @@ -212,20 +212,6 @@ public class FileUtil { return path.canExecute(); } - /** - * @param path - * @param executable - * @return true if succeeded, false if not supported or failed - * @deprecated the implementation is highly platform dependent, consider - * using {@link FS#setExecute(File, boolean)} instead - */ - @Deprecated - public static boolean setExecute(File path, boolean executable) { - if (!isFile(path)) - return false; - return path.setExecutable(executable); - } - /** * @param path * @throws IOException From d19ce2435d2d975bde311c138a956dd2894b6490 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 26 Apr 2015 00:49:24 +0200 Subject: [PATCH 7/8] Delete deprecated TemporaryBuffer.LocalFile constructors Change-Id: I5fdbf997ebcbe48e86f4c41c6b2643f47054b0c3 Signed-off-by: Matthias Sohn --- .../eclipse/jgit/util/TemporaryBuffer.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java index 3719bf794..e2738c03f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java @@ -381,29 +381,6 @@ public abstract class TemporaryBuffer extends OutputStream { */ private File onDiskFile; - /** - * Create a new temporary buffer. - * - * @deprecated Use the {@code File} overload to supply a directory. - */ - @Deprecated - public LocalFile() { - this(null, DEFAULT_IN_CORE_LIMIT); - } - - /** - * Create a new temporary buffer, limiting memory usage. - * - * @param inCoreLimit - * maximum number of bytes to store in memory. Storage beyond - * this limit will use the local file. - * @deprecated Use the {@code File,int} overload to supply a directory. - */ - @Deprecated - public LocalFile(final int inCoreLimit) { - this(null, inCoreLimit); - } - /** * Create a new temporary buffer, limiting memory usage. * From fb21fb10fc76ffa886338a08d2a09cd76d339f2d Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 3 Jun 2015 14:31:31 -0400 Subject: [PATCH 8/8] Revert "Fix unchecked conversion warning in MergeFormatter" This reverts commit 6d4ebd168da236c5753f237e77b2dfcbb4e42065. Change-Id: I01f0c7cd997b9b3577cc1e98ab1adb5cdc5b55e4 --- org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java index a9a8231ee..977f95341 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java @@ -102,7 +102,7 @@ public class MergeFormatter { * metadata * @throws IOException */ - public void formatMerge(OutputStream out, MergeResult res, String baseName, + public void formatMerge(OutputStream out, MergeResult res, String baseName, String oursName, String theirsName, String charsetName) throws IOException { List names = new ArrayList(3); names.add(baseName);