summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2015-04-25 00:51:02 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2015-04-25 00:51:02 +0200
commit10412ddfedfe80537ffa497c7960443d703ee129 (patch)
tree9c685335aa6f530d456b1dcae6d0639229abb1b8
parentffdacc2bbbcbcdcc0cfe0074f8e5b33817eca4e5 (diff)
downloadjgit-10412ddfedfe80537ffa497c7960443d703ee129.tar.gz
jgit-10412ddfedfe80537ffa497c7960443d703ee129.zip
Delete deprecated PackWriter.preparePack() methods
Change-Id: I62befa4a933c9ffd42d14519f555554cc513ddd9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java94
1 files changed, 7 insertions, 87 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index 6d0c8e6cde..1422c5ef04 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -136,8 +136,8 @@ import org.eclipse.jgit.util.TemporaryBuffer;
* Typical usage consists of creating instance intended for some pack,
* configuring options, preparing the list of objects by calling
* {@link #preparePack(Iterator)} or
- * {@link #preparePack(ProgressMonitor, Collection, Collection)}, and finally
- * producing the stream with
+ * {@link #preparePack(ProgressMonitor, Set, Set)}, and finally producing the
+ * stream with
* {@link #writePack(ProgressMonitor, ProgressMonitor, OutputStream)}.
* </p>
* <p>
@@ -293,7 +293,7 @@ public class PackWriter implements AutoCloseable {
* Create writer for specified repository.
* <p>
* Objects for packing are specified in {@link #preparePack(Iterator)} or
- * {@link #preparePack(ProgressMonitor, Collection, Collection)}.
+ * {@link #preparePack(ProgressMonitor, Set, Set)}.
*
* @param repo
* repository where objects are stored.
@@ -306,7 +306,7 @@ public class PackWriter implements AutoCloseable {
* Create a writer to load objects from the specified reader.
* <p>
* Objects for packing are specified in {@link #preparePack(Iterator)} or
- * {@link #preparePack(ProgressMonitor, Collection, Collection)}.
+ * {@link #preparePack(ProgressMonitor, Set, Set)}.
*
* @param reader
* reader to read from the repository with.
@@ -319,7 +319,7 @@ public class PackWriter implements AutoCloseable {
* Create writer for specified repository.
* <p>
* Objects for packing are specified in {@link #preparePack(Iterator)} or
- * {@link #preparePack(ProgressMonitor, Collection, Collection)}.
+ * {@link #preparePack(ProgressMonitor, Set, Set)}.
*
* @param repo
* repository where objects are stored.
@@ -334,7 +334,7 @@ public class PackWriter implements AutoCloseable {
* Create writer with a specified configuration.
* <p>
* Objects for packing are specified in {@link #preparePack(Iterator)} or
- * {@link #preparePack(ProgressMonitor, Collection, Collection)}.
+ * {@link #preparePack(ProgressMonitor, Set, Set)}.
*
* @param config
* configuration for the pack writer.
@@ -495,7 +495,7 @@ public class PackWriter implements AutoCloseable {
/**
* @return true to ignore objects that are uninteresting and also not found
* on local disk; false to throw a {@link MissingObjectException}
- * out of {@link #preparePack(ProgressMonitor, Collection, Collection)} if an
+ * out of {@link #preparePack(ProgressMonitor, Set, Set)} if an
* uninteresting object is not in the source repository. By default,
* true, permitting gracefully ignoring of uninteresting objects.
*/
@@ -670,86 +670,6 @@ public class PackWriter implements AutoCloseable {
* points of graph traversal).
* @throws IOException
* when some I/O problem occur during reading objects.
- * @deprecated to be removed in 2.0; use the Set version of this method.
- */
- @Deprecated
- public void preparePack(ProgressMonitor countingMonitor,
- final Collection<? extends ObjectId> want,
- final Collection<? extends ObjectId> have) throws IOException {
- preparePack(countingMonitor, ensureSet(want), ensureSet(have));
- }
-
- /**
- * Prepare the list of objects to be written to the pack stream.
- * <p>
- * Basing on these 2 sets, another set of objects to put in a pack file is
- * created: this set consists of all objects reachable (ancestors) from
- * interesting objects, except uninteresting objects and their ancestors.
- * This method uses class {@link ObjectWalk} extensively to find out that
- * appropriate set of output objects and their optimal order in output pack.
- * Order is consistent with general git in-pack rules: sort by object type,
- * recency, path and delta-base first.
- * </p>
- *
- * @param countingMonitor
- * progress during object enumeration.
- * @param walk
- * ObjectWalk to perform enumeration.
- * @param interestingObjects
- * collection of objects to be marked as interesting (start
- * points of graph traversal).
- * @param uninterestingObjects
- * collection of objects to be marked as uninteresting (end
- * points of graph traversal).
- * @throws IOException
- * when some I/O problem occur during reading objects.
- * @deprecated to be removed in 2.0; use the Set version of this method.
- */
- @Deprecated
- public void preparePack(ProgressMonitor countingMonitor,
- ObjectWalk walk,
- final Collection<? extends ObjectId> interestingObjects,
- final Collection<? extends ObjectId> uninterestingObjects)
- throws IOException {
- preparePack(countingMonitor, walk,
- ensureSet(interestingObjects),
- ensureSet(uninterestingObjects));
- }
-
- @SuppressWarnings("unchecked")
- private static Set<ObjectId> ensureSet(Collection<? extends ObjectId> objs) {
- Set<ObjectId> set;
- if (objs instanceof Set<?>)
- set = (Set<ObjectId>) objs;
- else if (objs == null)
- set = Collections.emptySet();
- else
- set = new HashSet<ObjectId>(objs);
- return set;
- }
-
- /**
- * Prepare the list of objects to be written to the pack stream.
- * <p>
- * Basing on these 2 sets, another set of objects to put in a pack file is
- * created: this set consists of all objects reachable (ancestors) from
- * interesting objects, except uninteresting objects and their ancestors.
- * This method uses class {@link ObjectWalk} extensively to find out that
- * appropriate set of output objects and their optimal order in output pack.
- * Order is consistent with general git in-pack rules: sort by object type,
- * recency, path and delta-base first.
- * </p>
- *
- * @param countingMonitor
- * progress during object enumeration.
- * @param want
- * collection of objects to be marked as interesting (start
- * points of graph traversal).
- * @param have
- * collection of objects to be marked as uninteresting (end
- * points of graph traversal).
- * @throws IOException
- * when some I/O problem occur during reading objects.
*/
public void preparePack(ProgressMonitor countingMonitor,
Set<? extends ObjectId> want,