public void deleteEntry(String path, long revision) throws SVNException { SVNStatusType type = SVNStatusType.INAPPLICABLE; SVNEventAction action = SVNEventAction.SKIP; SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE; SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1); SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true); if (myAdminInfo == null || dir != null) { if (nodeKind == SVNNodeKind.FILE) { SVNFileInfo file = new SVNFileInfo(path, false); file.loadFromRepository(); String baseType = (String) file.myBaseProperties.get(SVNProperty.MIME_TYPE); type = getDiffCallback().fileDeleted(path, file.myBaseFile, null, baseType, null, file.myBaseProperties); } else if (nodeKind == SVNNodeKind.DIR) { type = getDiffCallback().directoryDeleted(path); } if (type != SVNStatusType.MISSING && type != SVNStatusType.OBSTRUCTED) { action = SVNEventAction.UPDATE_DELETE; if (myIsDryRun) { getDiffCallback().addDeletedPath(path); } } } if (myEventHandler != null) { SVNEvent event = SVNEventFactory.createMergeEvent(myAdminInfo, path, action, expectedAction, type, type, nodeKind); myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN); } }
protected void deleteEntry(String path, SVNNodeKind nodeKind, SVNAdminArea dir) throws SVNException { SVNStatusType type = SVNStatusType.INAPPLICABLE; SVNEventAction action = SVNEventAction.SKIP; SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE; boolean[] isTreeConflicted = { false }; if (myAdminArea == null || dir != null) { if (nodeKind == SVNNodeKind.FILE) { SVNFileInfo file = new SVNFileInfo(path, false); file.loadFromRepository(myRevision1); String baseType = file.myBaseProperties.getStringValue(SVNProperty.MIME_TYPE); type = getDiffCallback().fileDeleted(path, file.myBaseFile, null, baseType, null, file.myBaseProperties, isTreeConflicted); } else if (nodeKind == SVNNodeKind.DIR) { type = getDiffCallback().directoryDeleted(path, isTreeConflicted); } if (type != SVNStatusType.MISSING && type != SVNStatusType.OBSTRUCTED && !isTreeConflicted[0]) { action = SVNEventAction.UPDATE_DELETE; if (myIsDryRun) { getDiffCallback().addDeletedPath(path); } } } action = isTreeConflicted[0] ? SVNEventAction.TREE_CONFLICT : action; addDeletedPath(path, nodeKind, type, action, expectedAction, isTreeConflicted[0]); }
protected void deleteEntry(String path, SVNNodeKind nodeKind, SVNAdminArea dir) throws SVNException { SVNStatusType type = SVNStatusType.INAPPLICABLE; SVNEventAction action = SVNEventAction.SKIP; SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE; boolean[] isTreeConflicted = { false }; if (myAdminArea == null || dir != null) { if (nodeKind == SVNNodeKind.FILE) { SVNFileInfo file = new SVNFileInfo(path, false); file.loadFromRepository(myRevision1); String baseType = file.myBaseProperties.getStringValue(SVNProperty.MIME_TYPE); type = getDiffCallback().fileDeleted(path, file.myBaseFile, null, baseType, null, file.myBaseProperties, isTreeConflicted); } else if (nodeKind == SVNNodeKind.DIR) { type = getDiffCallback().directoryDeleted(path, isTreeConflicted); } if (type != SVNStatusType.MISSING && type != SVNStatusType.OBSTRUCTED && !isTreeConflicted[0]) { action = SVNEventAction.UPDATE_DELETE; if (myIsDryRun) { getDiffCallback().addDeletedPath(path); } } } action = isTreeConflicted[0] ? SVNEventAction.TREE_CONFLICT : action; addDeletedPath(path, nodeKind, type, action, expectedAction, isTreeConflicted[0]); }
protected void deleteEntry(String path, SVNNodeKind nodeKind, SVNAdminArea dir) throws SVNException { SVNStatusType type = SVNStatusType.INAPPLICABLE; SVNEventAction action = SVNEventAction.SKIP; SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE; boolean[] isTreeConflicted = { false }; if (myAdminArea == null || dir != null) { if (nodeKind == SVNNodeKind.FILE) { SVNFileInfo file = new SVNFileInfo(path, false); file.loadFromRepository(myRevision1); String baseType = file.myBaseProperties.getStringValue(SVNProperty.MIME_TYPE); type = getDiffCallback().fileDeleted(path, file.myBaseFile, null, baseType, null, file.myBaseProperties, isTreeConflicted); } else if (nodeKind == SVNNodeKind.DIR) { type = getDiffCallback().directoryDeleted(path, isTreeConflicted); } if (type != SVNStatusType.MISSING && type != SVNStatusType.OBSTRUCTED && !isTreeConflicted[0]) { action = SVNEventAction.UPDATE_DELETE; if (myIsDryRun) { getDiffCallback().addDeletedPath(path); } } } action = isTreeConflicted[0] ? SVNEventAction.TREE_CONFLICT : action; addDeletedPath(path, nodeKind, type, action, expectedAction, isTreeConflicted[0]); }