Mercurial > jhg
diff src/org/tmatesoft/hg/internal/ManifestRevision.java @ 537:5a455624be4f
Update javadoc for HgManifest.Inspector and fix erroneous internal API
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 05 Feb 2013 20:06:22 +0100 |
parents | 12f668401613 |
children | dd4f6311af52 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ManifestRevision.java Tue Feb 05 16:36:58 2013 +0100 +++ b/src/org/tmatesoft/hg/internal/ManifestRevision.java Tue Feb 05 20:06:22 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 TMate Software Ltd + * Copyright (c) 2011-2013 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ /** * Specific revision of the manifest. - * Note, suited to keep single revision only ({@link #changeset()}). + * Note, suited to keep single revision only ({@link #revision()}), which is linked to changeset {@link #changesetRevisionIndex()}. * * @author Artem Tikhomirov * @author TMate Software Ltd. @@ -36,8 +36,8 @@ private final TreeMap<Path, HgManifest.Flags> flagsMap; private final Convertor<Nodeid> idsPool; private final Convertor<Path> namesPool; - private Nodeid changeset; - private int changelogRev; + private Nodeid manifestRev; + private int changelogRevIndex, manifestRevIndex; // optional pools for effective management of nodeids and filenames (they are likely // to be duplicated among different manifest revisions @@ -62,14 +62,21 @@ } /** - * @return identifier of the changeset this manifest revision corresponds to. + * @return identifier of this manifest revision */ - public Nodeid changeset() { - return changeset; + public Nodeid revision() { + return manifestRev; } - public int changesetLocalRev() { - return changelogRev; + public int revisionIndex() { + return manifestRevIndex; + } + + /** + * @return revision index for the changelog this manifest revision is linked to + */ + public int changesetRevisionIndex() { + return changelogRevIndex; } // @@ -100,13 +107,14 @@ return false; } - public boolean begin(int revision, Nodeid nid, int changelogRevision) { - if (changeset != null) { + public boolean begin(int revisionIndex, Nodeid revision, int changelogRevisionIndex) { + if (manifestRev != null) { idsMap.clear(); flagsMap.clear(); } - changeset = nid; - changelogRev = changelogRevision; + manifestRev = revision; + manifestRevIndex = revisionIndex; + changelogRevIndex = changelogRevisionIndex; return true; } } \ No newline at end of file