Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgDirstate.java @ 141:8248aae33f7d
Adopt FileIterator moving towards WCStatusCollector parameterizing. Improved path handling, move 'em around
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 17 Feb 2011 04:08:34 +0100 |
parents | a3a2e5deb320 |
children | 0fd10e5016dd |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDirstate.java Wed Feb 16 22:33:04 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgDirstate.java Thu Feb 17 04:08:34 2011 +0100 @@ -25,6 +25,7 @@ import org.tmatesoft.hg.internal.DataAccess; import org.tmatesoft.hg.internal.DataAccessProvider; +import org.tmatesoft.hg.util.Path; /** @@ -38,6 +39,7 @@ private final DataAccessProvider accessProvider; private final File dirstateFile; + // deliberate String, not Path as it seems useless to keep Path here private Map<String, Record> normal; private Map<String, Record> added; private Map<String, Record> removed; @@ -126,18 +128,21 @@ return rv; } - /*package-local*/ Record checkNormal(String fname) { - return normal.get(fname); + /*package-local*/ Record checkNormal(Path fname) { + return normal.get(fname.toString()); } - /*package-local*/ Record checkAdded(String fname) { - return added.get(fname); + /*package-local*/ Record checkAdded(Path fname) { + return added.get(fname.toString()); + } + /*package-local*/ Record checkRemoved(Path fname) { + return removed.get(fname.toString()); } /*package-local*/ Record checkRemoved(String fname) { return removed.get(fname); } - /*package-local*/ Record checkMerged(String fname) { - return merged.get(fname); + /*package-local*/ Record checkMerged(Path fname) { + return merged.get(fname.toString()); }