public void deleteEntry(String path, long revision) throws SVNException { String fullPath = SVNPathUtil.concatToAbs(myBasePath, path); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { return; } FSRevisionNode existingNode = myTxnRoot.getRevisionNode(fullPath); long createdRev = existingNode.getId().getRevision(); if (FSRepository.isValidRevision(revision) && revision < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, myTxnRoot.getTxnID())); } myCommitter.deleteNode(fullPath); }
public void deleteEntry(String path, long revision) throws SVNException { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } FSRevisionNode existingNode = myTxnRoot.getRevisionNode(fullPath); long createdRev = existingNode.getCreatedRevision(); if (FSRepository.isValidRevision(revision) && revision < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } myCommitter.deleteNode(fullPath); }
public void deleteEntry(String path, long revision) throws SVNException { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } FSRevisionNode existingNode = myTxnRoot.getRevisionNode(fullPath); long createdRev = existingNode.getCreatedRevision(); if (FSRepository.isValidRevision(revision) && revision < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } myCommitter.deleteNode(fullPath); }
public void deleteEntry(String path, long revision) throws SVNException { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); SVNNodeKind kind = myTxnRoot.checkNodeKind(fullPath); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } FSRevisionNode existingNode = myTxnRoot.getRevisionNode(fullPath); long createdRev = existingNode.getCreatedRevision(); if (FSRepository.isValidRevision(revision) && revision < createdRev) { SVNErrorManager.error(FSErrors.errorOutOfDate(fullPath, kind), SVNLogType.FSFS); } myCommitter.deleteNode(fullPath); }
myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); break; case SVNAdminHelper.NODE_ACTION_ADD: case SVNAdminHelper.NODE_ACTION_REPLACE: message = " * replacing path : " + myCurrentNodeBaton.myPath + " ..."; myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); if (maybeAddWithHistory(myCurrentNodeBaton)) { message += "COPIED...";
myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); break; case SVNAdminHelper.NODE_ACTION_ADD: case SVNAdminHelper.NODE_ACTION_REPLACE: message = " * replacing path : " + myCurrentNodeBaton.myPath + " ..."; myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); if (maybeAddWithHistory(myCurrentNodeBaton)) { message += "COPIED...";
myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); break; case SVNAdminHelper.NODE_ACTION_ADD: case SVNAdminHelper.NODE_ACTION_REPLACE: message = " * replacing path : " + myCurrentNodeBaton.myPath + " ..."; myCurrentRevisionBaton.getCommitter().deleteNode(myCurrentNodeBaton.myPath); if (maybeAddWithHistory(myCurrentNodeBaton)) { message += "COPIED...";
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); }
resource.getUserName()); try { committer.deleteNode(uri.getPath()); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,