Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 229:1ec6b327a6ac
Scope for status reworked: explicit files or a general matcher
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 31 May 2011 05:23:07 +0200 |
parents | 8de327242aa0 |
children | 1792b37650f2 |
comparison
equal
deleted
inserted
replaced
228:fffe4f882248 | 229:1ec6b327a6ac |
---|---|
25 import java.util.List; | 25 import java.util.List; |
26 | 26 |
27 import org.tmatesoft.hg.internal.ConfigFile; | 27 import org.tmatesoft.hg.internal.ConfigFile; |
28 import org.tmatesoft.hg.internal.DataAccessProvider; | 28 import org.tmatesoft.hg.internal.DataAccessProvider; |
29 import org.tmatesoft.hg.internal.Filter; | 29 import org.tmatesoft.hg.internal.Filter; |
30 import org.tmatesoft.hg.internal.RelativePathRewrite; | |
31 import org.tmatesoft.hg.internal.RequiresFile; | 30 import org.tmatesoft.hg.internal.RequiresFile; |
32 import org.tmatesoft.hg.internal.RevlogStream; | 31 import org.tmatesoft.hg.internal.RevlogStream; |
33 import org.tmatesoft.hg.util.FileIterator; | |
34 import org.tmatesoft.hg.util.FileWalker; | |
35 import org.tmatesoft.hg.util.Path; | 32 import org.tmatesoft.hg.util.Path; |
36 import org.tmatesoft.hg.util.PathRewrite; | 33 import org.tmatesoft.hg.util.PathRewrite; |
37 import org.tmatesoft.hg.util.ProgressSupport; | 34 import org.tmatesoft.hg.util.ProgressSupport; |
38 | 35 |
39 | 36 |
215 | 212 |
216 /*package-local*/ DataAccessProvider getDataAccess() { | 213 /*package-local*/ DataAccessProvider getDataAccess() { |
217 return dataAccess; | 214 return dataAccess; |
218 } | 215 } |
219 | 216 |
220 // FIXME not sure repository shall create walkers | |
221 /*package-local*/ FileIterator createWorkingDirWalker() { | |
222 File repoRoot = repoDir.getParentFile(); | |
223 Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), getToRepoPathHelper())); | |
224 // Impl note: simple source is enough as files in the working dir are all unique | |
225 // even if they might get reused (i.e. after FileIterator#reset() and walking once again), | |
226 // path caching is better to be done in the code which knows that path are being reused | |
227 return new FileWalker(repoRoot, pathSrc); | |
228 } | |
229 | |
230 /** | 217 /** |
231 * Perhaps, should be separate interface, like ContentLookup | 218 * Perhaps, should be separate interface, like ContentLookup |
232 * path - repository storage path (i.e. one usually with .i or .d) | 219 * path - repository storage path (i.e. one usually with .i or .d) |
233 */ | 220 */ |
234 /*package-local*/ RevlogStream resolve(Path path, boolean shallFakeNonExistent) { | 221 /*package-local*/ RevlogStream resolve(Path path, boolean shallFakeNonExistent) { |