Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgDataFile.java @ 417:ccd7d25e5aea
New and better name for HgFileInformer - HgChangesetFileSneaker. Explain (comments) ties between HgManifest, HgDataFile, HgChangesetFileSneaker and reasons for method placement
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 22 Mar 2012 20:14:06 +0100 |
| parents | d30083c80d52 |
| children | 6c22bdc0bdfd |
comparison
equal
deleted
inserted
replaced
| 416:d30083c80d52 | 417:ccd7d25e5aea |
|---|---|
| 446 | 446 |
| 447 public void history(HgChangelog.Inspector inspector) throws HgInvalidControlFileException { | 447 public void history(HgChangelog.Inspector inspector) throws HgInvalidControlFileException { |
| 448 history(0, getLastRevision(), inspector); | 448 history(0, getLastRevision(), inspector); |
| 449 } | 449 } |
| 450 | 450 |
| 451 /** | |
| 452 * | |
| 453 * @param start local revision index | |
| 454 * @param end local revision index | |
| 455 * @param inspector | |
| 456 * FIXME EXCEPTIONS | |
| 457 * @throws HgInvalidRevisionException | |
| 458 * @throws HgInvalidControlFileException | |
| 459 */ | |
| 451 public void history(int start, int end, HgChangelog.Inspector inspector) throws HgInvalidRevisionException, HgInvalidControlFileException { | 460 public void history(int start, int end, HgChangelog.Inspector inspector) throws HgInvalidRevisionException, HgInvalidControlFileException { |
| 452 if (!exists()) { | 461 if (!exists()) { |
| 453 throw new IllegalStateException("Can't get history of invalid repository file node"); | 462 throw new IllegalStateException("Can't get history of invalid repository file node"); |
| 454 } | 463 } |
| 455 final int last = getLastRevision(); | 464 final int last = getLastRevision(); |
| 554 if (isCopy()) { | 563 if (isCopy()) { |
| 555 return Nodeid.fromAscii(metadata.find(0, "copyrev")); // XXX reuse/cache Nodeid | 564 return Nodeid.fromAscii(metadata.find(0, "copyrev")); // XXX reuse/cache Nodeid |
| 556 } | 565 } |
| 557 throw new UnsupportedOperationException(); | 566 throw new UnsupportedOperationException(); |
| 558 } | 567 } |
| 559 /* FIXME | 568 |
| 560 public Nodeid getRevisionAtChangeset(int changesetRevision) { | 569 /** |
| 561 } | 570 * Get file flags recorded in the manifest |
| 562 | |
| 563 public HgManifest.Flags getFlagsAtChangeset(int changesetRevisionIndex) { | |
| 564 } | |
| 565 */ | |
| 566 | |
| 567 /** | |
| 568 * | |
| 569 * @param fileRevisionIndex - revision local index, non-negative, or {@link HgRepository#TIP}. | 571 * @param fileRevisionIndex - revision local index, non-negative, or {@link HgRepository#TIP}. |
| 570 * FIXME EXCEPTIONS | 572 * @see HgManifest#getFileFlags(int, Path) |
| 573 * FIXME EXCEPTIONS | |
| 571 * @throws HgInvalidControlFileException | 574 * @throws HgInvalidControlFileException |
| 572 * @throws HgInvalidRevisionException | 575 * @throws HgInvalidRevisionException |
| 573 */ | 576 */ |
| 574 public HgManifest.Flags getFlags(int fileRevisionIndex) throws HgInvalidControlFileException, HgInvalidRevisionException { | 577 public HgManifest.Flags getFlags(int fileRevisionIndex) throws HgInvalidControlFileException, HgInvalidRevisionException { |
| 575 int changesetRevIndex = getChangesetRevisionIndex(fileRevisionIndex); | 578 int changesetRevIndex = getChangesetRevisionIndex(fileRevisionIndex); |
| 576 return getRepo().getManifest().extractFlags(changesetRevIndex, getPath()); | 579 return getRepo().getManifest().getFileFlags(changesetRevIndex, getPath()); |
| 577 } | 580 } |
| 578 | 581 |
| 579 @Override | 582 @Override |
| 580 public String toString() { | 583 public String toString() { |
| 581 StringBuilder sb = new StringBuilder(getClass().getSimpleName()); | 584 StringBuilder sb = new StringBuilder(getClass().getSimpleName()); |
