Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/RevisionDescendants.java @ 472:2a0b09eec376
Tests for issue 31
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 11 Jul 2012 21:46:28 +0200 |
parents | 7bcfbc255f48 |
children | 6526d8adbc0f |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RevisionDescendants.java Wed Jul 11 20:40:47 2012 +0200 +++ b/src/org/tmatesoft/hg/internal/RevisionDescendants.java Wed Jul 11 21:46:28 2012 +0200 @@ -95,6 +95,13 @@ return descendants.nextSetBit(rootRevIndex+1) != -1; } + /** + * Tells whether specified revision is on a descent line from the root revision. + * <p>NOTE, root revision itself is considered to be its own descendant. + * + * @param revisionIndex revision index to check, shall pass {@link #isCandidate(int)} + * @return <code>true</code> if revision is descendant of or is the same as root revision + */ public boolean isDescendant(int revisionIndex) { assert isCandidate(revisionIndex); int ix = revisionIndex - rootRevIndex;