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]); }
public void openFile(String path, long revision) throws SVNException { myCurrentFile = new SVNFileInfo(path, false); myCurrentFile.loadFromRepository(); }
public void openFile(String path, long revision) throws SVNException { myCurrentFile = createFileInfo(path, false); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.loadFromRepository(revision); }
public void openFile(String path, long revision) throws SVNException { myCurrentFile = createFileInfo(path, false); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.loadFromRepository(revision); }
public void loadFromRepository(long revision) throws SVNException { if (!myIsLoaded) { super.loadFromRepository(revision); myIsLoaded = true; } }
private SVNFileInfoExt getFileInfo(String path, long revision, SVNEditorAction action, SVNNodeKind kind) throws SVNException { if (myCurrentFile == null) { myCurrentFile = createFileInfo(path, action, kind); if (action == SVNEditorAction.ADD) { myCurrentFile.myBaseProperties = new SVNProperties(); myCurrentFile.myBaseFile = SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", false); } else if (action == SVNEditorAction.MODIFY) { myCurrentFile.loadFromRepository(revision); } } return (SVNFileInfoExt) myCurrentFile; }
public void openFile(String path, long revision) throws SVNException { myCurrentFile = createFileInfo(path, false); if (myCurrentDirectory.myIsSkip || myCurrentDirectory.myIsTreeConflicted) { myCurrentFile.myIsSkip = true; return; } myCurrentFile.loadFromRepository(revision); }