comparison src/org/tmatesoft/hg/repo/Revlog.java @ 418:528b6780a8bd

A bit of FIXME cleanup (mostly degraded to TODO post 1.0), comments and javadoc
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 21:02:20 +0100
parents d30083c80d52
children 7f136a3fa671
comparison
equal deleted inserted replaced
417:ccd7d25e5aea 418:528b6780a8bd
213 content.iterate(revisionIndex, revisionIndex, true, insp); 213 content.iterate(revisionIndex, revisionIndex, true, insp);
214 insp.checkFailed(); 214 insp.checkFailed();
215 } catch (IOException ex) { 215 } catch (IOException ex) {
216 HgInvalidControlFileException e = new HgInvalidControlFileException(String.format("Access to revision %d content failed", revisionIndex), ex, null); 216 HgInvalidControlFileException e = new HgInvalidControlFileException(String.format("Access to revision %d content failed", revisionIndex), ex, null);
217 e.setRevisionIndex(revisionIndex); 217 e.setRevisionIndex(revisionIndex);
218 // FIXME e.setFileName(content.getIndexFile() or this.getHumanFriendlyPath()) - shall decide whether 218 // TODO post 1.0 e.setFileName(content.getIndexFile() or this.getHumanFriendlyPath()) - shall decide whether
219 // protected abstract getPath() with impl in HgDataFile, HgManifest and HgChangelog or path is data of either Revlog or RevlogStream 219 // protected abstract getHFPath() with impl in HgDataFile, HgManifest and HgChangelog or path is data of either Revlog or RevlogStream
220 // Do the same (add file name) below 220 // Do the same (add file name) below
221 throw e; 221 throw e;
222 } catch (HgInvalidControlFileException ex) { 222 } catch (HgInvalidControlFileException ex) {
223 throw ex; 223 throw ex;
224 } catch (HgException ex) { 224 } catch (HgException ex) {
234 * @param revision - revision to query parents, or {@link HgRepository#TIP} 234 * @param revision - revision to query parents, or {@link HgRepository#TIP}
235 * @param parentRevisions - int[2] to get local revision numbers of parents (e.g. {6, -1}), {@link HgRepository#NO_REVISION} indicates parent not set 235 * @param parentRevisions - int[2] to get local revision numbers of parents (e.g. {6, -1}), {@link HgRepository#NO_REVISION} indicates parent not set
236 * @param parent1 - byte[20] or null, if parent's nodeid is not needed 236 * @param parent1 - byte[20] or null, if parent's nodeid is not needed
237 * @param parent2 - byte[20] or null, if second parent's nodeid is not needed 237 * @param parent2 - byte[20] or null, if second parent's nodeid is not needed
238 * @throws HgInvalidRevisionException 238 * @throws HgInvalidRevisionException
239 * @throws HgInvalidControlFileException FIXME 239 * @throws HgInvalidControlFileException FIXME EXCEPTIONS
240 * @throws IllegalArgumentException 240 * @throws IllegalArgumentException
241 */ 241 */
242 public void parents(int revision, int[] parentRevisions, byte[] parent1, byte[] parent2) throws HgInvalidRevisionException, HgInvalidControlFileException { 242 public void parents(int revision, int[] parentRevisions, byte[] parent1, byte[] parent2) throws HgInvalidRevisionException, HgInvalidControlFileException {
243 if (revision != TIP && !(revision >= 0 && revision < content.revisionCount())) { 243 if (revision != TIP && !(revision >= 0 && revision < content.revisionCount())) {
244 throw new HgInvalidRevisionException(revision); 244 throw new HgInvalidRevisionException(revision);