From 6b62e53b607630b6c00411741972838ced552f4d Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 28 Jun 2010 11:16:50 -0700 Subject: 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 --- .../src/org/eclipse/jgit/junit/TestRepository.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'org.eclipse.jgit.junit') 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 { 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 all = new HashSet(); for (Ref r : db.getAllRefs().values()) all.add(r.getObjectId()); - pw.preparePack(all, Collections. emptySet()); + pw.preparePack(m, all, Collections. emptySet()); final ObjectId name = pw.computeName(); OutputStream out; @@ -615,7 +616,7 @@ public class TestRepository { pack = nameFor(odb, name, ".pack"); out = new BufferedOutputStream(new FileOutputStream(pack)); try { - pw.writePack(out); + pw.writePack(m, m, out); } finally { out.close(); } -- cgit v1.2.3