comparison src/org/tmatesoft/hg/internal/RevlogStream.java @ 585:b47ef0d2777b

Access to base revision filed comes handy for debug sometimes
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 25 Apr 2013 17:53:44 +0200
parents ed243b668502
children 9619301a7bb9
comparison
equal deleted inserted replaced
584:ed243b668502 585:b47ef0d2777b
188 } catch (IOException ex) { 188 } catch (IOException ex) {
189 throw new HgInvalidControlFileException("Linked revision lookup failed", ex, indexFile).setRevisionIndex(revisionIndex); 189 throw new HgInvalidControlFileException("Linked revision lookup failed", ex, indexFile).setRevisionIndex(revisionIndex);
190 } finally { 190 } finally {
191 daIndex.done(); 191 daIndex.done();
192 } 192 }
193 }
194
195 /**
196 * Extract base revision field from the revlog
197 *
198 * @throws HgInvalidControlFileException if attempt to read index file failed
199 * @throws HgInvalidRevisionException if revisionIndex argument doesn't represent a valid record in the revlog
200 */
201 public int baseRevision(int revisionIndex) throws HgInvalidControlFileException, HgInvalidRevisionException {
202 initOutline();
203 revisionIndex = checkRevisionIndex(revisionIndex);
204 return getBaseRevision(revisionIndex);
193 } 205 }
194 206
195 // Perhaps, RevlogStream should be limited to use of plain int revisions for access, 207 // Perhaps, RevlogStream should be limited to use of plain int revisions for access,
196 // while Nodeids should be kept on the level up, in Revlog. Guess, Revlog better keep 208 // while Nodeids should be kept on the level up, in Revlog. Guess, Revlog better keep
197 // map of nodeids, and once this comes true, we may get rid of this method. 209 // map of nodeids, and once this comes true, we may get rid of this method.