SVNNodeKind pathKind = root.checkNodeKind(path); sendResponse(root, path, pathKind == SVNNodeKind.DIR, buffer); sentPaths.put(path, path);
private FSEntry fakeDirEntry(String reposPath, FSRevisionRoot root) throws SVNException { if (root.checkNodeKind(reposPath) == SVNNodeKind.NONE) { return null; } FSRevisionNode node = root.getRevisionNode(reposPath); FSEntry dirEntry = new FSEntry(node.getId(), node.getType(), SVNPathUtil.tail(node.getCreatedPath())); return dirEntry; }
private FSEntry fakeDirEntry(String reposPath, FSRevisionRoot root) throws SVNException { if (root.checkNodeKind(reposPath) == SVNNodeKind.NONE) { return null; } FSRevisionNode node = root.getRevisionNode(reposPath); FSEntry dirEntry = new FSEntry(node.getId(), node.getType(), SVNPathUtil.tail(node.getCreatedPath())); return dirEntry; }
private FSEntry fakeDirEntry(String reposPath, FSRevisionRoot root) throws SVNException { if (root.checkNodeKind(reposPath) == SVNNodeKind.NONE) { return null; } FSRevisionNode node = root.getRevisionNode(reposPath); FSEntry dirEntry = new FSEntry(node.getId(), node.getType(), SVNPathUtil.tail(node.getCreatedPath())); return dirEntry; }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } finally { closeRepository(); } }
boolean markAsMerged, Map duplicatePathRevs) throws SVNException { FSRevisionRoot root = myFSFS.createRevisionRoot(endRevision); if (root.checkNodeKind(path) != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "''{0}'' is not a file in revision ''{1}''",
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_DIRECTORY) { return SVNNodeKind.NONE; } throw e; } finally { closeRepository(); } }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_DIRECTORY) { return SVNNodeKind.NONE; } throw e; } finally { closeRepository(); } }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_DIRECTORY) { return SVNNodeKind.NONE; } throw e; } finally { closeRepository(); } }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public SVNDirEntry info(String path, long revision) throws SVNException { try { openRepository(); path = getRepositoryPath(path); if (FSRepository.isInvalidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } FSRevisionRoot root = myFSFS.createRevisionRoot(revision); if (root.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSRevisionNode revNode = root.getRevisionNode(path); String fullPath = getFullPath(path); String parentFullPath = "/".equals(path) ? fullPath : SVNPathUtil.removeTail(fullPath); SVNURL url = getLocation().setPath(parentFullPath, false); String name = "/".equals(path) ? "" : SVNPathUtil.tail(path); FSEntry fsEntry = new FSEntry(revNode.getId(), revNode.getType(), name); SVNDirEntry entry = buildDirEntry(fsEntry, url, revNode, SVNDirEntry.DIRENT_ALL); return entry; } finally { closeRepository(); } }
public SVNDirEntry info(String path, long revision) throws SVNException { try { openRepository(); path = getRepositoryPath(path); if (FSRepository.isInvalidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } FSRevisionRoot root = myFSFS.createRevisionRoot(revision); if (root.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSRevisionNode revNode = root.getRevisionNode(path); String fullPath = getFullPath(path); String parentFullPath = "/".equals(path) ? fullPath : SVNPathUtil.removeTail(fullPath); SVNURL url = getLocation().setPath(parentFullPath, false); String name = SVNPathUtil.tail(path); FSEntry fsEntry = new FSEntry(revNode.getId(), revNode.getType(), name); SVNDirEntry entry = buildDirEntry(fsEntry, url, revNode, SVNDirEntry.DIRENT_ALL); return entry; } finally { closeRepository(); } }
public SVNDirEntry info(String path, long revision) throws SVNException { try { openRepository(); path = getRepositoryPath(path); if (FSRepository.isInvalidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } FSRevisionRoot root = myFSFS.createRevisionRoot(revision); if (root.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSRevisionNode revNode = root.getRevisionNode(path); String fullPath = getFullPath(path); String parentFullPath = "/".equals(path) ? fullPath : SVNPathUtil.removeTail(fullPath); SVNURL url = getLocation().setPath(parentFullPath, false); String name = SVNPathUtil.tail(path); FSEntry fsEntry = new FSEntry(revNode.getId(), revNode.getType(), name); SVNDirEntry entry = buildDirEntry(fsEntry, url, revNode, false); return entry; } finally { closeRepository(); } }
public SVNDirEntry info(String path, long revision) throws SVNException { try { openRepository(); path = getRepositoryPath(path); if (FSRepository.isInvalidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } FSRevisionRoot root = myFSFS.createRevisionRoot(revision); if (root.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSRevisionNode revNode = root.getRevisionNode(path); String fullPath = getFullPath(path); String parentFullPath = "/".equals(path) ? fullPath : SVNPathUtil.removeTail(fullPath); SVNURL url = getLocation().setPath(parentFullPath, false); String name = SVNPathUtil.tail(path); FSEntry fsEntry = new FSEntry(revNode.getId(), revNode.getType(), name); SVNDirEntry entry = buildDirEntry(fsEntry, url, revNode, SVNDirEntry.DIRENT_ALL); return entry; } finally { closeRepository(); } }
private FSClosestCopy closestCopy(FSRevisionRoot root, String path) throws SVNException { FSParentPath parentPath = root.openPath(path, true, true); SVNLocationEntry copyDstEntry = FSNodeHistory.findYoungestCopyroot(myReposRootDir, parentPath); if (copyDstEntry == null || copyDstEntry.getRevision() == 0) { return null; } FSRevisionRoot copyDstRoot = myFSFS.createRevisionRoot(copyDstEntry.getRevision()); if (copyDstRoot.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSParentPath copyDstParentPath = copyDstRoot.openPath(path, true, true); FSRevisionNode copyDstNode = copyDstParentPath.getRevNode(); if (!copyDstNode.getId().isRelated(parentPath.getRevNode().getId())) { return null; } long createdRev = copyDstNode.getId().getRevision(); if (createdRev == copyDstEntry.getRevision()) { if (copyDstNode.getPredecessorId() == null) { return null; } } return new FSClosestCopy(copyDstRoot, copyDstEntry.getPath()); }
public FSClosestCopy getClosestCopy(String path) throws SVNException { FSParentPath parentPath = openPath(path, true, true); SVNLocationEntry copyDstEntry = FSNodeHistory.findYoungestCopyroot(getOwner().getRepositoryRoot(), parentPath); if (copyDstEntry == null || copyDstEntry.getRevision() == 0) { return null; } FSRevisionRoot copyDstRoot = getOwner().createRevisionRoot(copyDstEntry.getRevision()); if (copyDstRoot.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSParentPath copyDstParentPath = copyDstRoot.openPath(path, true, true); FSRevisionNode copyDstNode = copyDstParentPath.getRevNode(); if (!copyDstNode.getId().isRelated(parentPath.getRevNode().getId())) { return null; } long createdRev = copyDstNode.getCreatedRevision(); if (createdRev == copyDstEntry.getRevision()) { if (copyDstNode.getPredecessorId() == null) { return null; } } return new FSClosestCopy(copyDstRoot, copyDstEntry.getPath()); }
public FSClosestCopy getClosestCopy(String path) throws SVNException { FSParentPath parentPath = openPath(path, true, true); SVNLocationEntry copyDstEntry = FSNodeHistory.findYoungestCopyroot(getOwner().getRepositoryRoot(), parentPath); if (copyDstEntry == null || copyDstEntry.getRevision() == 0) { return null; } FSRevisionRoot copyDstRoot = getOwner().createRevisionRoot(copyDstEntry.getRevision()); if (copyDstRoot.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSParentPath copyDstParentPath = copyDstRoot.openPath(path, true, true); FSRevisionNode copyDstNode = copyDstParentPath.getRevNode(); if (!copyDstNode.getId().isRelated(parentPath.getRevNode().getId())) { return null; } long createdRev = copyDstNode.getCreatedRevision(); if (createdRev == copyDstEntry.getRevision()) { if (copyDstNode.getPredecessorId() == null) { return null; } } return new FSClosestCopy(copyDstRoot, copyDstEntry.getPath()); }
public FSClosestCopy getClosestCopy(String path) throws SVNException { FSParentPath parentPath = openPath(path, true, true); SVNLocationEntry copyDstEntry = FSNodeHistory.findYoungestCopyroot(getOwner().getRepositoryRoot(), parentPath); if (copyDstEntry == null || copyDstEntry.getRevision() == 0) { return null; } FSRevisionRoot copyDstRoot = getOwner().createRevisionRoot(copyDstEntry.getRevision()); if (copyDstRoot.checkNodeKind(path) == SVNNodeKind.NONE) { return null; } FSParentPath copyDstParentPath = copyDstRoot.openPath(path, true, true); FSRevisionNode copyDstNode = copyDstParentPath.getRevNode(); if (!copyDstNode.getId().isRelated(parentPath.getRevNode().getId())) { return null; } long createdRev = copyDstNode.getCreatedRevision(); if (createdRev == copyDstEntry.getRevision()) { if (copyDstNode.getPredecessorId() == null) { return null; } } return new FSClosestCopy(copyDstRoot, copyDstEntry.getPath()); }