public static SVNLocationEntry findYoungestCopyroot(File reposRootDir, FSParentPath parPath) throws SVNException { SVNLocationEntry parentEntry = null; if (parPath.getParent() != null) { parentEntry = findYoungestCopyroot(reposRootDir, parPath.getParent()); } SVNLocationEntry myEntry = new SVNLocationEntry(parPath.getRevNode().getCopyRootRevision(), parPath.getRevNode().getCopyRootPath()); if (parentEntry != null) { if (myEntry.getRevision() >= parentEntry.getRevision()) { return myEntry; } return parentEntry; } return myEntry; }
public static SVNLocationEntry findYoungestCopyroot(File reposRootDir, FSParentPath parPath) throws SVNException { SVNLocationEntry parentEntry = null; if (parPath.getParent() != null) { parentEntry = findYoungestCopyroot(reposRootDir, parPath.getParent()); } SVNLocationEntry myEntry = new SVNLocationEntry(parPath.getRevNode().getCopyRootRevision(), parPath.getRevNode().getCopyRootPath()); if (parentEntry != null) { if (myEntry.getRevision() >= parentEntry.getRevision()) { return myEntry; } return parentEntry; } return myEntry; }
public static SVNLocationEntry findYoungestCopyroot(File reposRootDir, FSParentPath parPath) throws SVNException { SVNLocationEntry parentEntry = null; if (parPath.getParent() != null) { parentEntry = findYoungestCopyroot(reposRootDir, parPath.getParent()); } SVNLocationEntry myEntry = new SVNLocationEntry(parPath.getRevNode().getCopyRootRevision(), parPath.getRevNode().getCopyRootPath()); if (parentEntry != null) { if (myEntry.getRevision() >= parentEntry.getRevision()) { return myEntry; } return parentEntry; } return myEntry; }
public static SVNLocationEntry findYoungestCopyroot(File reposRootDir, FSParentPath parPath) throws SVNException { SVNLocationEntry parentEntry = null; if (parPath.getParent() != null) { parentEntry = findYoungestCopyroot(reposRootDir, parPath.getParent()); } SVNLocationEntry myEntry = new SVNLocationEntry(parPath.getRevNode().getCopyRootRevision(), parPath.getRevNode().getCopyRootPath()); if (parentEntry != null) { if (myEntry.getRevision() >= parentEntry.getRevision()) { return myEntry; } return parentEntry; } return myEntry; }
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()); }
SVNLocationEntry copyrootEntry = findYoungestCopyroot(myFSFS.getRepositoryRoot(), parentPath); SVNLocationEntry srcEntry = new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);
commitEntry = new SVNLocationEntry(revNode.getId().getRevision(), revNode.getCreatedPath()); SVNLocationEntry copyrootEntry = findYoungestCopyroot(owner.getRepositoryRoot(), parentPath); SVNLocationEntry srcEntry = new SVNLocationEntry(FSRepository.SVN_INVALID_REVNUM, null); long dstRev = FSRepository.SVN_INVALID_REVNUM;
SVNLocationEntry copyrootEntry = findYoungestCopyroot(myFSFS.getRepositoryRoot(), parentPath); SVNLocationEntry srcEntry = new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);
SVNLocationEntry copyrootEntry = findYoungestCopyroot(myFSFS.getRepositoryRoot(), parentPath); SVNLocationEntry srcEntry = new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);