Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/FileRevisionHistoryChunk.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 | b4948b159ab1 |
children | 72fc7774b87e |
comparison
equal
deleted
inserted
replaced
627:5153eb73b18d | 628:6526d8adbc0f |
---|---|
26 | 26 |
27 import org.tmatesoft.hg.core.HgIterateDirection; | 27 import org.tmatesoft.hg.core.HgIterateDirection; |
28 import org.tmatesoft.hg.core.Nodeid; | 28 import org.tmatesoft.hg.core.Nodeid; |
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 | 32 |
32 /** | 33 /** |
33 * Piece of file history, identified by path, limited to file revisions from range [chop..init] of changesets, | 34 * Piece of file history, identified by path, limited to file revisions from range [chop..init] of changesets, |
34 * can be linked to another piece. | 35 * can be linked to another piece. |
35 * | 36 * |
71 */ | 72 */ |
72 public int getEndChangeset() { | 73 public int getEndChangeset() { |
73 return csetRangeEnd; | 74 return csetRangeEnd; |
74 } | 75 } |
75 | 76 |
76 public void init(int changelogRevisionIndex) { | 77 public void init(int changelogRevisionIndex) throws HgRuntimeException { |
77 csetRangeEnd = changelogRevisionIndex; | 78 csetRangeEnd = changelogRevisionIndex; |
78 // XXX df.indexWalk(0, fileRevIndex, ) might be more effective | 79 // XXX df.indexWalk(0, fileRevIndex, ) might be more effective |
79 Nodeid fileRev = df.getRepo().getManifest().getFileRevision(changelogRevisionIndex, df.getPath()); | 80 Nodeid fileRev = df.getRepo().getManifest().getFileRevision(changelogRevisionIndex, df.getPath()); |
80 int fileRevIndex = df.getRevisionIndex(fileRev); | 81 int fileRevIndex = df.getRevisionIndex(fileRev); |
81 int[] fileRevParents = new int[2]; | 82 int[] fileRevParents = new int[2]; |