diff src/org/tmatesoft/hg/core/HgIncomingCommand.java @ 432:1fc0da631200

Revlog.ParentWalker helper class got promoted as TLC, renamed to HgParentChildMap
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 30 Mar 2012 16:22:51 +0200
parents 31a89587eb04
children 2f9ed6bcefa2
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgIncomingCommand.java	Thu Mar 29 20:54:04 2012 +0200
+++ b/src/org/tmatesoft/hg/core/HgIncomingCommand.java	Fri Mar 30 16:22:51 2012 +0200
@@ -35,6 +35,7 @@
 import org.tmatesoft.hg.repo.HgRemoteRepository;
 import org.tmatesoft.hg.repo.HgRepository;
 import org.tmatesoft.hg.repo.HgRuntimeException;
+import org.tmatesoft.hg.repo.HgParentChildMap;
 import org.tmatesoft.hg.util.CancelledException;
 import org.tmatesoft.hg.util.ProgressSupport;
 
@@ -52,7 +53,7 @@
 	private boolean includeSubrepo;
 	private RepositoryComparator comparator;
 	private List<BranchChain> missingBranches;
-	private HgChangelog.ParentWalker parentHelper;
+	private HgParentChildMap<HgChangelog> parentHelper;
 	private Set<String> branches;
 
 	public HgIncomingCommand(HgRepository hgRepo) {
@@ -144,7 +145,7 @@
 			transformer.limitBranches(branches);
 			changegroup.changes(localRepo, new HgChangelog.Inspector() {
 				private int localIndex;
-				private final HgChangelog.ParentWalker parentHelper;
+				private final HgParentChildMap<HgChangelog> parentHelper;
 			
 				{
 					parentHelper = getParentHelper();
@@ -181,9 +182,9 @@
 		return comparator;
 	}
 	
-	private HgChangelog.ParentWalker getParentHelper() throws HgInvalidControlFileException {
+	private HgParentChildMap<HgChangelog> getParentHelper() throws HgInvalidControlFileException {
 		if (parentHelper == null) {
-			parentHelper = localRepo.getChangelog().new ParentWalker();
+			parentHelper = new HgParentChildMap<HgChangelog>(localRepo.getChangelog());
 			parentHelper.init();
 		}
 		return parentHelper;