private RemoveArtifactInfo removeArtifactFileIfExists(File wriAbsPath, File artifactFileAbsPath) throws SVNException { RemoveArtifactInfo removeArtifactInfo = new RemoveArtifactInfo(); removeArtifactInfo.workItem = null; if (artifactFileAbsPath != null) { SVNNodeKind nodeKind = SVNFileType.getNodeKind(SVNFileType.getType(artifactFileAbsPath)); if (nodeKind == SVNNodeKind.FILE) { removeArtifactInfo.workItem = wqBuildFileRemove(wriAbsPath, artifactFileAbsPath); removeArtifactInfo.fileFound = true; } } return removeArtifactInfo; }
public static SVNFileType getType(File file) { final boolean detectSymlinks = isSymlinkSupportEnabled(); if (file == null) { return SVNFileType.UNKNOWN; if (detectSymlinks && SVNFileUtil.symlinksSupported() && !isAdminFile(file)) { if (ourCanonPathCacheUsed && !ourFastSymlinkResoution && SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK; } else if (!ourCanonPathCacheUsed || ourFastSymlinkResoution) { File child = children[i]; if (child.getName().equals(file.getName())) { if (SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK; canonicalPath = file.getAbsolutePath(); if (!absolutePath.equals(canonicalPath) && SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK;
private static boolean isRepositoryRoot(File candidatePath) { File formatFile = new File(candidatePath, REPOS_FORMAT_FILE); SVNFileType fileType = SVNFileType.getType(formatFile); if (fileType != SVNFileType.FILE) { return false; } File dbFile = new File(candidatePath, DB_DIR); fileType = SVNFileType.getType(dbFile); if (fileType != SVNFileType.DIRECTORY && fileType != SVNFileType.SYMLINK) { return false; } return true; }
private static boolean isVersionedFile(File file) { SVNWCAccess wcAccess = SVNWCAccess.newInstance(null); try { SVNAdminArea area = wcAccess.probeOpen(file, false, 0); if (area.getEntry(area.getThisDirName(), false) == null) { return false; } SVNFileType type = SVNFileType.getType(file); if (type.isFile() || type == SVNFileType.NONE) { return area.getEntry(file.getName(), false) != null; } else if (type != SVNFileType.NONE && !area.getRoot().equals(file)) { return false; } return true; } catch (SVNException e) { return false; } finally { try { wcAccess.close(); } catch (SVNException svne) { } } } }
SVNErrorManager.error(err, SVNLogType.WC); SVNFileType fileType = SVNFileType.getType(path); if (fileType == SVNFileType.UNKNOWN) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNKNOWN_KIND, "Unknown entry kind for ''{0}''", path); if (SVNFileType.isSymlinkSupportEnabled()) { if (((specialPropertyValue == null && specialFile) || (SVNFileUtil.symlinksSupported() && specialPropertyValue != null && !specialFile)) && fileType != SVNFileType.NONE) { SVNFileType addedFileType = SVNFileType.getType(path); if (addedFileType == SVNFileType.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, SVNFileType currentType = SVNFileType.getType(currentFile); if (currentType == SVNFileType.NONE && currentEntry.isScheduledForDeletion()) { if (SVNWCAccess.matchesChangeList(changelists, entry)) {
public static boolean symlinksSupported() { return !(isWindows || isOpenVMS) && SVNFileType.isSymlinkSupportEnabled(); }
return SVNFileType.UNKNOWN; if (detectSymlinks && !SVNFileUtil.isWindows && !isAdminFile(file)) { if (canonPathCacheUsed && !fastSymlinkResoution && SVNFileUtil.isSymlink(file)) { return SVNFileType.SYMLINK;
private static boolean isRepositoryRoot(File candidatePath) { File formatFile = new File(candidatePath, "format"); SVNFileType fileType = SVNFileType.getType(formatFile); if (fileType != SVNFileType.FILE) { return false; } File dbFile = new File(candidatePath, SVN_REPOS_DB_DIR); fileType = SVNFileType.getType(dbFile); if (fileType != SVNFileType.DIRECTORY && fileType != SVNFileType.SYMLINK) { return false; } return true; }
private static boolean isVersionedFile(File file) { SVNWCAccess wcAccess = SVNWCAccess.newInstance(null); try { SVNAdminArea area = wcAccess.probeOpen(file, false, 0); if (area.getEntry(area.getThisDirName(), false) == null) { return false; } SVNFileType type = SVNFileType.getType(file); if (type.isFile() || type == SVNFileType.NONE) { // file or missing file return area.getEntry(file.getName(), false) != null; } else if (type != SVNFileType.NONE && !area.getRoot().equals(file)) { // directory, but not anchor. always considered unversioned. return false; } return true; } catch (SVNException e) { return false; } finally { try { wcAccess.close(); } catch (SVNException svne) { // } } }
SVNErrorManager.error(err, SVNLogType.WC); SVNFileType fileType = SVNFileType.getType(path); if (fileType == SVNFileType.UNKNOWN) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNKNOWN_KIND, "Unknown entry kind for ''{0}''", path); if (SVNFileType.isSymlinkSupportEnabled()) { if (((specialPropertyValue == null && specialFile) || (SVNFileUtil.symlinksSupported() && specialPropertyValue != null && !specialFile)) && fileType != SVNFileType.NONE) { SVNFileType addedFileType = SVNFileType.getType(path); if (addedFileType == SVNFileType.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, SVNFileType currentType = SVNFileType.getType(currentFile); if (currentType == SVNFileType.NONE && currentEntry.isScheduledForDeletion()) { if (SVNWCAccess.matchesChangeList(changelists, entry)) {
public static boolean symlinksSupported() { return !(isWindows || isOpenVMS) && SVNFileType.isSymlinkSupportEnabled(); }
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 static boolean isRepositoryRoot(File candidatePath) { File formatFile = new File(candidatePath, REPOS_FORMAT_FILE); SVNFileType fileType = SVNFileType.getType(formatFile); if (fileType != SVNFileType.FILE) { return false; } File dbFile = new File(candidatePath, DB_DIR); fileType = SVNFileType.getType(dbFile); if (fileType != SVNFileType.DIRECTORY && fileType != SVNFileType.SYMLINK) { return false; } return true; }
private static boolean isVersionedFile(File file) { SVNWCAccess wcAccess = SVNWCAccess.newInstance(null); try { SVNAdminArea area = wcAccess.probeOpen(file, false, 0); if (area.getEntry(area.getThisDirName(), false) == null) { return false; } SVNFileType type = SVNFileType.getType(file); if (type.isFile() || type == SVNFileType.NONE) { // file or missing file return area.getEntry(file.getName(), false) != null; } else if (type != SVNFileType.NONE && !area.getRoot().equals(file)) { // directory, but not anchor. always considered unversioned. return false; } return true; } catch (SVNException e) { return false; } finally { try { wcAccess.close(); } catch (SVNException svne) { // } } }
SVNErrorManager.error(err, SVNLogType.WC); SVNFileType fileType = SVNFileType.getType(path); boolean matchesChangelist = SVNWCAccess.matchesChangeList(changelists, entry); if (fileType != SVNFileType.DIRECTORY && fileType != SVNFileType.NONE && !matchesChangelist) { if (SVNFileType.isSymlinkSupportEnabled()) { if (((specialPropertyValue == null && specialFile) || (SVNFileUtil.symlinksSupported() && specialPropertyValue != null && !specialFile)) && fileType != SVNFileType.NONE) { SVNFileType addedFileType = SVNFileType.getType(path); if (addedFileType == SVNFileType.NONE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, SVNFileType currentType = SVNFileType.getType(currentFile); if (currentType == SVNFileType.NONE && currentEntry.isScheduledForDeletion()) { if (SVNWCAccess.matchesChangeList(changelists, entry)) {
public static SVNFileType getType(File file) { final boolean detectSymlinks = isSymlinkSupportEnabled(); if (file == null) { return SVNFileType.UNKNOWN; if (detectSymlinks && SVNFileUtil.symlinksSupported() && !isAdminFile(file)) { if (ourCanonPathCacheUsed && !ourFastSymlinkResoution && SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK; } else if (!ourCanonPathCacheUsed || ourFastSymlinkResoution) { File child = children[i]; if (child.getName().equals(file.getName())) { if (SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK; canonicalPath = file.getAbsolutePath(); if (!absolutePath.equals(canonicalPath) && SVNFileType.isSymlink(file)) { return SVNFileType.SYMLINK;
public static boolean symlinksSupported() { return !(isWindows || isOpenVMS) && SVNFileType.isSymlinkSupportEnabled(); }
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 static boolean isRepositoryRoot(File candidatePath) { File formatFile = new File(candidatePath, REPOS_FORMAT_FILE); SVNFileType fileType = SVNFileType.getType(formatFile); if (fileType != SVNFileType.FILE) { return false; } File dbFile = new File(candidatePath, DB_DIR); fileType = SVNFileType.getType(dbFile); if (fileType != SVNFileType.DIRECTORY && fileType != SVNFileType.SYMLINK) { return false; } return true; }
private static boolean isVersionedFile(File file) { SVNWCAccess wcAccess = SVNWCAccess.newInstance(null); try { SVNAdminArea area = wcAccess.probeOpen(file, false, 0); if (area.getEntry(area.getThisDirName(), false) == null) { return false; } SVNFileType type = SVNFileType.getType(file); if (type.isFile() || type == SVNFileType.NONE) { // file or missing file return area.getEntry(file.getName(), false) != null; } else if (type != SVNFileType.NONE && !area.getRoot().equals(file)) { // directory, but not anchor. always considered unversioned. return false; } return true; } catch (SVNException e) { return false; } finally { try { wcAccess.close(); } catch (SVNException svne) { // } } }