Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/ForwardAnnotateInspector.java @ 686:f1f095e42555
Annotated file is not always changed in the latest changeset, need to find out last changest it was changed at (iow, diffed to with BlameHelper)
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> | 
|---|---|
| date | Thu, 25 Jul 2013 22:12:14 +0200 | 
| parents | 58a6900f845d | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 685:9897cbfd2790 | 686:f1f095e42555 | 
|---|---|
| 27 /** | 27 /** | 
| 28 * Annotate file history iterating from parents to children | 28 * Annotate file history iterating from parents to children | 
| 29 * | 29 * | 
| 30 * At the moment, doesn't handle start from any revision but 0 | 30 * At the moment, doesn't handle start from any revision but 0 | 
| 31 * | 31 * | 
| 32 * (+) May report annotate for any revision in the visited range. | 32 * (+) May report annotate for any revision (with actual file change) in the visited range. | 
| 33 * | 33 * | 
| 34 * @see ReverseAnnotateInspector | 34 * @see ReverseAnnotateInspector | 
| 35 * @author Artem Tikhomirov | 35 * @author Artem Tikhomirov | 
| 36 * @author TMate Software Ltd. | 36 * @author TMate Software Ltd. | 
| 37 */ | 37 */ | 
| 49 return HgIterateDirection.OldToNew; | 49 return HgIterateDirection.OldToNew; | 
| 50 } | 50 } | 
| 51 | 51 | 
| 52 public void report(int revision, Inspector insp, ProgressSupport progress, CancelSupport cancel) throws HgCallbackTargetException, CancelledException { | 52 public void report(int revision, Inspector insp, ProgressSupport progress, CancelSupport cancel) throws HgCallbackTargetException, CancelledException { | 
| 53 int totalLines = 0; | 53 int totalLines = 0; | 
| 54 if (!all.containsKey(revision)) { | |
| 55 throw new IllegalArgumentException(String.format("Revision %d has not been visited", revision)); | |
| 56 } | |
| 54 for (IntTuple t : all.get(revision)) { | 57 for (IntTuple t : all.get(revision)) { | 
| 55 totalLines += t.at(0); | 58 totalLines += t.at(0); | 
| 56 } | 59 } | 
| 57 progress.start(totalLines); | 60 progress.start(totalLines); | 
| 58 LineImpl li = new LineImpl(); | 61 LineImpl li = new LineImpl(); | 
