myCurrentRevisionBaton.getCommitter().makeCopy(copyRoot, nodeBaton.myCopyFromPath, nodeBaton.myPath, true);
myCurrentRevisionBaton.getCommitter().makeCopy(copyRoot, nodeBaton.myCopyFromPath, nodeBaton.myPath, true);
myCurrentRevisionBaton.getCommitter().makeCopy(copyRoot, nodeBaton.myCopyFromPath, nodeBaton.myPath, true);
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(SVNRepository.INVALID_REVISION, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); boolean isCopied = false; if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, myTxnRoot.getTxnID())); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); isCopied = true; } else { myCommitter.makeDir(fullPath); } DirBaton dirBaton = new DirBaton(FSRepository.SVN_INVALID_REVNUM, fullPath, isCopied); myDirsStack.push(dirBaton); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err, SVNLogType.FSFS); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); if (copyFromPath != null && FSRepository.isInvalidRevision(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_GENERAL, "Got source path but no source revision for ''{0}''", fullPath); SVNErrorManager.error(err); } else if (copyFromPath != null) { SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind != SVNNodeKind.NONE && !parentBaton.isCopied()) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, myTxnRoot.getTxnID())); } copyFromPath = myRepository.getRepositoryPath(copyFromPath); FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(copyFromRevision); myCommitter.makeCopy(copyRoot, copyFromPath, fullPath, true); } else { myCommitter.makeFile(fullPath); } }
String dstPath = dstResource.getResourceURI().getPath(); try { committer.makeCopy((FSRevisionRoot) srcResource.getRoot(), srcPath, dstPath, true); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
protected void moveResource(DAVResource srcResource, DAVResource dstResource) throws DAVException { if (srcResource.getType() != DAVResourceType.REGULAR || dstResource.getType() != DAVResourceType.REGULAR || !getConfig().isAutoVersioning()) { throw new DAVException("MOVE only allowed on two public URIs, and autoversioning must be active.", HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0); } checkOut(dstResource, true, false, false, null); FSCommitter committer = getCommitter(dstResource.getFSFS(), dstResource.getRoot(), dstResource.getTxnInfo(), dstResource.getLockTokens(), dstResource.getUserName()); String srcPath = srcResource.getResourceURI().getPath(); String dstPath = dstResource.getResourceURI().getPath(); try { committer.makeCopy((FSRevisionRoot) srcResource.getRoot(), srcPath, dstPath, true); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unable to make a filesystem copy.", null); } try { committer.deleteNode(srcPath); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not delete the src resource.", null); } checkIn(dstResource, false, false); }