Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgInternals.java @ 237:6e1373b54e9b
Allow access to working copy content through HgDataFile. Give access to repository's working dir
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 10 Jun 2011 04:35:21 +0200 |
parents | 1ec6b327a6ac |
children | 7af843ecc378 |
comparison
equal
deleted
inserted
replaced
236:883300108179 | 237:6e1373b54e9b |
---|---|
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 @Experimental(reason="Don't want to expose io.File from HgRepository; need to create FileIterator for working dir. Need a place to keep that code") | 96 @Experimental(reason="Don't want to expose io.File from HgRepository; need to create FileIterator for working dir. Need a place to keep that code") |
97 /*package-local*/ FileIterator createWorkingDirWalker(Path.Matcher workindDirScope) { | 97 /*package-local*/ FileIterator createWorkingDirWalker(Path.Matcher workindDirScope) { |
98 File repoRoot = repo.getRepositoryRoot().getParentFile(); | 98 File repoRoot = repo.getWorkingDir(); |
99 Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper())); | 99 Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper())); |
100 // Impl note: simple source is enough as files in the working dir are all unique | 100 // Impl note: simple source is enough as files in the working dir are all unique |
101 // even if they might get reused (i.e. after FileIterator#reset() and walking once again), | 101 // even if they might get reused (i.e. after FileIterator#reset() and walking once again), |
102 // path caching is better to be done in the code which knows that path are being reused | 102 // path caching is better to be done in the code which knows that path are being reused |
103 return new FileWalker(repoRoot, pathSrc, workindDirScope); | 103 return new FileWalker(repoRoot, pathSrc, workindDirScope); |