Examples of FSCommitter


Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            return myDeltaConsumer;
        }
       
        public FSCommitter getCommitter() {
            if (myCommitter == null) {
                myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, null, null);
            }
            return myCommitter;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            return myDeltaConsumer;
        }
       
        public FSCommitter getCommitter() {
            if (myCommitter == null) {
                myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, null, null);
            }
            return myCommitter;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            return myDeltaConsumer;
        }
       
        public FSCommitter getCommitter() {
            if (myCommitter == null) {
                myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, null, null);
            }
            return myCommitter;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            return myDeltaConsumer;
        }
       
        public FSCommitter getCommitter() {
            if (myCommitter == null) {
                myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, null, null);
            }
            return myCommitter;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            return myDeltaConsumer;
        }
       
        public FSCommitter getCommitter() {
            if (myCommitter == null) {
                myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, null, null);
            }
            return myCommitter;
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            FSRoot root = resource.getRoot();
            FSFS fsfs = resource.getFSFS();
            FSTransactionInfo txn = resource.getTxnInfo();
            Collection lockTokens = resource.getLockTokens();
            String userName = resource.getUserName();
            FSCommitter committer = getCommitter(fsfs, root, txn, lockTokens, userName);
            ISVNDeltaConsumer deltaConsumer = getDeltaConsumer(root, committer, fsfs, userName, lockTokens);
            SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
            InputStream inputStream = null;
            try {
                inputStream = getRequestInputStream();
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

       
        String path = resource.getResourceURI().getPath();
        FSRoot root = resource.getRoot();
        FSFS fsfs = resource.getFSFS();
        FSTransactionInfo txn = resource.getTxnInfo();
        FSCommitter committer = getCommitter(fsfs, root, txn, resource.getLockTokens(), resource.getUserName());

        SVNNodeKind kind = DAVServletUtil.checkPath(resource.getRoot(), resource.getResourceURI().getPath());
        if (kind == SVNNodeKind.NONE) {
            try {
                committer.makeFile(path);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not create file within the repository.", null);
            }
        }
       
        if (resource.isAutoCheckedOut() && myRequest.getContentType() != null) {
            SVNProperties props = null;
            try {
                props = fsfs.getProperties(root.getRevisionNode(path));
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Error fetching mime-type property.", null);
            }
           
            String mimeType = props.getStringValue(SVNProperty.MIME_TYPE);
            if (mimeType == null) {
                try {
                    committer.changeNodeProperty(path, SVNProperty.MIME_TYPE, SVNPropertyValue.create(myRequest.getContentType()));
                } catch (SVNException svne) {
                    throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                            "Could not set mime-type property.", null);
                }
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            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);
        }
       
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

        if (!srcFSFS.getDBRoot().equals(dstFSFS.getDBRoot())) {
            throw new DAVException("Copy source and destination are in different repositories.", null, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                    null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, 0, 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);
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.io.fs.FSCommitter

            if (resource.getTxnInfo() == null) {
                throw new DAVException("Autoversioning txn isn't open when it should be.", HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 0);
            }
           
            DAVServletUtil.setAutoRevisionProperties(resource);
            FSCommitter committer = getCommitter(resource.getFSFS(), resource.getRoot(), resource.getTxnInfo(), resource.getLockTokens(),
                    resource.getUserName());
           
            StringBuffer conflictPath = new StringBuffer();
            long newRev = SVNRepository.INVALID_REVISION;
            try {
                newRev = committer.commitTxn(true, true, null, conflictPath);
            } catch (SVNException svne) {
                try {
                    FSCommitter.abortTransaction(resource.getFSFS(), resource.getTxnInfo().getTxnId());
                } catch (SVNException svne2) {
                    //ignore
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.