Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgInternals.java @ 367:2fadf8695f8a
Use 'revision index' instead of the vague 'local revision number' concept in the API
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Dec 2011 15:37:27 +0100 |
parents | a0864b2892cd |
children | 8107b95f4280 |
comparison
equal
deleted
inserted
replaced
366:189dc6dc1c3e | 367:2fadf8695f8a |
---|---|
133 return repo.getContext(); | 133 return repo.getContext(); |
134 } | 134 } |
135 | 135 |
136 | 136 |
137 // Convenient check of local revision number for validity (not all negative values are wrong as long as we use negative constants) | 137 // Convenient check of local revision number for validity (not all negative values are wrong as long as we use negative constants) |
138 public static boolean wrongLocalRevision(int rev) { | 138 public static boolean wrongRevisionIndex(int rev) { |
139 return rev < 0 && rev != TIP && rev != WORKING_COPY && rev != BAD_REVISION; | 139 return rev < 0 && rev != TIP && rev != WORKING_COPY && rev != BAD_REVISION; |
140 } | 140 } |
141 | 141 |
142 // throws HgInvalidRevisionException or IllegalArgumentException if [start..end] range is not a subrange of [0..lastRevision] | 142 // throws HgInvalidRevisionException or IllegalArgumentException if [start..end] range is not a subrange of [0..lastRevision] |
143 public static void checkRevlogRange(int start, int end, int lastRevision) throws HgInvalidRevisionException { | 143 public static void checkRevlogRange(int start, int end, int lastRevision) throws HgInvalidRevisionException { |