comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 405:866fc3b597a0

Add an explicit constant instead of -1 to indicate 'no revision' case
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 14 Mar 2012 22:49:32 +0100
parents 5e95b0da26f2
children 7f27122011c3
comparison
equal deleted inserted replaced
403:2747b0723867 405:866fc3b597a0
135 } 135 }
136 136
137 private void initDirstateParentManifest() throws HgInvalidControlFileException { 137 private void initDirstateParentManifest() throws HgInvalidControlFileException {
138 Nodeid dirstateParent = getDirstateImpl().parents().first(); 138 Nodeid dirstateParent = getDirstateImpl().parents().first();
139 if (dirstateParent.isNull()) { 139 if (dirstateParent.isNull()) {
140 dirstateParentManifest = baseRevisionCollector != null ? baseRevisionCollector.raw(-1) : HgStatusCollector.createEmptyManifestRevision(); 140 dirstateParentManifest = baseRevisionCollector != null ? baseRevisionCollector.raw(NO_REVISION) : HgStatusCollector.createEmptyManifestRevision();
141 } else { 141 } else {
142 int changeloRevIndex = repo.getChangelog().getRevisionIndex(dirstateParent); 142 int changeloRevIndex = repo.getChangelog().getRevisionIndex(dirstateParent);
143 dirstateParentManifest = getManifest(changeloRevIndex); 143 dirstateParentManifest = getManifest(changeloRevIndex);
144 } 144 }
145 } 145 }