private static SVNTreeConflictDescription readSingleTreeConflict(SVNSkel skel, File dirPath) throws SVNException { if (!isValidConflict(skel)) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid conflict info in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } if (skel.getChild(1).getData().length == 0) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Empty \'victim\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } String victimBasename = skel.getChild(1).getValue(); SVNNodeKind kind = getNodeKind(skel.getChild(2).getValue()); if (kind != SVNNodeKind.FILE && kind != SVNNodeKind.DIR) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid \'node_kind\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } SVNOperation operation = getOperation(skel.getChild(3).getValue()); SVNConflictAction action = getAction(skel.getChild(4).getValue()); SVNConflictReason reason = getConflictReason(skel.getChild(5).getValue()); SVNConflictVersion srcLeftVersion = readConflictVersion(skel.getChild(6)); SVNConflictVersion srcRightVersion = readConflictVersion(skel.getChild(7)); return new SVNTreeConflictDescription(new File(dirPath, victimBasename), kind, action, reason, operation, srcLeftVersion, srcRightVersion); }
public static SVNTreeConflictDescription readSingleTreeConflict(SVNSkel skel, File dirPath) throws SVNException { if (!isValidConflict(skel)) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid conflict info in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } if (skel.getChild(1).getData().length == 0) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Empty \'victim\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } String victimBasename = skel.getChild(1).getValue(); SVNNodeKind kind = getNodeKind(skel.getChild(2).getValue()); if (kind != SVNNodeKind.FILE && kind != SVNNodeKind.DIR) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid \'node_kind\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } SVNOperation operation = getOperation(skel.getChild(3).getValue()); SVNConflictAction action = getAction(skel.getChild(4).getValue()); SVNConflictReason reason = getConflictReason(skel.getChild(5).getValue()); SVNConflictVersion srcLeftVersion = readConflictVersion(skel.getChild(6)); SVNConflictVersion srcRightVersion = readConflictVersion(skel.getChild(7)); return new SVNTreeConflictDescription(new File(dirPath, victimBasename), kind, action, reason, operation, srcLeftVersion, srcRightVersion); }
private static SVNTreeConflictDescription readSingleTreeConflict(SVNSkel skel, File dirPath) throws SVNException { if (!isValidConflict(skel)) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid conflict info in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } if (skel.getChild(1).getData().length == 0) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Empty \'victim\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } String victimBasename = skel.getChild(1).getValue(); SVNNodeKind kind = getNodeKind(skel.getChild(2).getValue()); if (kind != SVNNodeKind.FILE && kind != SVNNodeKind.DIR) { SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Invalid \'node_kind\' field in tree conflict description"); SVNErrorManager.error(error, SVNLogType.WC); } SVNOperation operation = getOperation(skel.getChild(3).getValue()); SVNConflictAction action = getAction(skel.getChild(4).getValue()); SVNConflictReason reason = getConflictReason(skel.getChild(5).getValue()); SVNConflictVersion srcLeftVersion = readConflictVersion(skel.getChild(6)); SVNConflictVersion srcRightVersion = readConflictVersion(skel.getChild(7)); return new SVNTreeConflictDescription(new File(dirPath, victimBasename), kind, action, reason, operation, srcLeftVersion, srcRightVersion); }