Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgInternals.java @ 148:1a7a9a20e1f9
Exceptions, javadoc. Initial cancel and progress support
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 23 Feb 2011 22:36:28 +0100 |
parents | 37a34044e6bd |
children | 1ec6b327a6ac |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgInternals.java Tue Feb 22 15:49:26 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgInternals.java Wed Feb 23 22:36:28 2011 +0100 @@ -16,6 +16,8 @@ */ package org.tmatesoft.hg.repo; +import static org.tmatesoft.hg.repo.HgRepository.*; + import java.io.File; import java.net.InetAddress; import java.net.UnknownHostException; @@ -84,4 +86,9 @@ return username; } } + + // Convenient check of local revision number for validity (not all negative values are wrong as long as we use negative constants) + public static boolean wrongLocalRevision(int rev) { + return rev < 0 && rev != TIP && rev != WORKING_COPY && rev != BAD_REVISION; + } }