Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 367:2fadf8695f8a
Use 'revision index' instead of the vague 'local revision number' concept in the API
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Dec 2011 15:37:27 +0100 |
parents | 189dc6dc1c3e |
children | 5e95b0da26f2 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java Fri Dec 16 04:43:18 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java Fri Dec 16 15:37:27 2011 +0100 @@ -139,8 +139,8 @@ if (dirstateParent.isNull()) { dirstateParentManifest = baseRevisionCollector != null ? baseRevisionCollector.raw(-1) : HgStatusCollector.createEmptyManifestRevision(); } else { - int changelogLocalRev = repo.getChangelog().getLocalRevision(dirstateParent); - dirstateParentManifest = getManifest(changelogLocalRev); + int changeloRevIndex = repo.getChangelog().getRevisionIndex(dirstateParent); + dirstateParentManifest = getManifest(changeloRevIndex); } } @@ -153,7 +153,7 @@ // may be invoked few times, TIP or WORKING_COPY indicate comparison shall be run against working copy parent // NOTE, use of TIP constant requires certain care. TIP here doesn't mean latest cset, but actual working copy parent. public void walk(int baseRevision, HgStatusInspector inspector) throws HgInvalidControlFileException, IOException { - if (HgInternals.wrongLocalRevision(baseRevision) || baseRevision == BAD_REVISION) { + if (HgInternals.wrongRevisionIndex(baseRevision) || baseRevision == BAD_REVISION) { throw new IllegalArgumentException(String.valueOf(baseRevision)); } if (getDirstateImpl() == null) { @@ -414,10 +414,10 @@ ByteArrayChannel bac = new ByteArrayChannel(); boolean ioFailed = false; try { - int localRevision = dataFile.getLocalRevision(revision); + int fileRevisionIndex = dataFile.getRevisionIndex(revision); // need content with metadata striped off - although theoretically chances are metadata may be different, // WC doesn't have it anyway - dataFile.content(localRevision, bac); + dataFile.content(fileRevisionIndex, bac); } catch (CancelledException ex) { // silently ignore - can't happen, ByteArrayChannel is not cancellable } catch (HgException ex) {