Mercurial > jhg
changeset 291:1483e57541ef
Refactor PathRewrite to accept any char sequence, not only string
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 14 Sep 2011 02:12:47 +0200 |
parents | 8faad08c709b |
children | a415fe296a50 |
files | src/org/tmatesoft/hg/repo/HgDirstate.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDirstate.java Wed Sep 14 01:52:41 2011 +0200 +++ b/src/org/tmatesoft/hg/repo/HgDirstate.java Wed Sep 14 02:12:47 2011 +0200 @@ -33,6 +33,7 @@ import org.tmatesoft.hg.util.Pair; import org.tmatesoft.hg.util.Path; import org.tmatesoft.hg.util.PathPool; +import org.tmatesoft.hg.util.PathRewrite; /** @@ -51,17 +52,21 @@ private final HgRepository repo; private final File dirstateFile; private final PathPool pathPool; + private final PathRewrite canonicalPathRewrite; private Map<Path, Record> normal; private Map<Path, Record> added; private Map<Path, Record> removed; private Map<Path, Record> merged; + private Map<Path, Path> canonical2dirstate; // map of canonicalized file names to their originals from dirstate file private Pair<Nodeid, Nodeid> parents; private String currentBranch; - /*package-local*/ HgDirstate(HgRepository hgRepo, File dirstate, PathPool pathPool) { + // canonicalPath may be null if we don't need to check for names other than in dirstate + /*package-local*/ HgDirstate(HgRepository hgRepo, File dirstate, PathPool pathPool, PathRewrite canonicalPath) { repo = hgRepo; dirstateFile = dirstate; // XXX decide whether file names shall be kept local to reader (see #branches()) or passed from outside this.pathPool = pathPool; + canonicalPathRewrite = canonicalPath; } private void read() {