diff src/org/tmatesoft/hg/repo/HgRepository.java @ 77:c677e1593919

Moved RevlogStream implementation into .internal
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 24 Jan 2011 05:33:47 +0100
parents 6f1b88693d48
children c2ce1cfaeb9e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRepository.java	Mon Jan 24 04:38:09 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgRepository.java	Mon Jan 24 05:33:47 2011 +0100
@@ -24,6 +24,7 @@
 import org.tmatesoft.hg.core.Path;
 import org.tmatesoft.hg.internal.DataAccessProvider;
 import org.tmatesoft.hg.internal.RequiresFile;
+import org.tmatesoft.hg.internal.RevlogStream;
 import org.tmatesoft.hg.util.FileWalker;
 import org.tmatesoft.hg.util.PathRewrite;
 
@@ -124,11 +125,13 @@
 	public HgDataFile getFileNode(String path) {
 		String nPath = normalizePath.rewrite(path);
 		String storagePath = dataPathHelper.rewrite(nPath);
-		return getFileNode(Path.create(storagePath));
+		RevlogStream content = resolve(Path.create(storagePath));
+		return new HgDataFile(this, Path.create(nPath), content);
 	}
 
 	public HgDataFile getFileNode(Path path) {
-		RevlogStream content = resolve(path);
+		String storagePath = dataPathHelper.rewrite(path.toString());
+		RevlogStream content = resolve(Path.create(storagePath));
 		// XXX no content when no file? or HgDataFile.exists() to detect that? How about files that were removed in previous releases?
 		return new HgDataFile(this, path, content);
 	}