From 82ecfb3e317d71d7cbc69a4d205846c2c575415f Mon Sep 17 00:00:00 2001 From: Colby Ranger Date: Thu, 10 Jan 2013 13:01:17 -0800 Subject: Remove packIndex field from FileObjDatabase openPack method. Previously, the FileObjDatabase required both the pack file path and index file path to be passed to openPack(). A future change to add a bitmap index will add a .bitmap file parallel to the pack file (similar to the .idx file). Update the PackFile to support automatically loading pack index extensions based on the pack file path. Change-Id: Ifc8fc3e57f4afa177ba5a88df87334dbfa799f01 --- .../tst/org/eclipse/jgit/storage/file/PackWriterTest.java | 2 +- .../tst/org/eclipse/jgit/storage/file/T0004_PackReaderTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'org.eclipse.jgit.test') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java index b6932db596..4752a3fb20 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java @@ -298,7 +298,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase { copyFile(JGitTestUtil.getTestResourceFile( "pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.idxV2"), crc32Idx); - db.openPack(crc32Pack, crc32Idx); + db.openPack(crc32Pack); writeVerifyPack2(true); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0004_PackReaderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0004_PackReaderTest.java index bdc9edbe35..798968e8b1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0004_PackReaderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0004_PackReaderTest.java @@ -62,7 +62,6 @@ import org.junit.Test; public class T0004_PackReaderTest extends SampleDataRepositoryTestCase { private static final String PACK_NAME = "pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f"; private static final File TEST_PACK = JGitTestUtil.getTestResourceFile(PACK_NAME + ".pack"); - private static final File TEST_IDX = JGitTestUtil.getTestResourceFile(PACK_NAME + ".idx"); @Test public void test003_lookupCompressedObject() throws IOException { @@ -71,7 +70,7 @@ public class T0004_PackReaderTest extends SampleDataRepositoryTestCase { final ObjectLoader or; id = ObjectId.fromString("902d5476fa249b7abc9d84c611577a81381f0327"); - pr = new PackFile(TEST_IDX, TEST_PACK); + pr = new PackFile(TEST_PACK); or = pr.get(new WindowCursor(null), id); assertNotNull(or); assertEquals(Constants.OBJ_TREE, or.getType()); -- cgit v1.2.3