private SVNNodeKind getDiskKind(String path) { File file = getFile(path); SVNFileType type = null; type = SVNFileType.getType(file); if (type == SVNFileType.UNKNOWN) { return SVNNodeKind.UNKNOWN; } if (myIsDryRun && isPathDeleted(path)) { return SVNNodeKind.NONE; } return SVNFileType.getNodeKind(type); }
private SVNNodeKind getDiskKind(String path) { File file = getFile(path); SVNFileType type = null; type = SVNFileType.getType(file); if (type == SVNFileType.UNKNOWN) { return SVNNodeKind.UNKNOWN; } if (myIsDryRun && isPathDeleted(path)) { return SVNNodeKind.NONE; } return SVNFileType.getNodeKind(type); }
private SVNNodeKind getDiskKind(String path) { File file = getFile(path); SVNFileType type = null; type = SVNFileType.getType(file); if (type == SVNFileType.UNKNOWN) { return SVNNodeKind.UNKNOWN; } if (myIsDryRun && isPathDeleted(path)) { return SVNNodeKind.NONE; } return SVNFileType.getNodeKind(type); }
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; } }
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); } }
public SVNStatusType[] fileChanged(String path, File file1, File file2, long revision1, long revision2, String mimeType1, String mimeType2, Map originalProperties, Map diff) throws SVNException { boolean needsMerge = true; File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), myIsDryRun); if (dir == 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; }
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; }
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 SVNStatusType directoryDeleted(final String path) throws SVNException { final File mergedFile = getFile(path); final SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {
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); } }
File file = getFile(path); SVNWCAccess wcAccess = getWCAccess(); if (wcAccess.getAdminArea(file) == null) {
File file = getFile(path); SVNWCAccess wcAccess = getWCAccess(); if (wcAccess.getAdminArea(file) == null) {
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 SVNStatusType fileDeleted(String path, File file1, File file2, String mimeType1, String mimeType2, SVNProperties originalProperties, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {
public SVNStatusType fileDeleted(String path, File file1, File file2, String mimeType1, String mimeType2, SVNProperties originalProperties, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {
public SVNStatusType fileDeleted(String path, File file1, File file2, String mimeType1, String mimeType2, SVNProperties originalProperties, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); File mergedFile = getFile(path); SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {
public SVNStatusType directoryDeleted(final String path, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); final File mergedFile = getFile(path); final SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {
public SVNStatusType directoryDeleted(final String path, boolean[] isTreeConflicted) throws SVNException { setIsConflicted(isTreeConflicted, false); final File mergedFile = getFile(path); final SVNAdminArea dir = retrieve(mergedFile.getParentFile(), true); if (dir == null) {