Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgStatusCollector.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 | 48f993aa2f41 |
children | 7bcfbc255f48 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgStatusCollector.java Thu Mar 29 18:48:23 2012 +0200 +++ b/src/org/tmatesoft/hg/repo/HgStatusCollector.java Thu Mar 29 20:54:04 2012 +0200 @@ -32,9 +32,8 @@ import org.tmatesoft.hg.internal.Pool; import org.tmatesoft.hg.util.CancelSupport; import org.tmatesoft.hg.util.CancelledException; +import org.tmatesoft.hg.util.Convertor; import org.tmatesoft.hg.util.Path; -import org.tmatesoft.hg.util.PathPool; -import org.tmatesoft.hg.util.PathRewrite; /** @@ -52,7 +51,7 @@ // no cache limit, but with cached nodeids and filenames - 1730+ // cache limit 100 - 19+ minutes to process 10000, and still working (too long, stopped) private final int cacheMaxSize = 50; // do not keep too much manifest revisions - private PathPool pathPool; + private Convertor<Path> pathPool; private final Pool<Nodeid> cacheNodes; private final Pool<Path> cacheFilenames; private final ManifestRevision emptyFakeState; @@ -161,9 +160,9 @@ /*package-local*/ ManifestRevision raw(int rev) throws HgInvalidControlFileException { return get(rev); } - /*package-local*/ PathPool getPathPool() { + /*package-local*/ Convertor<Path> getPathPool() { if (pathPool == null) { - pathPool = new PathPool(new PathRewrite.Empty()); + pathPool = cacheFilenames; } return pathPool; } @@ -171,8 +170,8 @@ /** * Allows sharing of a common path cache */ - public void setPathPool(PathPool pathPool) { - this.pathPool = pathPool; + public void setPathPool(Convertor<Path> pathConvertor) { + pathPool = pathConvertor; } /** @@ -293,7 +292,7 @@ Path copyTarget = r2fname; Path copyOrigin = getOriginIfCopy(repo, copyTarget, r1Files, rev1); if (copyOrigin != null) { - inspector.copied(getPathPool().path(copyOrigin) /*pipe through pool, just in case*/, copyTarget); + inspector.copied(getPathPool().mangle(copyOrigin) /*pipe through pool, just in case*/, copyTarget); } else { inspector.added(copyTarget); }