comparison src/org/tmatesoft/hg/internal/FileAnnotation.java @ 628:6526d8adbc0f

Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 May 2013 15:52:31 +0200
parents 707b5c7c6fa4
children 5f52074707b2
comparison
equal deleted inserted replaced
627:5153eb73b18d 628:6526d8adbc0f
21 import org.tmatesoft.hg.core.HgIterateDirection; 21 import org.tmatesoft.hg.core.HgIterateDirection;
22 import org.tmatesoft.hg.repo.HgBlameInspector; 22 import org.tmatesoft.hg.repo.HgBlameInspector;
23 import org.tmatesoft.hg.repo.HgBlameInspector.RevisionDescriptor; 23 import org.tmatesoft.hg.repo.HgBlameInspector.RevisionDescriptor;
24 import org.tmatesoft.hg.repo.HgDataFile; 24 import org.tmatesoft.hg.repo.HgDataFile;
25 import org.tmatesoft.hg.repo.HgInvalidStateException; 25 import org.tmatesoft.hg.repo.HgInvalidStateException;
26 import org.tmatesoft.hg.repo.HgRuntimeException;
26 27
27 /** 28 /**
28 * Produce output like 'hg annotate' does 29 * Produce output like 'hg annotate' does
29 * 30 *
30 * @author Artem Tikhomirov 31 * @author Artem Tikhomirov
46 } 47 }
47 48
48 /** 49 /**
49 * Annotate file revision, line by line. 50 * Annotate file revision, line by line.
50 */ 51 */
51 public static void annotate(HgDataFile df, int changelogRevisionIndex, LineInspector insp) throws HgCallbackTargetException { 52 public static void annotate(HgDataFile df, int changelogRevisionIndex, LineInspector insp) throws HgCallbackTargetException, HgRuntimeException {
52 if (!df.exists()) { 53 if (!df.exists()) {
53 return; 54 return;
54 } 55 }
55 FileAnnotation fa = new FileAnnotation(insp); 56 FileAnnotation fa = new FileAnnotation(insp);
56 df.annotate(changelogRevisionIndex, fa, HgIterateDirection.NewToOld); 57 df.annotate(changelogRevisionIndex, fa, HgIterateDirection.NewToOld);