Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-06-24 22:16:32 +0000
committerShawn O. Pearce2010-06-26 00:46:40 +0000
commit4c14b7623dd2ff943350eb0f80d899b00450794f (patch)
tree14bfff02e4a58ef774e9e9ce6d5344ef7c33f219 /org.eclipse.jgit.junit
parent77b39df5ecdcff4d0ef68e7441526426499914e3 (diff)
downloadjgit-4c14b7623dd2ff943350eb0f80d899b00450794f.tar.gz
jgit-4c14b7623dd2ff943350eb0f80d899b00450794f.tar.xz
jgit-4c14b7623dd2ff943350eb0f80d899b00450794f.zip
Make lib.Repository abstract and lib.FileRepository its implementation
To support other storage models other than just the local filesystem, we split the Repository class into a nearly abstract interface and then create a concrete subclass called FileRepository with the file based IO implementation. We are using an abstract class for Repository rather than the much more generic interface, as implementers will want to inherit a large array of utility functions, such as resolve(String). Having these in a base class makes it easy to inherit them. This isn't the final home for lib.FileRepository. Future changes will rename it into storage.file.FileRepository, but to do that we need to also move a number of other related class, which we aren't quite ready to do. Change-Id: I1bd54ea0500337799a8e792874c272eb14d555f7 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
index 001deb262b..100b632ae3 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
@@ -63,6 +63,7 @@ import junit.framework.TestCase;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileBasedConfig;
+import org.eclipse.jgit.lib.FileRepository;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryCache;
@@ -288,7 +289,7 @@ public abstract class LocalDiskRepositoryTestCase extends TestCase {
String uniqueId = System.currentTimeMillis() + "_" + (testCount++);
String gitdirName = "test" + uniqueId + (bare ? "" : "/") + Constants.DOT_GIT;
File gitdir = new File(trash, gitdirName).getCanonicalFile();
- Repository db = new Repository(gitdir);
+ Repository db = new FileRepository(gitdir);
assertFalse(gitdir.exists());
db.create();

Back to the top