private void verifyLocks() throws SVNException { Map changes = myTxnRoot.getChangedPaths(); Object[] changedPaths = changes.keySet().toArray(); Arrays.sort(changedPaths); String lastRecursedPath = null; for (int i = 0; i < changedPaths.length; i++) { String changedPath = (String) changedPaths[i]; boolean recurse = true; if (lastRecursedPath != null && SVNPathUtil.getPathAsChild(lastRecursedPath, changedPath) != null) { continue; } FSPathChange change = (FSPathChange) changes.get(changedPath); if (change.getChangeKind() == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) { recurse = false; } allowLockedOperation(myFSFS, changedPath, myAuthor, myLockTokens, recurse, true); if (recurse) { lastRecursedPath = changedPath; } } }
private void verifyLocks() throws SVNException { Map changes = myTxnRoot.getChangedPaths(); Object[] changedPaths = changes.keySet().toArray(); Arrays.sort(changedPaths); String lastRecursedPath = null; for (int i = 0; i < changedPaths.length; i++) { String changedPath = (String) changedPaths[i]; boolean recurse = true; if (lastRecursedPath != null && SVNPathUtil.getPathAsChild(lastRecursedPath, changedPath) != null) { continue; } FSPathChange change = (FSPathChange) changes.get(changedPath); if (change.getChangeKind() == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) { recurse = false; } allowLockedOperation(myFSFS, changedPath, myAuthor, myLockTokens, recurse, true); if (recurse) { lastRecursedPath = changedPath; } } }
private void verifyLocks() throws SVNException { Map changes = myTxnRoot.getChangedPaths(); Object[] changedPaths = changes.keySet().toArray(); Arrays.sort(changedPaths); String lastRecursedPath = null; for (int i = 0; i < changedPaths.length; i++) { String changedPath = (String) changedPaths[i]; boolean recurse = true; if (lastRecursedPath != null && SVNPathUtil.pathIsChild(lastRecursedPath, changedPath) != null) { continue; } FSPathChange change = (FSPathChange) changes.get(changedPath); if (change.getChangeKind() == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) { recurse = false; } allowLockedOperation(myFSFS, changedPath, myAuthor, myLockTokens, recurse, true); if (recurse) { lastRecursedPath = changedPath; } } }
private void verifyLocks() throws SVNException { FSTransactionRoot txnRoot = getTxnRoot(); Map changes = txnRoot.getChangedPaths(); Object[] changedPaths = changes.keySet().toArray(); Arrays.sort(changedPaths); String lastRecursedPath = null; for (int i = 0; i < changedPaths.length; i++) { String changedPath = (String) changedPaths[i]; boolean recurse = true; if (lastRecursedPath != null && SVNPathUtil.getPathAsChild(lastRecursedPath, changedPath) != null) { continue; } FSPathChange change = (FSPathChange) changes.get(changedPath); if (change.getChangeKind() == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) { recurse = false; } allowLockedOperation(myFSFS, changedPath, myAuthor, myLockTokens, recurse, true); if (recurse) { lastRecursedPath = changedPath; } } }
public long writeFinalChangedPathInfo(final CountingStream protoFile) throws SVNException, IOException { long offset = protoFile.getPosition(); Map changedPaths = getChangedPaths(); for (Iterator paths = changedPaths.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); FSPathChange change = (FSPathChange) changedPaths.get(path); FSID id = change.getRevNodeId(); if (change.getChangeKind() != FSPathChangeKind.FS_PATH_CHANGE_DELETE && !id.isTxn()) { FSRevisionNode revNode = getOwner().getRevisionNode(id); change.setRevNodeId(revNode.getId()); } writeChangeEntry(protoFile, change); } return offset; }
public long writeFinalChangedPathInfo(final CountingOutputStream protoFile) throws SVNException, IOException { long offset = protoFile.getPosition(); Map changedPaths = getChangedPaths(); boolean includeNodeKind = getOwner().getDBFormat() >= FSFS.MIN_KIND_IN_CHANGED_FORMAT; for (Iterator paths = changedPaths.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); FSPathChange change = (FSPathChange) changedPaths.get(path); FSID id = change.getRevNodeId(); if (change.getChangeKind() != FSPathChangeKind.FS_PATH_CHANGE_DELETE && !id.isTxn()) { FSRevisionNode revNode = getOwner().getRevisionNode(id); change.setRevNodeId(revNode.getId()); } writeChangeEntry(protoFile, change, includeNodeKind); } return offset; }
public long writeFinalChangedPathInfo(final CountingOutputStream protoFile) throws SVNException, IOException { long offset = protoFile.getPosition(); Map changedPaths = getChangedPaths(); boolean includeNodeKind = getOwner().getDBFormat() >= FSFS.MIN_KIND_IN_CHANGED_FORMAT; for (Iterator paths = changedPaths.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); FSPathChange change = (FSPathChange) changedPaths.get(path); FSID id = change.getRevNodeId(); if (change.getChangeKind() != FSPathChangeKind.FS_PATH_CHANGE_DELETE && !id.isTxn()) { FSRevisionNode revNode = getOwner().getRevisionNode(id); change.setRevNodeId(revNode.getId()); } writeChangeEntry(protoFile, change, includeNodeKind); } return offset; }
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 long writeFinalChangedPathInfo(final CountingOutputStream protoFile) throws SVNException, IOException { long offset = protoFile.getPosition(); Map changedPaths = getChangedPaths(); boolean includeNodeKind = getOwner().getDBFormat() >= FSFS.MIN_KIND_IN_CHANGED_FORMAT; if (getOwner().isUseLogAddressing()) { protoFile.resetChecksum(); } writeChanges(protoFile, changedPaths, includeNodeKind, true); if (getOwner().isUseLogAddressing()) { long size = protoFile.getPosition() - offset; FSP2LProtoIndex.ItemType itemType = FSP2LProtoIndex.ItemType.CHANGES; long revision = SVNRepository.INVALID_REVISION; long number = FSID.ITEM_INDEX_CHANGES; int checksum = protoFile.finalizeChecksum(); FSP2LEntry entry = new FSP2LEntry(offset, size, itemType, checksum, revision, number); storeP2LIndexEntry(entry); storeL2PIndexEntry(entry.getOffset(), FSID.ITEM_INDEX_CHANGES); } return offset; }