From 5362e1d41c8e3ce6e63fbab9882dfbc4429903e0 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 25 Apr 2015 00:22:59 +0200 Subject: [PATCH] Delete deprecated checkoutEntry() methods in DirCacheCheckout Change-Id: I7fcf6534e6092ba87360ccd68a7dd7466c5c8911 Signed-off-by: Matthias Sohn --- .../jgit/dircache/DirCacheCheckout.java | 67 ------------------- 1 file changed, 67 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 99e022bfe..f1241652b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1129,73 +1129,6 @@ private boolean isModifiedSubtree_IndexTree(String path, ObjectId tree) } } - /** - * 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. - * - *

- * 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 - *

- * - * @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. - * - *

- * 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 - *

- * - * @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 * in the index. The new content is first written to a new temporary file in