protected void delete(File path, boolean force, boolean dryRun, boolean keepLocal) throws SVNException { if (!force && !keepLocal) { SVNWCManager.canDelete(path, getWCAccess().getOptions(), getWCAccess()); } SVNAdminArea root = getWCAccess().retrieve(path.getParentFile()); if (!dryRun) { SVNWCManager.delete(getWCAccess(), root, path, !keepLocal, false); } }
protected void delete(File path, boolean force, boolean dryRun, boolean keepLocal) throws SVNException { if (!force && !keepLocal) { SVNWCManager.canDelete(path, getWCAccess().getOptions(), getWCAccess()); } SVNAdminArea root = getWCAccess().retrieve(path.getParentFile()); if (!dryRun) { SVNWCManager.delete(getWCAccess(), root, path, !keepLocal, false); } }
protected void delete(File path, boolean force, boolean dryRun, boolean keepLocal) throws SVNException { if (!force && !keepLocal) { SVNWCManager.canDelete(path, getWCAccess().getOptions(), getWCAccess()); } SVNAdminArea root = getWCAccess().retrieve(path.getParentFile()); if (!dryRun) { SVNWCManager.delete(getWCAccess(), root, path, !keepLocal, false); } }
protected void delete(File path, boolean force, boolean dryRun) throws SVNException { if (!force) { SVNWCManager.canDelete(path, false, getWCAccess().getOptions()); } SVNAdminArea root = getWCAccess().retrieve(path.getParentFile()); if (!dryRun) { SVNWCManager.delete(getWCAccess(), root, path, true); } }
public SVNStatusType fileDeleted(String path, File file1, File file2, String mimeType1, String mimeType2, Map originalProperties) throws SVNException { File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) { return SVNStatusType.MISSING; } SVNFileType fileType = SVNFileType.getType(mergedFile); if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) { ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); getWCAccess().setEventHandler(null); try { delete(mergedFile, myIsForce, myIsDryRun); } catch (SVNException e) { return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler); } return SVNStatusType.CHANGED; } else if (fileType == SVNFileType.DIRECTORY) { return SVNStatusType.OBSTRUCTED; } else if (fileType == SVNFileType.NONE) { return SVNStatusType.MISSING; } return SVNStatusType.UNKNOWN; }
final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); ISVNEventHandler handler = new ISVNEventHandler() { public void checkCancelled() throws SVNCancelException { getWCAccess().setEventHandler(handler); try { delete(mergedFile, myIsForce, myIsDryRun); return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
public SVNStatusType propertiesChanged(String path, Map originalProperties, Map diff) throws SVNException { Map regularProps = new HashMap(); categorizeProperties(diff, regularProps, null, null); if (regularProps.isEmpty()) { return SVNStatusType.UNKNOWN; } try { File file = getFile(path); SVNStatusType result = SVNPropertiesManager.mergeProperties(getWCAccess(), file, originalProperties, regularProps, false, myIsDryRun); return result; } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE || e.getErrorMessage().getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND) { return SVNStatusType.MISSING; } throw e; } }
SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNStatusType obstructedStatus = getStatusForObstructedOrMissing(path); if (obstructedStatus != SVNStatusType.INAPPLICABLE) { if (fileType == SVNFileType.DIRECTORY) { if (entry != null && !entry.isScheduledForDeletion()) { final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); ISVNEventHandler handler = new ISVNEventHandler() { public void checkCancelled() throws SVNCancelException { getWCAccess().setEventHandler(handler); try { delete(mergedFile, myIsForce, myIsDryRun, false); return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
public void directoryOpened(String path, long revision, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), myIsDryRun); if (dir == null) { return; } SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNFileType type = SVNFileType.getType(mergedFile); if (entry == null || entry.isScheduledForDeletion() || type != SVNFileType.DIRECTORY) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.DELETED); setIsConflicted(isTreeConflicted, true); } }
SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNStatusType obstructedStatus = getStatusForObstructedOrMissing(path); if (obstructedStatus != SVNStatusType.INAPPLICABLE) { if (fileType == SVNFileType.DIRECTORY) { if (entry != null && !entry.isScheduledForDeletion()) { final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); ISVNEventHandler handler = new ISVNEventHandler() { public void checkCancelled() throws SVNCancelException { getWCAccess().setEventHandler(handler); try { delete(mergedFile, myIsForce, myIsDryRun, false); return SVNStatusType.CONFLICTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNStatusType obstructedStatus = getStatusForObstructedOrMissing(path); if (obstructedStatus != SVNStatusType.INAPPLICABLE) { if (fileType == SVNFileType.DIRECTORY) { if (entry != null && !entry.isScheduledForDeletion()) { final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); ISVNEventHandler handler = new ISVNEventHandler() { public void checkCancelled() throws SVNCancelException { getWCAccess().setEventHandler(handler); try { delete(mergedFile, myIsForce, myIsDryRun, false); return SVNStatusType.CONFLICTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) { if (areFilesTheSame(file1, originalProperties, mergedFile, dir) || myMergeDriver.myIsForce || myMergeDriver.myIsRecordOnly) { ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); getWCAccess().setEventHandler(null); try { delete(mergedFile, true, myIsDryRun, false); return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) { if (areFilesTheSame(file1, originalProperties, mergedFile, dir) || myMergeDriver.myIsForce || myMergeDriver.myIsRecordOnly) { ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); getWCAccess().setEventHandler(null); try { delete(mergedFile, true, myIsDryRun, false); return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) { if (areFilesTheSame(file1, originalProperties, mergedFile, dir) || myMergeDriver.myIsForce || myMergeDriver.myIsRecordOnly) { ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler(); getWCAccess().setEventHandler(null); try { delete(mergedFile, true, myIsDryRun, false); return SVNStatusType.OBSTRUCTED; } finally { getWCAccess().setEventHandler(oldEventHandler);
SVNEntry entry = getWCAccess().getEntry(mergedFile, false); SVNFileType fileType = null; if (entry != null) {
private SVNStatusType getStatusForObstructedOrMissing(String path) { File file = getFile(path); SVNEntry entry = null; try { entry = getWCAccess().getEntry(file, true); } catch (SVNException svne) { // } if (entry != null && entry.isAbsent()) { return SVNStatusType.MISSING; } SVNNodeKind expectedKind = getWorkingNodeKind(entry, path); SVNNodeKind diskKind = getDiskKind(path); if (entry != null && entry.isDirectory() && entry.isScheduledForDeletion() && diskKind == SVNNodeKind.DIR) { expectedKind = SVNNodeKind.DIR; } if (expectedKind == diskKind) { return SVNStatusType.INAPPLICABLE; } else if (diskKind == SVNNodeKind.NONE) { return SVNStatusType.MISSING; } return SVNStatusType.OBSTRUCTED; }
private SVNStatusType getStatusForObstructedOrMissing(String path) { File file = getFile(path); SVNEntry entry = null; try { entry = getWCAccess().getEntry(file, true); } catch (SVNException svne) { // } if (entry != null && entry.isAbsent()) { return SVNStatusType.MISSING; } SVNNodeKind expectedKind = getWorkingNodeKind(entry, path); SVNNodeKind diskKind = getDiskKind(path); if (entry != null && entry.isDirectory() && entry.isScheduledForDeletion() && diskKind == SVNNodeKind.DIR) { expectedKind = SVNNodeKind.DIR; } if (expectedKind == diskKind) { return SVNStatusType.INAPPLICABLE; } else if (diskKind == SVNNodeKind.NONE) { return SVNStatusType.MISSING; } return SVNStatusType.OBSTRUCTED; }
private SVNStatusType getStatusForObstructedOrMissing(String path) { File file = getFile(path); SVNEntry entry = null; try { entry = getWCAccess().getEntry(file, true); } catch (SVNException svne) { // } if (entry != null && entry.isAbsent()) { return SVNStatusType.MISSING; } SVNNodeKind expectedKind = getWorkingNodeKind(entry, path); SVNNodeKind diskKind = getDiskKind(path); if (entry != null && entry.isDirectory() && entry.isScheduledForDeletion() && diskKind == SVNNodeKind.DIR) { expectedKind = SVNNodeKind.DIR; } if (expectedKind == diskKind) { return SVNStatusType.INAPPLICABLE; } else if (diskKind == SVNNodeKind.NONE) { return SVNStatusType.MISSING; } return SVNStatusType.OBSTRUCTED; }
public void directoryOpened(String path, long revision, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), myIsDryRun); if (dir == null) { return; } SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNFileType type = SVNFileType.getType(mergedFile); if (entry == null || entry.isScheduledForDeletion()) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.DELETED); setIsConflicted(isTreeConflicted, true); } else if (entry.isDirectory() && type == SVNFileType.NONE) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.MISSING); setIsConflicted(isTreeConflicted, true); } else if (entry.isDirectory() && type != SVNFileType.DIRECTORY) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.OBSTRUCTED); setIsConflicted(isTreeConflicted, true); } else if (type != SVNFileType.DIRECTORY) { // entry of different kind as well, directory has been deleted. myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.DELETED); setIsConflicted(isTreeConflicted, true); } }
public void directoryOpened(String path, long revision, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), myIsDryRun); if (dir == null) { return; } SVNEntry entry = getWCAccess().getEntry(mergedFile, true); SVNFileType type = SVNFileType.getType(mergedFile); if (entry == null || entry.isScheduledForDeletion()) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.DELETED); setIsConflicted(isTreeConflicted, true); } else if (entry.isDirectory() && type == SVNFileType.NONE) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.MISSING); setIsConflicted(isTreeConflicted, true); } else if (entry.isDirectory() && type != SVNFileType.DIRECTORY) { myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.OBSTRUCTED); setIsConflicted(isTreeConflicted, true); } else if (type != SVNFileType.DIRECTORY) { // entry of different kind as well, directory has been deleted. myMergeDriver.recordTreeConflict(mergedFile, dir, SVNNodeKind.DIR, SVNConflictAction.EDIT, SVNConflictReason.DELETED); setIsConflicted(isTreeConflicted, true); } }