sourceEntries = sourceNode.getDirEntries(myFSFS);
}
for (Iterator tgtEntries = targetEntries.keySet().iterator(); tgtEntries.hasNext();) {
String name = (String) tgtEntries.next();
FSEntry tgtEntry = (FSEntry) targetEntries.get(name);
SVNNodeKind tgtKind = tgtEntry.getType();
String targetFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(tgtPath, tgtEntry.getName()));
String editFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(editPath, tgtEntry.getName()));
if (sourceEntries != null && sourceEntries.containsKey(name)) {
FSEntry srcEntry = (FSEntry) sourceEntries.get(name);
String sourceFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(srcPath, tgtEntry.getName()));
SVNNodeKind srcKind = srcEntry.getType();
if (myDepth == SVNDepth.INFINITY || srcKind != SVNNodeKind.DIR) {
int distance = srcEntry.getId().compareTo(tgtEntry.getId());
if (srcKind != tgtKind || (distance == -1 && !myIsIgnoreAncestry)) {
myEditor.deleteEntry(editFullPath, -1);
addFileOrDir(srcRoot, tgtRoot, targetFullPath, editFullPath, tgtKind);
} else if (distance != 0) {
replaceFileOrDir(srcRoot, tgtRoot, sourceFullPath, targetFullPath,
editFullPath, tgtKind);
}
}
sourceEntries.remove(name);
} else {
if (myDepth == SVNDepth.INFINITY || tgtKind != SVNNodeKind.DIR) {
addFileOrDir(srcRoot, tgtRoot, targetFullPath, editFullPath, tgtKind);
}
}
}
if (sourceEntries != null) {
for (Iterator srcEntries = sourceEntries.keySet().iterator(); srcEntries.hasNext();) {
String name = (String) srcEntries.next();
FSEntry srcEntry = (FSEntry) sourceEntries.get(name);
String editFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(editPath, srcEntry.getName()));
if (myDepth == SVNDepth.INFINITY || srcEntry.getType() != SVNNodeKind.DIR) {
myEditor.deleteEntry(editFullPath, -1);
}
}
}
}