diff src/org/tmatesoft/hg/core/HgAnnotateCommand.java @ 629:5f52074707b2

Diff/blame methods as command, their residence in HgDataFile was a mistake
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 May 2013 16:46:15 +0200
parents 6526d8adbc0f
children 3219cfadda49
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgAnnotateCommand.java	Wed May 22 15:52:31 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgAnnotateCommand.java	Wed May 22 16:46:15 2013 +0200
@@ -20,12 +20,12 @@
 
 import java.util.Arrays;
 
+import org.tmatesoft.hg.core.HgBlameInspector.BlockData;
 import org.tmatesoft.hg.internal.Callback;
 import org.tmatesoft.hg.internal.CsetParamKeeper;
 import org.tmatesoft.hg.internal.FileAnnotation;
 import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor;
 import org.tmatesoft.hg.internal.FileAnnotation.LineInspector;
-import org.tmatesoft.hg.repo.HgBlameInspector.BlockData;
 import org.tmatesoft.hg.repo.HgDataFile;
 import org.tmatesoft.hg.repo.HgRepository;
 import org.tmatesoft.hg.repo.HgRuntimeException;
@@ -116,7 +116,10 @@
 			final int changesetStart = followRename ? 0 : df.getChangesetRevisionIndex(0);
 			Collector c = new Collector(cancellation);
 			FileAnnotation fa = new FileAnnotation(c);
-			df.annotate(changesetStart, annotateRevision.get(), fa, HgIterateDirection.NewToOld);
+			HgDiffCommand cmd = new HgDiffCommand(repo);
+			cmd.file(df).order(HgIterateDirection.NewToOld);
+			cmd.range(changesetStart, annotateRevision.get());
+			cmd.executeAnnotate(fa);
 			progress.worked(1);
 			c.throwIfCancelled();
 			cancellation.checkCancelled();