Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgAnnotateCommand.java @ 626:5afc7eedb3dd v1.1rc1
@since, TODOs. Tests: add 1 sec to deal with fs timestamp granularity on linux
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Tue, 21 May 2013 19:30:12 +0200 |
| parents | f41dd9a3b8af |
| children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
| 625:b4948b159ab1 | 626:5afc7eedb3dd |
|---|---|
| 20 | 20 |
| 21 import java.util.Arrays; | 21 import java.util.Arrays; |
| 22 | 22 |
| 23 import org.tmatesoft.hg.internal.Callback; | 23 import org.tmatesoft.hg.internal.Callback; |
| 24 import org.tmatesoft.hg.internal.CsetParamKeeper; | 24 import org.tmatesoft.hg.internal.CsetParamKeeper; |
| 25 import org.tmatesoft.hg.internal.Experimental; | |
| 26 import org.tmatesoft.hg.internal.FileAnnotation; | 25 import org.tmatesoft.hg.internal.FileAnnotation; |
| 27 import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor; | 26 import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor; |
| 28 import org.tmatesoft.hg.internal.FileAnnotation.LineInspector; | 27 import org.tmatesoft.hg.internal.FileAnnotation.LineInspector; |
| 29 import org.tmatesoft.hg.repo.HgBlameInspector.BlockData; | 28 import org.tmatesoft.hg.repo.HgBlameInspector.BlockData; |
| 30 import org.tmatesoft.hg.repo.HgDataFile; | 29 import org.tmatesoft.hg.repo.HgDataFile; |
| 39 * | 38 * |
| 40 * @since 1.1 | 39 * @since 1.1 |
| 41 * @author Artem Tikhomirov | 40 * @author Artem Tikhomirov |
| 42 * @author TMate Software Ltd. | 41 * @author TMate Software Ltd. |
| 43 */ | 42 */ |
| 44 @Experimental(reason="Work in progress. Unstable API") | |
| 45 public class HgAnnotateCommand extends HgAbstractCommand<HgAnnotateCommand> { | 43 public class HgAnnotateCommand extends HgAbstractCommand<HgAnnotateCommand> { |
| 46 | 44 |
| 47 private final HgRepository repo; | 45 private final HgRepository repo; |
| 48 private final CsetParamKeeper annotateRevision; | 46 private final CsetParamKeeper annotateRevision; |
| 49 private Path file; | 47 private Path file; |
| 86 file = filePath; | 84 file = filePath; |
| 87 followRename = followCopyRename; | 85 followRename = followCopyRename; |
| 88 return this; | 86 return this; |
| 89 } | 87 } |
| 90 | 88 |
| 91 // TODO [1.1] set encoding and provide String line content from LineInfo | 89 // TODO [post-1.1] set encoding and provide String line content from LineInfo |
| 92 | 90 |
| 93 /** | 91 /** |
| 94 * Annotate selected file | 92 * Annotate selected file |
| 95 * | 93 * |
| 96 * @param inspector | 94 * @param inspector |
| 152 int getLineNumber(); | 150 int getLineNumber(); |
| 153 int getChangesetIndex(); | 151 int getChangesetIndex(); |
| 154 byte[] getContent(); | 152 byte[] getContent(); |
| 155 } | 153 } |
| 156 | 154 |
| 157 // FIXME there's no need in FileAnnotation.LineInspector, merge it here | 155 // TODO [post-1.1] there's no need in FileAnnotation.LineInspector, merge it here |
| 156 // ok for 1.1 as this LineInspector is internal class | |
| 158 private static class Collector implements LineInspector { | 157 private static class Collector implements LineInspector { |
| 159 private int[] lineRevisions; | 158 private int[] lineRevisions; |
| 160 private byte[][] lines; | 159 private byte[][] lines; |
| 161 private final CancelSupport cancelSupport; | 160 private final CancelSupport cancelSupport; |
| 162 private CancelledException cancelEx; | 161 private CancelledException cancelEx; |
