myCurrentRevisionBaton.getCommitter().makeFile(nodeBaton.myPath); } else if (nodeBaton.myKind == SVNNodeKind.DIR) { myCurrentRevisionBaton.getCommitter().makeDir(nodeBaton.myPath);
myCurrentRevisionBaton.getCommitter().makeFile(nodeBaton.myPath); } else if (nodeBaton.myKind == SVNNodeKind.DIR) { myCurrentRevisionBaton.getCommitter().makeDir(nodeBaton.myPath);
myCurrentRevisionBaton.getCommitter().makeFile(nodeBaton.myPath); } else if (nodeBaton.myKind == SVNNodeKind.DIR) { myCurrentRevisionBaton.getCommitter().makeDir(nodeBaton.myPath);
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 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); }
protected void createdCollection(DAVResource resource) throws DAVException { if (resource.getType() != DAVResourceType.WORKING && resource.getType() != DAVResourceType.REGULAR) { throw new DAVException("Collections can only be created within a working or regular collection [at this time].", HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0); } if (resource.getType() == DAVResourceType.REGULAR && !getConfig().isAutoVersioning()) { throw new DAVException("MKCOL called on regular resource, but autoversioning is not active.", HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0); } if (resource.getType() == DAVResourceType.REGULAR) { checkOut(resource, true, false, false, null); } FSCommitter committer = getCommitter(resource.getFSFS(), resource.getRoot(), resource.getTxnInfo(), resource.getLockTokens(), resource.getUserName()); try { committer.makeDir(resource.getResourceURI().getPath()); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not create the collection.", null); } if (resource.isAutoCheckedOut()) { checkIn(resource, false, false); } }