public SVNLocationEntry getPreviousLocation(String path, long[] appearedRevision) throws SVNException { if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = SVNRepository.INVALID_REVISION; } FSClosestCopy closestCopy = getClosestCopy(path); if (closestCopy == null) { return null; } FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = ""; if (!path.equals(copyTargetPath)) { remainder = path.substring(copyTargetPath.length()); if (remainder.startsWith("/")) { remainder = remainder.substring(1); } } String previousPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(copyFromPath, remainder)); if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = copyTargetRoot.getRevision(); } return new SVNLocationEntry(copyFromRevision, previousPath); }
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()); }
if (startNodeId.compareTo(endNodeId) != -1) { FSClosestCopy closestCopy = endRoot.getClosestCopy(path); if (closestCopy == null || closestCopy.getRevisionRoot() == null || closestCopy.getRevisionRoot().getRevision() <= startRev) { return SVNRepository.INVALID_REVISION; FSClosestCopy closestCopy = root.getClosestCopy(path); if (nodeRelationship == -1 || (closestCopy != null && closestCopy.getRevisionRoot() != null && closestCopy.getRevisionRoot().getRevision() > startRev)) { endRev = midRev; midRev = (startRev + endRev)/2;
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()); }
if (startNodeId.compareTo(endNodeId) != -1) { FSClosestCopy closestCopy = endRoot.getClosestCopy(path); if (closestCopy == null || closestCopy.getRevisionRoot() == null || closestCopy.getRevisionRoot().getRevision() <= startRev) { return SVNRepository.INVALID_REVISION; FSClosestCopy closestCopy = root.getClosestCopy(path); if (nodeRelationship == -1 || (closestCopy != null && closestCopy.getRevisionRoot() != null && closestCopy.getRevisionRoot().getRevision() > startRev)) { endRev = midRev; midRev = (startRev + endRev)/2;
public SVNLocationEntry getPreviousLocation(String path, long[] appearedRevision) throws SVNException { if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = SVNRepository.INVALID_REVISION; } FSClosestCopy closestCopy = getClosestCopy(path); if (closestCopy == null) { return null; } FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = ""; if (!path.equals(copyTargetPath)) { remainder = path.substring(copyTargetPath.length()); if (remainder.startsWith("/")) { remainder = remainder.substring(1); } } String previousPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(copyFromPath, remainder)); if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = copyTargetRoot.getRevision(); } return new SVNLocationEntry(copyFromRevision, previousPath); }
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()); }
if (startNodeId.compareTo(endNodeId) != -1) { FSClosestCopy closestCopy = endRoot.getClosestCopy(path); if (closestCopy == null || closestCopy.getRevisionRoot() == null || closestCopy.getRevisionRoot().getRevision() <= startRev) { return SVNRepository.INVALID_REVISION; FSClosestCopy closestCopy = root.getClosestCopy(path); if (nodeRelationship == -1 || (closestCopy != null && closestCopy.getRevisionRoot() != null && closestCopy.getRevisionRoot().getRevision() > startRev)) { endRev = midRev; midRev = (startRev + endRev)/2;
public SVNLocationEntry getPreviousLocation(String path, long[] appearedRevision) throws SVNException { if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = SVNRepository.INVALID_REVISION; } FSClosestCopy closestCopy = getClosestCopy(path); if (closestCopy == null) { return null; } FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = ""; if (!path.equals(copyTargetPath)) { remainder = path.substring(copyTargetPath.length()); if (remainder.startsWith("/")) { remainder = remainder.substring(1); } } String previousPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(copyFromPath, remainder)); if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = copyTargetRoot.getRevision(); } return new SVNLocationEntry(copyFromRevision, previousPath); }
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()); }
private SVNLocationEntry addFileSmartly(String editPath, String originalPath) throws SVNException { String copyFromPath = null; long copyFromRevision = SVNRepository.INVALID_REVISION; if (mySendCopyFromArgs) { FSClosestCopy closestCopy = getTargetRoot().getClosestCopy(originalPath); if (closestCopy != null) { FSRevisionRoot closestCopyRoot = closestCopy.getRevisionRoot(); String closestCopyPath = closestCopy.getPath(); if (originalPath.equals(closestCopyPath)) { FSRevisionNode closestCopyFromNode = closestCopyRoot.getRevisionNode( closestCopyPath); copyFromPath = closestCopyFromNode.getCopyFromPath(); copyFromRevision = closestCopyFromNode.getCopyFromRevision(); } } } myEditor.addFile(editPath, copyFromPath, copyFromRevision); return new SVNLocationEntry(copyFromRevision, copyFromPath); }
private SVNLocationEntry addFileSmartly(String editPath, String originalPath) throws SVNException { String copyFromPath = null; long copyFromRevision = SVNRepository.INVALID_REVISION; if (mySendCopyFromArgs) { FSClosestCopy closestCopy = getTargetRoot().getClosestCopy(originalPath); if (closestCopy != null) { FSRevisionRoot closestCopyRoot = closestCopy.getRevisionRoot(); String closestCopyPath = closestCopy.getPath(); if (originalPath.equals(closestCopyPath)) { FSRevisionNode closestCopyFromNode = closestCopyRoot.getRevisionNode( closestCopyPath); copyFromPath = closestCopyFromNode.getCopyFromPath(); copyFromRevision = closestCopyFromNode.getCopyFromRevision(); } } } myEditor.addFile(editPath, copyFromPath, copyFromRevision); return new SVNLocationEntry(copyFromRevision, copyFromPath); }
public SVNLocationEntry getPreviousLocation(String path, long revision, long[] appearedRevision) throws SVNException { if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = SVNRepository.INVALID_REVISION; } FSRevisionRoot root = createRevisionRoot(revision); FSClosestCopy closestCopy = root.getClosestCopy(path); if (closestCopy == null) { return null; } FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); if (copyTargetRoot == null) { return null; } String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = ""; if (!path.equals(copyTargetPath)) { remainder = path.substring(copyTargetPath.length()); if (remainder.startsWith("/")) { remainder = remainder.substring(1); } } String previousPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(copyFromPath, remainder)); if (appearedRevision != null && appearedRevision.length > 0) { appearedRevision[0] = copyTargetRoot.getRevision(); } return new SVNLocationEntry(copyFromRevision, previousPath); }
FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); if (copyTargetRoot == null) { return null; String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath();
FSRevisionRoot copyTargetRoot = closestCopy.getRevisionRoot(); if (copyTargetRoot == null) { return null; String copyTargetPath = closestCopy.getPath(); FSRevisionNode copyFromNode = copyTargetRoot.getRevisionNode(copyTargetPath); String copyFromPath = copyFromNode.getCopyFromPath();
private SVNLocationEntry addFileSmartly(String editPath, String originalPath) throws SVNException { String copyFromPath = null; long copyFromRevision = SVNRepository.INVALID_REVISION; if (mySendCopyFromArgs) { if (!isTransactionTarget()) { FSClosestCopy closestCopy = ((FSRevisionRoot) getTargetRoot()).getClosestCopy(originalPath); if (closestCopy != null) { FSRevisionRoot closestCopyRoot = closestCopy.getRevisionRoot(); String closestCopyPath = closestCopy.getPath(); if (originalPath.equals(closestCopyPath)) { FSRevisionNode closestCopyFromNode = closestCopyRoot.getRevisionNode( closestCopyPath); copyFromPath = closestCopyFromNode.getCopyFromPath(); copyFromRevision = closestCopyFromNode.getCopyFromRevision(); } } } else if (isTransactionTarget()) { FSTransactionRoot txn = (FSTransactionRoot) getTargetRoot(); FSPathChange change = (FSPathChange) txn.getChangedPaths().get(originalPath); if (change != null) { copyFromPath = change.getCopyPath(); copyFromRevision = change.getCopyRevision(); } } } myEditor.addFile(editPath, copyFromPath, copyFromRevision); return new SVNLocationEntry(copyFromRevision, copyFromPath); }
break; FSRevisionRoot croot = tempClCopy.getRevisionRoot(); if (croot == null) { break; String cpath = tempClCopy.getPath();