Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 431:12f668401613
FIXMEs: awkward API refactored, what need to be internal got hidden; public aspects got captured in slim interfaces
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 29 Mar 2012 20:54:04 +0200 |
parents | d280759c2a3f |
children | 909306e412e2 |
comparison
equal
deleted
inserted
replaced
430:d280759c2a3f | 431:12f668401613 |
---|---|
36 import org.tmatesoft.hg.internal.RevlogStream; | 36 import org.tmatesoft.hg.internal.RevlogStream; |
37 import org.tmatesoft.hg.internal.SubrepoManager; | 37 import org.tmatesoft.hg.internal.SubrepoManager; |
38 import org.tmatesoft.hg.util.CancelledException; | 38 import org.tmatesoft.hg.util.CancelledException; |
39 import org.tmatesoft.hg.util.Pair; | 39 import org.tmatesoft.hg.util.Pair; |
40 import org.tmatesoft.hg.util.Path; | 40 import org.tmatesoft.hg.util.Path; |
41 import org.tmatesoft.hg.util.PathPool; | |
42 import org.tmatesoft.hg.util.PathRewrite; | 41 import org.tmatesoft.hg.util.PathRewrite; |
43 import org.tmatesoft.hg.util.ProgressSupport; | 42 import org.tmatesoft.hg.util.ProgressSupport; |
44 | 43 |
45 | 44 |
46 | 45 |
333 return dataPathHelper.rewrite(df.getPath().toString()).toString(); | 332 return dataPathHelper.rewrite(df.getPath().toString()).toString(); |
334 } | 333 } |
335 | 334 |
336 // XXX package-local, unless there are cases when required from outside (guess, working dir/revision walkers may hide dirstate access and no public visibility needed) | 335 // XXX package-local, unless there are cases when required from outside (guess, working dir/revision walkers may hide dirstate access and no public visibility needed) |
337 // XXX consider passing Path pool or factory to produce (shared) Path instead of Strings | 336 // XXX consider passing Path pool or factory to produce (shared) Path instead of Strings |
338 /*package-local*/ final HgDirstate loadDirstate(PathPool pathPool) throws HgInvalidControlFileException { | 337 /*package-local*/ final HgDirstate loadDirstate(Path.Source pathFactory) throws HgInvalidControlFileException { |
339 PathRewrite canonicalPath = null; | 338 PathRewrite canonicalPath = null; |
340 if (!impl.isCaseSensitiveFileSystem()) { | 339 if (!impl.isCaseSensitiveFileSystem()) { |
341 canonicalPath = new PathRewrite() { | 340 canonicalPath = new PathRewrite() { |
342 | 341 |
343 public CharSequence rewrite(CharSequence path) { | 342 public CharSequence rewrite(CharSequence path) { |
344 return path.toString().toLowerCase(); | 343 return path.toString().toLowerCase(); |
345 } | 344 } |
346 }; | 345 }; |
347 } | 346 } |
348 HgDirstate ds = new HgDirstate(this, new File(repoDir, "dirstate"), pathPool, canonicalPath); | 347 HgDirstate ds = new HgDirstate(this, new File(repoDir, "dirstate"), pathFactory, canonicalPath); |
349 ds.read(impl.buildFileNameEncodingHelper()); | 348 ds.read(impl.buildFileNameEncodingHelper()); |
350 return ds; | 349 return ds; |
351 } | 350 } |
352 | 351 |
353 /** | 352 /** |