Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgDataFile.java @ 640:d07497128747
Deprecated code removed
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 11 Jun 2013 16:25:01 +0200 |
parents | 54e16ab771ec |
children | 12a4f60ea972 |
comparison
equal
deleted
inserted
replaced
637:4a0bab2c6da1 | 640:d07497128747 |
---|---|
25 import java.io.IOException; | 25 import java.io.IOException; |
26 import java.nio.ByteBuffer; | 26 import java.nio.ByteBuffer; |
27 import java.nio.channels.FileChannel; | 27 import java.nio.channels.FileChannel; |
28 import java.util.Arrays; | 28 import java.util.Arrays; |
29 | 29 |
30 import org.tmatesoft.hg.core.HgBlameInspector; | |
31 import org.tmatesoft.hg.core.HgCallbackTargetException; | |
32 import org.tmatesoft.hg.core.HgChangesetFileSneaker; | 30 import org.tmatesoft.hg.core.HgChangesetFileSneaker; |
33 import org.tmatesoft.hg.core.HgDiffCommand; | |
34 import org.tmatesoft.hg.core.HgException; | |
35 import org.tmatesoft.hg.core.HgIterateDirection; | |
36 import org.tmatesoft.hg.core.HgLibraryFailureException; | |
37 import org.tmatesoft.hg.core.Nodeid; | 31 import org.tmatesoft.hg.core.Nodeid; |
38 import org.tmatesoft.hg.internal.DataAccess; | 32 import org.tmatesoft.hg.internal.DataAccess; |
39 import org.tmatesoft.hg.internal.FileUtils; | 33 import org.tmatesoft.hg.internal.FileUtils; |
40 import org.tmatesoft.hg.internal.FilterByteChannel; | 34 import org.tmatesoft.hg.internal.FilterByteChannel; |
41 import org.tmatesoft.hg.internal.FilterDataAccess; | 35 import org.tmatesoft.hg.internal.FilterDataAccess; |
426 public HgManifest.Flags getFlags(int fileRevisionIndex) throws HgRuntimeException { | 420 public HgManifest.Flags getFlags(int fileRevisionIndex) throws HgRuntimeException { |
427 int changesetRevIndex = getChangesetRevisionIndex(fileRevisionIndex); | 421 int changesetRevIndex = getChangesetRevisionIndex(fileRevisionIndex); |
428 return getRepo().getManifest().getFileFlags(changesetRevIndex, getPath()); | 422 return getRepo().getManifest().getFileFlags(changesetRevIndex, getPath()); |
429 } | 423 } |
430 | 424 |
431 /** | |
432 * @deprecated use {@link HgDiffCommand} instead | |
433 */ | |
434 @Deprecated | |
435 public void diff(int clogRevIndex1, int clogRevIndex2, HgBlameInspector insp) throws HgRuntimeException, HgCallbackTargetException { | |
436 try { | |
437 new HgDiffCommand(getRepo()).file(this).range(clogRevIndex1, clogRevIndex2).executeDiff(insp); | |
438 } catch (HgLibraryFailureException ex) { | |
439 throw ex.getCause(); | |
440 } catch (HgException ex) { | |
441 throw new HgInvalidStateException(ex.getMessage()); | |
442 } catch (CancelledException ex) { | |
443 throw new HgInvalidStateException("Cancellatin is not expected"); | |
444 } | |
445 } | |
446 | |
447 /** | |
448 * @deprecated use {@link HgDiffCommand} instead | |
449 */ | |
450 @Deprecated | |
451 public void annotate(int clogRevIndex1, int clogRevIndex2, HgBlameInspector insp, HgIterateDirection iterateOrder) throws HgRuntimeException, HgCallbackTargetException { | |
452 try { | |
453 new HgDiffCommand(getRepo()).file(this).range(clogRevIndex1, clogRevIndex2).order(iterateOrder).executeAnnotate(insp); | |
454 } catch (HgLibraryFailureException ex) { | |
455 throw ex.getCause(); | |
456 } catch (HgException ex) { | |
457 throw new HgInvalidStateException(ex.getMessage()); | |
458 } catch (CancelledException ex) { | |
459 throw new HgInvalidStateException("Cancellatin is not expected"); | |
460 } | |
461 } | |
462 | |
463 /** | |
464 * @deprecated use {@link HgDiffCommand} instead | |
465 */ | |
466 @Deprecated | |
467 public void annotateSingleRevision(int changelogRevisionIndex, HgBlameInspector insp) throws HgRuntimeException, HgCallbackTargetException { | |
468 try { | |
469 new HgDiffCommand(getRepo()).file(this).changeset(changelogRevisionIndex).executeParentsAnnotate(insp); | |
470 } catch (HgLibraryFailureException ex) { | |
471 throw ex.getCause(); | |
472 } catch (HgException ex) { | |
473 throw new HgInvalidStateException(ex.getMessage()); | |
474 } catch (CancelledException ex) { | |
475 throw new HgInvalidStateException("Cancellatin is not expected"); | |
476 } | |
477 } | |
478 | |
479 @Override | 425 @Override |
480 public String toString() { | 426 public String toString() { |
481 StringBuilder sb = new StringBuilder(getClass().getSimpleName()); | 427 StringBuilder sb = new StringBuilder(getClass().getSimpleName()); |
482 sb.append('('); | 428 sb.append('('); |
483 sb.append(getPath()); | 429 sb.append(getPath()); |