public FSParentPath(FSRevisionNode newRevNode, String newEntry, FSParentPath newParentPath) { myRevNode = newRevNode; myEntryName = newEntry; myParent = newParentPath; if (newRevNode != null) { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, newRevNode.getCopyFromPath()); } else { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, null); } }
public FSParentPath(FSRevisionNode newRevNode, String newEntry, FSParentPath newParentPath) { myRevNode = newRevNode; myEntryName = newEntry; myParent = newParentPath; if (newRevNode != null) { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, newRevNode.getCopyFromPath()); } else { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, null); } }
public FSParentPath(FSRevisionNode newRevNode, String newEntry, FSParentPath newParentPath) { myRevNode = newRevNode; myEntryName = newEntry; myParent = newParentPath; if (newRevNode != null) { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, newRevNode.getCopyFromPath()); } else { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, null); } }
public FSParentPath(FSRevisionNode newRevNode, String newEntry, FSParentPath newParentPath) { myRevNode = newRevNode; myEntryName = newEntry; myParent = newParentPath; if (newRevNode != null) { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, newRevNode.getCopyFromPath()); } else { myCopyInheritance = new FSCopyInheritance(FSCopyInheritance.COPY_ID_INHERIT_UNKNOWN, null); } }
if (revNode.getCopyFromPath() != null) { String copyFromPath = FSRevisionNode.HEADER_COPYFROM + ": " + revNode.getCopyFromRevision() + " " + revNode.getCopyFromPath() + "\n"; revNodeFile.write(copyFromPath.getBytes("UTF-8"));
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 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 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); }
revNodeFile.write(cpath.getBytes("UTF-8")); if (revNode.getCopyFromPath() != null) { String copyFromPath = FSRevisionNode.HEADER_COPYFROM + ": " + revNode.getCopyFromRevision() + " " + revNode.getCopyFromPath() + "\n"; revNodeFile.write(copyFromPath.getBytes("UTF-8"));
revNodeFile.write(cpath.getBytes("UTF-8")); if (revNode.getCopyFromPath() != null) { String copyFromPath = FSRevisionNode.HEADER_COPYFROM + ": " + revNode.getCopyFromRevision() + " " + revNode.getCopyFromPath() + "\n"; revNodeFile.write(copyFromPath.getBytes("UTF-8"));
String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = "";
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); }
String copyFromPath = copyFromNode.getCopyFromPath(); long copyFromRevision = copyFromNode.getCopyFromRevision(); String remainder = "";
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); }
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); }
public static FSRevisionNode dumpRevisionNode(FSRevisionNode revNode) { FSRevisionNode clone = new FSRevisionNode(); clone.setId(revNode.getId()); if (revNode.getPredecessorId() != null) { clone.setPredecessorId(revNode.getPredecessorId()); } clone.setType(revNode.getType()); clone.setCopyFromPath(revNode.getCopyFromPath()); clone.setCopyFromRevision(revNode.getCopyFromRevision()); clone.setCopyRootPath(revNode.getCopyRootPath()); clone.setCopyRootRevision(revNode.getCopyRootRevision()); clone.setCount(revNode.getCount()); clone.setCreatedPath(revNode.getCreatedPath()); if (revNode.getPropsRepresentation() != null) { clone.setPropsRepresentation(new FSRepresentation(revNode.getPropsRepresentation())); } if (revNode.getTextRepresentation() != null) { clone.setTextRepresentation(new FSRepresentation(revNode.getTextRepresentation())); } return clone; }
public static FSRevisionNode dumpRevisionNode(FSRevisionNode revNode) { FSRevisionNode clone = new FSRevisionNode(); clone.setId(revNode.getId()); if (revNode.getPredecessorId() != null) { clone.setPredecessorId(revNode.getPredecessorId()); } clone.setType(revNode.getType()); clone.setCopyFromPath(revNode.getCopyFromPath()); clone.setCopyFromRevision(revNode.getCopyFromRevision()); clone.setCopyRootPath(revNode.getCopyRootPath()); clone.setCopyRootRevision(revNode.getCopyRootRevision()); clone.setCount(revNode.getCount()); clone.setCreatedPath(revNode.getCreatedPath()); if (revNode.getPropsRepresentation() != null) { clone.setPropsRepresentation(new FSRepresentation(revNode.getPropsRepresentation())); } if (revNode.getTextRepresentation() != null) { clone.setTextRepresentation(new FSRepresentation(revNode.getTextRepresentation())); } clone.setMergeInfoCount(revNode.getMergeInfoCount()); clone.setHasMergeInfo(revNode.hasMergeInfo()); return clone; }
public static FSRevisionNode dumpRevisionNode(FSRevisionNode revNode) { FSRevisionNode clone = new FSRevisionNode(); clone.setId(revNode.getId()); if (revNode.getPredecessorId() != null) { clone.setPredecessorId(revNode.getPredecessorId()); } clone.setType(revNode.getType()); clone.setCopyFromPath(revNode.getCopyFromPath()); clone.setCopyFromRevision(revNode.getCopyFromRevision()); clone.setCopyRootPath(revNode.getCopyRootPath()); clone.setCopyRootRevision(revNode.getCopyRootRevision()); clone.setCount(revNode.getCount()); clone.setCreatedPath(revNode.getCreatedPath()); if (revNode.getPropsRepresentation() != null) { clone.setPropsRepresentation(new FSRepresentation(revNode.getPropsRepresentation())); } if (revNode.getTextRepresentation() != null) { clone.setTextRepresentation(new FSRepresentation(revNode.getTextRepresentation())); } clone.setMergeInfoCount(revNode.getMergeInfoCount()); clone.setHasMergeInfo(revNode.hasMergeInfo()); return clone; }
public static FSRevisionNode dumpRevisionNode(FSRevisionNode revNode) { FSRevisionNode clone = new FSRevisionNode(); clone.setId(revNode.getId()); if (revNode.getPredecessorId() != null) { clone.setPredecessorId(revNode.getPredecessorId()); } clone.setType(revNode.getType()); clone.setCopyFromPath(revNode.getCopyFromPath()); clone.setCopyFromRevision(revNode.getCopyFromRevision()); clone.setCopyRootPath(revNode.getCopyRootPath()); clone.setCopyRootRevision(revNode.getCopyRootRevision()); clone.setCount(revNode.getCount()); clone.setCreatedPath(revNode.getCreatedPath()); if (revNode.getPropsRepresentation() != null) { clone.setPropsRepresentation(new FSRepresentation(revNode.getPropsRepresentation())); } if (revNode.getTextRepresentation() != null) { clone.setTextRepresentation(new FSRepresentation(revNode.getTextRepresentation())); } clone.setMergeInfoCount(revNode.getMergeInfoCount()); clone.setHasMergeInfo(revNode.hasMergeInfo()); return clone; }