Mercurial > jhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 628:6526d8adbc0f | 629:5f52074707b2 |
|---|---|
| 18 | 18 |
| 19 import static org.tmatesoft.hg.repo.HgRepository.NO_REVISION; | 19 import static org.tmatesoft.hg.repo.HgRepository.NO_REVISION; |
| 20 | 20 |
| 21 import java.util.Arrays; | 21 import java.util.Arrays; |
| 22 | 22 |
| 23 import org.tmatesoft.hg.core.HgBlameInspector.BlockData; | |
| 23 import org.tmatesoft.hg.internal.Callback; | 24 import org.tmatesoft.hg.internal.Callback; |
| 24 import org.tmatesoft.hg.internal.CsetParamKeeper; | 25 import org.tmatesoft.hg.internal.CsetParamKeeper; |
| 25 import org.tmatesoft.hg.internal.FileAnnotation; | 26 import org.tmatesoft.hg.internal.FileAnnotation; |
| 26 import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor; | 27 import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor; |
| 27 import org.tmatesoft.hg.internal.FileAnnotation.LineInspector; | 28 import org.tmatesoft.hg.internal.FileAnnotation.LineInspector; |
| 28 import org.tmatesoft.hg.repo.HgBlameInspector.BlockData; | |
| 29 import org.tmatesoft.hg.repo.HgDataFile; | 29 import org.tmatesoft.hg.repo.HgDataFile; |
| 30 import org.tmatesoft.hg.repo.HgRepository; | 30 import org.tmatesoft.hg.repo.HgRepository; |
| 31 import org.tmatesoft.hg.repo.HgRuntimeException; | 31 import org.tmatesoft.hg.repo.HgRuntimeException; |
| 32 import org.tmatesoft.hg.util.CancelSupport; | 32 import org.tmatesoft.hg.util.CancelSupport; |
| 33 import org.tmatesoft.hg.util.CancelledException; | 33 import org.tmatesoft.hg.util.CancelledException; |
| 114 return; | 114 return; |
| 115 } | 115 } |
| 116 final int changesetStart = followRename ? 0 : df.getChangesetRevisionIndex(0); | 116 final int changesetStart = followRename ? 0 : df.getChangesetRevisionIndex(0); |
| 117 Collector c = new Collector(cancellation); | 117 Collector c = new Collector(cancellation); |
| 118 FileAnnotation fa = new FileAnnotation(c); | 118 FileAnnotation fa = new FileAnnotation(c); |
| 119 df.annotate(changesetStart, annotateRevision.get(), fa, HgIterateDirection.NewToOld); | 119 HgDiffCommand cmd = new HgDiffCommand(repo); |
| 120 cmd.file(df).order(HgIterateDirection.NewToOld); | |
| 121 cmd.range(changesetStart, annotateRevision.get()); | |
| 122 cmd.executeAnnotate(fa); | |
| 120 progress.worked(1); | 123 progress.worked(1); |
| 121 c.throwIfCancelled(); | 124 c.throwIfCancelled(); |
| 122 cancellation.checkCancelled(); | 125 cancellation.checkCancelled(); |
| 123 ProgressSupport.Sub subProgress = new ProgressSupport.Sub(progress, 1); | 126 ProgressSupport.Sub subProgress = new ProgressSupport.Sub(progress, 1); |
| 124 subProgress.start(c.lineRevisions.length); | 127 subProgress.start(c.lineRevisions.length); |
