Mercurial > jhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
283:7a8e1a305a78 | 284:7232b94f2ae3 |
---|---|
30 import org.tmatesoft.hg.core.HgBadStateException; | 30 import org.tmatesoft.hg.core.HgBadStateException; |
31 import org.tmatesoft.hg.core.HgFileRevision; | 31 import org.tmatesoft.hg.core.HgFileRevision; |
32 import org.tmatesoft.hg.core.Nodeid; | 32 import org.tmatesoft.hg.core.Nodeid; |
33 import org.tmatesoft.hg.internal.ManifestRevision; | 33 import org.tmatesoft.hg.internal.ManifestRevision; |
34 import org.tmatesoft.hg.internal.Pool; | 34 import org.tmatesoft.hg.internal.Pool; |
35 import org.tmatesoft.hg.util.Pair; | |
35 import org.tmatesoft.hg.util.Path; | 36 import org.tmatesoft.hg.util.Path; |
36 import org.tmatesoft.hg.util.PathPool; | 37 import org.tmatesoft.hg.util.PathPool; |
37 import org.tmatesoft.hg.util.PathRewrite; | 38 import org.tmatesoft.hg.util.PathRewrite; |
38 | 39 |
39 /** | 40 /** |
97 // empty state | 98 // empty state |
98 return; | 99 return; |
99 } | 100 } |
100 Pool<Nodeid> nodeidPool = new Pool<Nodeid>(); | 101 Pool<Nodeid> nodeidPool = new Pool<Nodeid>(); |
101 Pool<String> fnamePool = new Pool<String>(); | 102 Pool<String> fnamePool = new Pool<String>(); |
102 Nodeid[] wcParents = repo.loadDirstate().parents(); | 103 Pair<Nodeid, Nodeid> wcParents = repo.getWorkingCopyParents(); |
103 wcp1 = nodeidPool.unify(wcParents[0]); wcp2 = nodeidPool.unify(wcParents[1]); | 104 wcp1 = nodeidPool.unify(wcParents.first()); wcp2 = nodeidPool.unify(wcParents.second()); |
104 ArrayList<Entry> result = new ArrayList<Entry>(); | 105 ArrayList<Entry> result = new ArrayList<Entry>(); |
105 PathPool pathPool = new PathPool(new PathRewrite.Empty()); | 106 PathPool pathPool = new PathPool(new PathRewrite.Empty()); |
106 final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool); | 107 final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool); |
107 final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool); | 108 final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool); |
108 if (!wcp2.isNull()) { | 109 if (!wcp2.isNull()) { |