comparison src/org/tmatesoft/hg/repo/Revlog.java @ 424:6437d261048a

Deprecated code removed
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 28 Mar 2012 15:42:15 +0200
parents 9c9c442b5f2e
children 48f993aa2f41
comparison
equal deleted inserted replaced
423:9c9c442b5f2e 424:6437d261048a
144 throw new HgInvalidRevisionException(String.format("Can't find revision %s in %s", nid.shortNotation(), this), nid, null); 144 throw new HgInvalidRevisionException(String.format("Can't find revision %s in %s", nid.shortNotation(), this), nid, null);
145 } 145 }
146 return revision; 146 return revision;
147 } 147 }
148 148
149 /**
150 * @deprecated use {@link #getRevisionIndex(Nodeid)} instead
151 */
152 @Deprecated
153 public final int getLocalRevision(Nodeid nid) throws HgInvalidControlFileException, HgInvalidRevisionException {
154 return getRevisionIndex(nid);
155 }
156
157
158 /** 149 /**
159 * Note, {@link Nodeid#NULL} nodeid is not reported as known in any revlog. 150 * Note, {@link Nodeid#NULL} nodeid is not reported as known in any revlog.
160 * 151 *
161 * @param nodeid 152 * @param nodeid
162 * @return <code>true</code> if revision is part of this revlog 153 * @return <code>true</code> if revision is part of this revlog
588 int x = Arrays.binarySearch(sorted, revision); 579 int x = Arrays.binarySearch(sorted, revision);
589 if (x < 0) { 580 if (x < 0) {
590 return BAD_REVISION; 581 return BAD_REVISION;
591 } 582 }
592 return sorted2natural[x]-1; 583 return sorted2natural[x]-1;
593 }
594 /**
595 * @deprecated use {@link #revisionIndex(Nodeid)} instead
596 */
597 @Deprecated
598 public int localRevision(Nodeid revision) {
599 return revisionIndex(revision);
600 } 584 }
601 } 585 }
602 586
603 protected abstract static class ErrorHandlingInspector implements RevlogStream.Inspector, CancelSupport { 587 protected abstract static class ErrorHandlingInspector implements RevlogStream.Inspector, CancelSupport {
604 private Exception failure; 588 private Exception failure;