diff test/org/tmatesoft/hg/test/TestPhases.java @ 493:ba36f66c32b4

Refactor to keep knowledge about repository control files and their location in respect to .hg/ in a single place (facilitate future adoption of shared repositories)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 18 Oct 2012 18:36:13 +0200
parents 9c9d09111aee
children fedc54356091
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestPhases.java	Thu Oct 18 16:27:32 2012 +0200
+++ b/test/org/tmatesoft/hg/test/TestPhases.java	Thu Oct 18 18:36:13 2012 +0200
@@ -25,6 +25,7 @@
 import org.junit.Test;
 import org.tmatesoft.hg.internal.PhasesHelper;
 import org.tmatesoft.hg.repo.HgChangelog;
+import org.tmatesoft.hg.repo.HgInternals;
 import org.tmatesoft.hg.repo.HgLookup;
 import org.tmatesoft.hg.repo.HgParentChildMap;
 import org.tmatesoft.hg.repo.HgPhase;
@@ -45,7 +46,7 @@
 		HgRepository repo = Configuration.get().find("test-phases");
 		HgPhase[] expected = readPhases(repo);
 		final long start = System.nanoTime();
-		PhasesHelper ph = new PhasesHelper(repo, null);
+		PhasesHelper ph = new PhasesHelper(HgInternals.getImplementationRepo(repo), null);
 		initAndCheck(ph, expected);
 		final long end = System.nanoTime();
 		// μ == \u03bc
@@ -60,7 +61,7 @@
 		HgParentChildMap<HgChangelog> pw = new HgParentChildMap<HgChangelog>(repo.getChangelog());
 		pw.init();
 		final long start2 = System.nanoTime();
-		PhasesHelper ph = new PhasesHelper(repo, pw);
+		PhasesHelper ph = new PhasesHelper(HgInternals.getImplementationRepo(repo), pw);
 		initAndCheck(ph, expected);
 		final long end = System.nanoTime();
 		System.out.printf("With ParentWalker(simulates log command for whole repo): %,d μs (pw init: %,d ns)\n", (end - start1)/1000, start2 - start1);