comparison src/org/tmatesoft/hg/internal/RevlogStream.java @ 243:0e01f9182e16

External cache Nodeid<->int added, Revlog.RevisionMap
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 23 Jun 2011 16:58:38 +0200
parents ad6a046943be
children e5776067b3b8
comparison
equal deleted inserted replaced
242:ad6a046943be 243:0e01f9182e16
165 return i; 165 return i;
166 } 166 }
167 daIndex.skip(inline ? 12 + compressedLen : 12); 167 daIndex.skip(inline ? 12 + compressedLen : 12);
168 } 168 }
169 } catch (IOException ex) { 169 } catch (IOException ex) {
170 ex.printStackTrace(); // log error. FIXME better handling 170 ex.printStackTrace(); // log error. FIXME better handling. Perhaps, shall return BAD_REVISION here as well?
171 throw new IllegalStateException(ex); 171 throw new IllegalStateException(ex);
172 } finally { 172 } finally {
173 daIndex.done(); 173 daIndex.done();
174 } 174 }
175 return BAD_REVISION; 175 return BAD_REVISION;
369 daData.done(); 369 daData.done();
370 } 370 }
371 } 371 }
372 372
373 public boolean range(int start, int end) throws IOException { 373 public boolean range(int start, int end) throws IOException {
374 // System.out.printf("RevlogStream.ReaderN1.range(): [%d, %d]\n", start, end);
375 byte[] nodeidBuf = new byte[20]; 374 byte[] nodeidBuf = new byte[20];
376 int i; 375 int i;
377 boolean extraReadsToBaseRev = false; // to indicate we read revision prior to start. XXX not sure can't do without 376 boolean extraReadsToBaseRev = false; // to indicate we read revision prior to start. XXX not sure can't do without
378 // it (i.e. replace with i >= start) 377 // it (i.e. replace with i >= start)
379 if (needData && (i = getBaseRevision(start)) < start) { 378 if (needData && (i = getBaseRevision(start)) < start) {