comparison 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
comparison
equal deleted inserted replaced
76:658fa6b3a371 77:c677e1593919
22 import java.util.HashMap; 22 import java.util.HashMap;
23 23
24 import org.tmatesoft.hg.core.Path; 24 import org.tmatesoft.hg.core.Path;
25 import org.tmatesoft.hg.internal.DataAccessProvider; 25 import org.tmatesoft.hg.internal.DataAccessProvider;
26 import org.tmatesoft.hg.internal.RequiresFile; 26 import org.tmatesoft.hg.internal.RequiresFile;
27 import org.tmatesoft.hg.internal.RevlogStream;
27 import org.tmatesoft.hg.util.FileWalker; 28 import org.tmatesoft.hg.util.FileWalker;
28 import org.tmatesoft.hg.util.PathRewrite; 29 import org.tmatesoft.hg.util.PathRewrite;
29 30
30 31
31 32
122 } 123 }
123 124
124 public HgDataFile getFileNode(String path) { 125 public HgDataFile getFileNode(String path) {
125 String nPath = normalizePath.rewrite(path); 126 String nPath = normalizePath.rewrite(path);
126 String storagePath = dataPathHelper.rewrite(nPath); 127 String storagePath = dataPathHelper.rewrite(nPath);
127 return getFileNode(Path.create(storagePath)); 128 RevlogStream content = resolve(Path.create(storagePath));
129 return new HgDataFile(this, Path.create(nPath), content);
128 } 130 }
129 131
130 public HgDataFile getFileNode(Path path) { 132 public HgDataFile getFileNode(Path path) {
131 RevlogStream content = resolve(path); 133 String storagePath = dataPathHelper.rewrite(path.toString());
134 RevlogStream content = resolve(Path.create(storagePath));
132 // XXX no content when no file? or HgDataFile.exists() to detect that? How about files that were removed in previous releases? 135 // XXX no content when no file? or HgDataFile.exists() to detect that? How about files that were removed in previous releases?
133 return new HgDataFile(this, path, content); 136 return new HgDataFile(this, path, content);
134 } 137 }
135 138
136 public PathRewrite getPathHelper() { // Really need to be public? 139 public PathRewrite getPathHelper() { // Really need to be public?