diff src/org/tmatesoft/hg/repo/HgMergeState.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 9c9c442b5f2e
children b3c16d1aede0
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgMergeState.java	Thu Mar 29 18:48:23 2012 +0200
+++ b/src/org/tmatesoft/hg/repo/HgMergeState.java	Thu Mar 29 20:54:04 2012 +0200
@@ -33,7 +33,6 @@
 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;
 
 /**
@@ -111,9 +110,8 @@
 		}
 		try {
 			ArrayList<Entry> result = new ArrayList<Entry>();
-			// FIXME need to settle use of Pool<Path> and PathPool
-			// latter is pool that can create objects on demand, former is just cache
-			PathPool pathPool = new PathPool(new PathRewrite.Empty()); 
+			// pipe (already normalized) names from mergestate through same pool of filenames as use manifest revisions  
+			Path.Source pathPool = new Path.SimpleSource(new PathRewrite.Empty(), fnamePool); 
 			final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool);
 			final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool);
 			if (!wcp2.isNull()) {
@@ -163,7 +161,6 @@
 			}
 			entries = result.toArray(new Entry[result.size()]);
 			br.close();
-			pathPool.clear();
 		} catch (IOException ex) {
 			throw new HgInvalidControlFileException("Merge state read failed", ex, f);
 		}