comparison src/org/tmatesoft/hg/repo/Revlog.java @ 218:047b1dec7a04

Issue 7: Correctly handle manifest and changelog with different number of (or non-matching) revisions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 17 May 2011 03:42:33 +0200
parents 114c9fe7b643
children 0e01f9182e16
comparison
equal deleted inserted replaced
217:e39cf474ef94 218:047b1dec7a04
96 } 96 }
97 97
98 // Till now, i follow approach that NULL nodeid is never part of revlog 98 // Till now, i follow approach that NULL nodeid is never part of revlog
99 public final boolean isKnown(Nodeid nodeid) { 99 public final boolean isKnown(Nodeid nodeid) {
100 final int rn = content.findLocalRevisionNumber(nodeid); 100 final int rn = content.findLocalRevisionNumber(nodeid);
101 if (Integer.MIN_VALUE == rn) { 101 if (BAD_REVISION == rn) {
102 return false; 102 return false;
103 } 103 }
104 if (rn < 0 || rn >= content.revisionCount()) { 104 if (rn < 0 || rn >= content.revisionCount()) {
105 // Sanity check 105 // Sanity check
106 throw new IllegalStateException(); 106 throw new IllegalStateException();