Przeglądaj źródła

Merge branch 'stable-4.0'

* stable-4.0:
  Revert "Fix unchecked conversion warning in MergeFormatter"
  Delete deprecated TemporaryBuffer.LocalFile constructors
  Delete deprecated FileUtils.setExecute(File, boolean)
  Delete deprecated WorkingTreeIterator.isModified(DirCacheEntry, boolean)
  Delete deprecated UploadPackMayNotContinueException
  Delete deprecated TransferConfig.isFsckObjects()
  Delete deprecated TextBuiltin.out
  Delete deprecated Merger.getBaseCommit()

Change-Id: Id23a39cc6a3cd122ff1738cb85b7451bbfd8af5f
Signed-off-by: Jonathan Nieder <jrn@google.com>
tags/v4.1.0.201509280440-r
Jonathan Nieder 9 lat temu
rodzic
commit
6227b340d3

+ 0
- 10
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java Wyświetl plik

import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ResourceBundle; import java.util.ResourceBundle;


*/ */
protected OutputStream outs; 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. * Error writer, typically this is standard error.
* *
outputEncoding)); outputEncoding));
else else
outbufw = new BufferedWriter(new OutputStreamWriter(outs)); outbufw = new BufferedWriter(new OutputStreamWriter(outs));
out = new PrintWriter(outbufw);
outw = new ThrowingPrintWriter(outbufw); outw = new ThrowingPrintWriter(outbufw);
BufferedWriter errbufw; BufferedWriter errbufw;
if (outputEncoding != null) if (outputEncoding != null)

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java Wyświetl plik

* metadata * metadata
* @throws IOException * @throws IOException
*/ */
public void formatMerge(OutputStream out, MergeResult<RawText> res, String baseName,
public void formatMerge(OutputStream out, MergeResult res, String baseName,
String oursName, String theirsName, String charsetName) throws IOException { String oursName, String theirsName, String charsetName) throws IOException {
List<String> names = new ArrayList<String>(3); List<String> names = new ArrayList<String>(3);
names.add(baseName); names.add(baseName);

+ 0
- 33
org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java Wyświetl plik

import org.eclipse.jgit.errors.NoMergeBaseException.MergeBaseFailureReason; import org.eclipse.jgit.errors.NoMergeBaseException.MergeBaseFailureReason;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.ObjectReader;
*/ */
public abstract ObjectId getBaseCommitId(); public abstract ObjectId getBaseCommitId();


/**
* Return the merge base of two commits.
* <p>
* 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. * Return the merge base of two commits.
* *

+ 0
- 9
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java Wyświetl plik

hideRefs = rc.getStringList("uploadpack", null, "hiderefs"); //$NON-NLS-1$ //$NON-NLS-2$ 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 * @return checker to verify fetched objects, or null if checking is not
* enabled in the repository configuration. * enabled in the repository configuration.

+ 0
- 68
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackMayNotContinueException.java Wyświetl plik

/*
* 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);
}
}

+ 0
- 27
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java Wyświetl plik

import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;


import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.attributes.AttributesNode; import org.eclipse.jgit.attributes.AttributesNode;
import org.eclipse.jgit.attributes.AttributesRule; import org.eclipse.jgit.attributes.AttributesRule;
import org.eclipse.jgit.diff.RawText; import org.eclipse.jgit.diff.RawText;
return MetadataDiff.SMUDGED; 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 * Checks whether this entry differs from a given entry from the
* {@link DirCache}. * {@link DirCache}.

+ 0
- 14
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java Wyświetl plik

return path.canExecute(); 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 * @param path
* @throws IOException * @throws IOException

+ 0
- 23
org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java Wyświetl plik

*/ */
private File onDiskFile; 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. * Create a new temporary buffer, limiting memory usage.
* *

Ładowanie…
Anuluj
Zapisz