public static SVNSkel getConflictSkel(SVNConflictVersion nullVersion, SVNTreeConflictDescription conflict) throws SVNException {
SVNSkel conflictSkel = SVNSkel.createEmptyList();
SVNConflictVersion sourceRightVersion = conflict.getSourceRightVersion();
sourceRightVersion = sourceRightVersion == null ? nullVersion : sourceRightVersion;
prependVersionInfo(conflictSkel, sourceRightVersion);
SVNConflictVersion sourceLeftVersion = conflict.getSourceLeftVersion();
sourceLeftVersion = sourceLeftVersion == null ? nullVersion : sourceLeftVersion;
prependVersionInfo(conflictSkel, sourceLeftVersion);
conflictSkel.prepend(SVNSkel.createAtom(conflict.getConflictReason().toString()));
conflictSkel.prepend(SVNSkel.createAtom(conflict.getConflictAction().toString()));
conflictSkel.prepend(SVNSkel.createAtom(conflict.getOperation().toString()));
if (conflict.getNodeKind() != SVNNodeKind.DIR && conflict.getNodeKind() != SVNNodeKind.FILE) {
SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT,
"Invalid \'node_kind\' field in tree conflict description");
SVNErrorManager.error(error, SVNLogType.WC);
}
conflictSkel.prepend(SVNSkel.createAtom(getNodeKindString(conflict.getNodeKind())));
String path = conflict.getPath().getName();
if (path.length() == 0) {
SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT,
"Empty path basename in tree conflict description");
SVNErrorManager.error(error, SVNLogType.WC);
}
conflictSkel.prepend(SVNSkel.createAtom(path));
conflictSkel.prepend(SVNSkel.createAtom("conflict"));
return conflictSkel;
}