public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { boolean isCopy = copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision); boolean isDeleted = myCurrentDirInfo.myDeletedEntries.containsKey(path); dumpNode(path, SVNNodeKind.FILE, isDeleted ? SVNAdminHelper.NODE_ACTION_REPLACE : SVNAdminHelper.NODE_ACTION_ADD, isCopy, isCopy ? copyFromPath : null, isCopy ? copyFromRevision : -1); if (isDeleted) { myCurrentDirInfo.myDeletedEntries.remove(path); } }
private Map<File, String> getOperativeImmediateChildren(File mergeSourceFsPath, long oldestRevision, long youngestRevision, File mergeTargetAbsPath, SVNDepth depth, SVNRepository repository) throws SVNException { assert SVNRevision.isValidRevisionNumber(oldestRevision); assert SVNRevision.isValidRevisionNumber(youngestRevision); assert oldestRevision <= youngestRevision; Map<File, String> operativeChildren = new HashMap<File, String>(); if (depth == SVNDepth.INFINITY) { return operativeChildren; } FindOperativeSubtreeRevisions findOperativeSubtreeRevisions = new FindOperativeSubtreeRevisions(operativeChildren, context, mergeSourceFsPath, mergeTargetAbsPath, depth); repository.log(new String[]{""}, youngestRevision, oldestRevision, true, false, 0, false, null, findOperativeSubtreeRevisions); return operativeChildren; }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; myCurrentDirInfo = createDirectoryInfo(path, copyFromPath, copyFromRevision, parent); boolean isDeleted = parent.myDeletedEntries.containsKey(path); boolean isCopy = copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision); dumpNode(path, SVNNodeKind.DIR, isDeleted ? SVNAdminHelper.NODE_ACTION_REPLACE : SVNAdminHelper.NODE_ACTION_ADD, isCopy, isCopy ? copyFromPath : null, isCopy ? copyFromRevision : -1); if (isDeleted) { parent.myDeletedEntries.remove(path); } myCurrentDirInfo.myIsWrittenOut = true; }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; myCurrentDirInfo = createDirectoryInfo(path, copyFromPath, copyFromRevision, parent); boolean isDeleted = parent.myDeletedEntries.containsKey(path); boolean isCopy = copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision); dumpNode(path, SVNNodeKind.DIR, isDeleted ? SVNAdminHelper.NODE_ACTION_REPLACE : SVNAdminHelper.NODE_ACTION_ADD, isCopy, isCopy ? copyFromPath : null, isCopy ? copyFromRevision : -1); if (isDeleted) { parent.myDeletedEntries.remove(path); } myCurrentDirInfo.myIsWrittenOut = true; }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; myCurrentDirInfo = createDirectoryInfo(path, copyFromPath, copyFromRevision, parent); boolean isDeleted = parent.myDeletedEntries.containsKey(path); boolean isCopy = copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision); dumpNode(path, SVNNodeKind.DIR, isDeleted ? SVNAdminHelper.NODE_ACTION_REPLACE : SVNAdminHelper.NODE_ACTION_ADD, isCopy, isCopy ? copyFromPath : null, isCopy ? copyFromRevision : -1); if (isDeleted) { parent.myDeletedEntries.remove(path); } myCurrentDirInfo.myIsWrittenOut = true; }
public SVNFSFSPackedRevProps build() throws SVNException { if (!SVNRevision.isValidRevisionNumber(firstRevision)) { SVNErrorMessage errorMessage = SVNErrorMessage.create(SVNErrorCode.INCORRECT_PARAMS, "First revision is not set"); SVNErrorManager.error(errorMessage, SVNLogType.FSFS); } return new SVNFSFSPackedRevProps(firstRevision, entries, null); }
public void bindRevision(int i, long revision) { adjustBinds(i); if (SVNRevision.isValidRevisionNumber(revision)) { bindLong(i, revision); } else { bindNull(i); } }
public void openDir(String path, long revision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; String cmpPath = null; long cmpRev = -1; if (parent != null && parent.myComparePath != null && SVNRevision.isValidRevisionNumber(parent.myCompareRevision)) { cmpPath = SVNPathUtil.append(parent.myComparePath, SVNPathUtil.tail(path)); cmpRev = parent.myCompareRevision; } myCurrentDirInfo = createDirectoryInfo(path, cmpPath, cmpRev, parent); }
public void openFile(String path, long revision) throws SVNException { String cmpPath = null; long cmpRev = -1; if (myCurrentDirInfo != null && myCurrentDirInfo.myComparePath != null && SVNRevision.isValidRevisionNumber(myCurrentDirInfo.myCompareRevision)) { cmpPath = SVNPathUtil.append(myCurrentDirInfo.myComparePath, SVNPathUtil.tail(path)); cmpRev = myCurrentDirInfo.myCompareRevision; } dumpNode(path, SVNNodeKind.FILE, SVNAdminHelper.NODE_ACTION_CHANGE, false, cmpPath, cmpRev); }
public void openDir(String path, long revision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; String cmpPath = null; long cmpRev = -1; if (parent != null && parent.myComparePath != null && SVNRevision.isValidRevisionNumber(parent.myCompareRevision)) { cmpPath = SVNPathUtil.append(parent.myComparePath, SVNPathUtil.tail(path)); cmpRev = parent.myCompareRevision; } myCurrentDirInfo = createDirectoryInfo(path, cmpPath, cmpRev, parent); }
public void openDir(String path, long revision) throws SVNException { DirectoryInfo parent = myCurrentDirInfo; String cmpPath = null; long cmpRev = -1; if (parent != null && parent.myComparePath != null && SVNRevision.isValidRevisionNumber(parent.myCompareRevision)) { cmpPath = SVNPathUtil.append(parent.myComparePath, SVNPathUtil.tail(path)); cmpRev = parent.myCompareRevision; } myCurrentDirInfo = createDirectoryInfo(path, cmpPath, cmpRev, parent); }
public void openFile(String path, long revision) throws SVNException { String cmpPath = null; long cmpRev = -1; if (myCurrentDirInfo != null && myCurrentDirInfo.myComparePath != null && SVNRevision.isValidRevisionNumber(myCurrentDirInfo.myCompareRevision)) { cmpPath = SVNPathUtil.append(myCurrentDirInfo.myComparePath, SVNPathUtil.tail(path)); cmpRev = myCurrentDirInfo.myCompareRevision; } dumpNode(path, SVNNodeKind.FILE, SVNAdminHelper.NODE_ACTION_CHANGE, false, cmpPath, cmpRev); }
public void openFile(String path, long revision) throws SVNException { String cmpPath = null; long cmpRev = -1; if (myCurrentDirInfo != null && myCurrentDirInfo.myComparePath != null && SVNRevision.isValidRevisionNumber(myCurrentDirInfo.myCompareRevision)) { cmpPath = SVNPathUtil.append(myCurrentDirInfo.myComparePath, SVNPathUtil.tail(path)); cmpRev = myCurrentDirInfo.myCompareRevision; } dumpNode(path, SVNNodeKind.FILE, SVNAdminHelper.NODE_ACTION_CHANGE, false, cmpPath, cmpRev); }
private void printInfoItemRevision(SVNRevision revision, String targetPath) { if (SVNRevision.isValidRevisionNumber(revision.getNumber())) { if (targetPath != null) { getSVNEnvironment().getOut().printf("%s %s", revision.getNumber(), targetPath); } else { getSVNEnvironment().getOut().printf("%s", revision.getNumber()); } } else if (targetPath != null) { getSVNEnvironment().getOut().printf("%s %s", "", targetPath); } }
private void printInfoItemRevision(SVNRevision revision, String targetPath) { if (SVNRevision.isValidRevisionNumber(revision.getNumber())) { if (targetPath != null) { getSVNEnvironment().getOut().printf("%s %s", revision.getNumber(), targetPath); } else { getSVNEnvironment().getOut().printf("%s", revision.getNumber()); } } else if (targetPath != null) { getSVNEnvironment().getOut().printf("%s %s", "", targetPath); } }
public static String asString(SVNRevision revision, String path) throws SVNException { if (revision == SVNRevision.HEAD || SVNRevision.isValidRevisionNumber(revision.getNumber())) { return revision.toString(); } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCORRECT_PARAMS, "Illegal file external revision kind {0} for path ''{1}''", new Object[] { revision.toString(), path }); SVNErrorManager.error(err, SVNLogType.WC); return null; }
protected SVNRevision getRevisionObject() { if (!SVNRevision.isValidRevisionNumber(getSVNLookEnvironment().getRevision())) { return SVNRevision.HEAD; } return SVNRevision.create(getSVNLookEnvironment().getRevision()); } }
private String asString(SVNRevision revision, String path) throws SVNException { if (revision == SVNRevision.HEAD || SVNRevision.isValidRevisionNumber(revision.getNumber())) { return revision.toString(); } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCORRECT_PARAMS, "Illegal file external revision kind {0} for path ''{1}''", new Object[] { revision.toString(), path }); SVNErrorManager.error(err, SVNLogType.WC); return null; }
private SVNLocationEntry findRealBaseLocation(Node node) throws SVNException { if (node.myAction == SVNChangeEntry.TYPE_ADDED && node.myCopyFromPath != null && SVNRevision.isValidRevisionNumber(node.myCopyFromRevision)) { return new SVNLocationEntry(node.myCopyFromRevision, node.myCopyFromPath); } if (node.myParent != null) { SVNLocationEntry location = findRealBaseLocation(node.myParent); return new SVNLocationEntry(location.getRevision(), SVNPathUtil.getAbsolutePath(SVNPathUtil.append(location.getPath(), node.myName))); } return new SVNLocationEntry(-1, "/"); }
private SVNLocationEntry findRealBaseLocation(Node node) throws SVNException { if (node.myAction == SVNChangeEntry.TYPE_ADDED && node.myCopyFromPath != null && SVNRevision.isValidRevisionNumber(node.myCopyFromRevision)) { return new SVNLocationEntry(node.myCopyFromRevision, node.myCopyFromPath); } if (node.myParent != null) { SVNLocationEntry location = findRealBaseLocation(node.myParent); return new SVNLocationEntry(location.getRevision(), SVNPathUtil.getAbsolutePath(SVNPathUtil.append(location.getPath(), node.myName))); } return new SVNLocationEntry(-1, "/"); }