Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgInternals.java @ 403:2747b0723867
FIXMEs: work on exceptions and javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 05 Mar 2012 14:50:51 +0100 |
parents | 82336b7c54f4 |
children | 866fc3b597a0 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgInternals.java Mon Feb 27 19:38:44 2012 +0100 +++ b/src/org/tmatesoft/hg/repo/HgInternals.java Mon Mar 05 14:50:51 2012 +0100 @@ -128,17 +128,18 @@ return new FileWalker(repoRoot, pathSrc, workindDirScope); } - // expose othewise package-local information primarily to use in our own o.t.hg.core package + // expose otherwise package-local information primarily to use in our own o.t.hg.core package public static SessionContext getContext(HgRepository repo) { return repo.getContext(); } // Convenient check of revision index for validity (not all negative values are wrong as long as we use negative constants) - public static boolean wrongRevisionIndex(int rev) { + public static boolean wrongRevisionIndex(int rev) { // FIXME guess, usages shall throw HgInvalidRevision. \ + // TODO Another method to check,throw and expand TIP at once return rev < 0 && rev != TIP && rev != WORKING_COPY && rev != BAD_REVISION; } - + // throws HgInvalidRevisionException or IllegalArgumentException if [start..end] range is not a subrange of [0..lastRevision] public static void checkRevlogRange(int start, int end, int lastRevision) throws HgInvalidRevisionException { if (start < 0 || start > lastRevision) {