File deltaChangeSet = new File(currentSnapsotFile.getParentFile(), FILE_CHANGESET_DELTA);
reader = changeSetMgr.getChangeSetReader(deltaChangeSet);
int numEntries = 0;
for (FileEntry entry : reader) {
FileEntry newEntry = entriesMap.get(entry.getFile());
if (newEntry == null) {
return false;
}
if (entry.getType() != newEntry.getType()) {
return false;
}
switch (entry.getType()) {
case FILE_ADDED:
if (!entry.getNewSHA().equals(newEntry.getNewSHA())) {
return false;
}
case FILE_CHANGED:
if (!entry.getNewSHA().equals(newEntry.getNewSHA())
|| !entry.getOldSHA().equals(newEntry.getOldSHA())) {
return false;
}
default: // FILE_REMOVED
if (!entry.getOldSHA().equals(newEntry.getOldSHA())) {
return false;
}
}
numEntries++;
}