Browse Source

Delete deprecated checkoutEntry() methods in DirCacheCheckout

Change-Id: I7fcf6534e6092ba87360ccd68a7dd7466c5c8911
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
5362e1d41c
  1. 67
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

67
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java vendored

@ -1129,73 +1129,6 @@ public class DirCacheCheckout {
} }
} }
/**
* Updates the file in the working tree with content and mode from an entry
* in the index. The new content is first written to a new temporary file in
* the same directory as the real file. Then that new file is renamed to the
* final filename. Use this method only for checkout of a single entry.
* Otherwise use
* {@code checkoutEntry(Repository, File f, DirCacheEntry, ObjectReader)}
* instead which allows to reuse one {@code ObjectReader} for multiple
* entries.
*
* <p>
* TODO: this method works directly on File IO, we may need another
* abstraction (like WorkingTreeIterator). This way we could tell e.g.
* Eclipse that Files in the workspace got changed
* </p>
*
* @param repository
* @param f
* this parameter is ignored.
* @param entry
* the entry containing new mode and content
* @throws IOException
* @deprecated Use the overloaded form that accepts {@link ObjectReader}.
*/
@Deprecated
public static void checkoutEntry(final Repository repository, File f,
DirCacheEntry entry) throws IOException {
ObjectReader or = repository.newObjectReader();
try {
checkoutEntry(repository, f, entry, or);
} finally {
or.release();
}
}
/**
* Updates the file in the working tree with content and mode from an entry
* in the index. The new content is first written to a new temporary file in
* the same directory as the real file. Then that new file is renamed to the
* final filename.
*
* <p>
* TODO: this method works directly on File IO, we may need another
* abstraction (like WorkingTreeIterator). This way we could tell e.g.
* Eclipse that Files in the workspace got changed
* </p>
*
* @param repo
* @param f
* this parameter is ignored.
* @param entry
* the entry containing new mode and content
* @param or
* object reader to use for checkout
* @throws IOException
* @deprecated Do not pass File object.
*/
@Deprecated
public static void checkoutEntry(final Repository repo, File f,
DirCacheEntry entry, ObjectReader or) throws IOException {
if (f == null || repo.getWorkTree() == null)
throw new IllegalArgumentException();
if (!f.equals(new File(repo.getWorkTree(), entry.getPathString())))
throw new IllegalArgumentException();
checkoutEntry(repo, entry, or);
}
/** /**
* Updates the file in the working tree with content and mode from an entry * Updates the file in the working tree with content and mode from an entry
* in the index. The new content is first written to a new temporary file in * in the index. The new content is first written to a new temporary file in

Loading…
Cancel
Save