diff src/com/tmate/hgkit/ll/HgRepository.java @ 9:d6d2a630f4a6

Access to underlaying file data wrapped into own Access object, implemented with FileChannel and ByteBuffer
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 25 Dec 2010 04:45:59 +0100
parents fc265ddeab26
children 382cfe9463db
line wrap: on
line diff
--- a/src/com/tmate/hgkit/ll/HgRepository.java	Thu Dec 23 01:31:40 2010 +0100
+++ b/src/com/tmate/hgkit/ll/HgRepository.java	Sat Dec 25 04:45:59 2010 +0100
@@ -30,16 +30,10 @@
 		isInvalid = invalid;
 	}
 
-	public void log() {
-		Revlog clog = getChangelog();
-		assert clog != null;
-		// TODO get data to the client
-	}
-
 	public final Changelog getChangelog() {
 		if (this.changelog == null) {
 			// might want delegate to protected createChangelog() some day
-			RevlogStream content = resolve("store/00changelog.i"); // XXX perhaps, knowledge about filenames should be in LocalHgRepo?
+			RevlogStream content = resolve(toStoragePath("00changelog.i", false)); // XXX perhaps, knowledge about filenames should be in LocalHgRepo?
 			this.changelog = new Changelog(this, content);
 		}
 		return this.changelog;
@@ -61,8 +55,10 @@
 	public abstract String getLocation();
 
 
+	protected abstract String toStoragePath(String path, boolean isData);
+
 	/**
 	 * Perhaps, should be separate interface, like ContentLookup
 	 */
-	protected abstract RevlogStream resolve(String string);
+	protected abstract RevlogStream resolve(String repositoryPath);
 }