Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgMergeState.java @ 284:7232b94f2ae3
HgDirstate shall operate with Path instead of String for file names. Use of Pair instead of array of unspecified length for parents.
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 03 Sep 2011 13:12:13 +0200 |
parents | c6450b0b1fd5 |
children | 6dbbc53fc46d |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgMergeState.java Sat Sep 03 13:10:12 2011 +0200 +++ b/src/org/tmatesoft/hg/repo/HgMergeState.java Sat Sep 03 13:12:13 2011 +0200 @@ -32,6 +32,7 @@ import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.internal.ManifestRevision; import org.tmatesoft.hg.internal.Pool; +import org.tmatesoft.hg.util.Pair; import org.tmatesoft.hg.util.Path; import org.tmatesoft.hg.util.PathPool; import org.tmatesoft.hg.util.PathRewrite; @@ -99,8 +100,8 @@ } Pool<Nodeid> nodeidPool = new Pool<Nodeid>(); Pool<String> fnamePool = new Pool<String>(); - Nodeid[] wcParents = repo.loadDirstate().parents(); - wcp1 = nodeidPool.unify(wcParents[0]); wcp2 = nodeidPool.unify(wcParents[1]); + Pair<Nodeid, Nodeid> wcParents = repo.getWorkingCopyParents(); + wcp1 = nodeidPool.unify(wcParents.first()); wcp2 = nodeidPool.unify(wcParents.second()); ArrayList<Entry> result = new ArrayList<Entry>(); PathPool pathPool = new PathPool(new PathRewrite.Empty()); final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool);