Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-06-28 18:16:50 +0000
committerShawn O. Pearce2010-06-28 18:47:28 +0000
commit6b62e53b607630b6c00411741972838ced552f4d (patch)
tree96838a5c62025f0bcae6c69cef81ee2071964b2d /org.eclipse.jgit.junit/src
parentf288c27e465a91e80b53c4100c0d9b2f2341a9aa (diff)
downloadjgit-6b62e53b607630b6c00411741972838ced552f4d.tar.gz
jgit-6b62e53b607630b6c00411741972838ced552f4d.tar.xz
jgit-6b62e53b607630b6c00411741972838ced552f4d.zip
Move PackWriter progress monitors onto the operations
Rather than taking the ProgressMonitor objects in our constructor and carrying them around as instance fields, take them as arguments to the actual time consuming operations we need to run. Change-Id: I2b230d07e277de029b1061c807e67de5428cc1c4 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 5b0e74cace..daa959f116 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -600,14 +600,15 @@ public class TestRepository<R extends Repository> {
public void packAndPrune() throws Exception {
if (db.getObjectDatabase() instanceof ObjectDirectory) {
ObjectDirectory odb = (ObjectDirectory) db.getObjectDatabase();
+ NullProgressMonitor m = NullProgressMonitor.INSTANCE;
final File pack, idx;
- PackWriter pw = new PackWriter(db, NullProgressMonitor.INSTANCE);
+ PackWriter pw = new PackWriter(db);
try {
Set<ObjectId> all = new HashSet<ObjectId>();
for (Ref r : db.getAllRefs().values())
all.add(r.getObjectId());
- pw.preparePack(all, Collections.<ObjectId> emptySet());
+ pw.preparePack(m, all, Collections.<ObjectId> emptySet());
final ObjectId name = pw.computeName();
OutputStream out;
@@ -615,7 +616,7 @@ public class TestRepository<R extends Repository> {
pack = nameFor(odb, name, ".pack");
out = new BufferedOutputStream(new FileOutputStream(pack));
try {
- pw.writePack(out);
+ pw.writePack(m, m, out);
} finally {
out.close();
}

Back to the top