Examples of FSCommitter


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

            if (!locks.isEmpty()) {
                resource.setLockTokens(locks.values());
            }
        }
       
        FSCommitter committer = getCommitter(resource.getFSFS(), resource.getRoot(), resource.getTxnInfo(), resource.getLockTokens(),
                resource.getUserName());
        try {
            committer.deleteNode(uri.getPath());
        } catch (SVNException svne) {
            throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                    "Could not delete the resource", null);
        }
       
View Full Code Here

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

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

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

        return diffCompress;
    }
   
    protected FSCommitter getCommitter(FSFS fsfs, FSRoot root, FSTransactionInfo txn, Collection lockTokens, String userName) {
        if (myCommitter == null) {
            myCommitter = new FSCommitter(fsfs, (FSTransactionRoot) root, txn, lockTokens, userName);
        } else {
            myCommitter.reset(fsfs, (FSTransactionRoot) root, txn, lockTokens, userName);
        }
        return myCommitter;
    }
View Full Code Here

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

        } catch (SVNException svne) {
            throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                    "Could not open a (transaction) root in the repository", null);
        }
       
        FSCommitter committer = getCommitter(sourceResource.getFSFS(), txnRoot, txn,
                sourceResource.getLockTokens(), sourceResource.getUserName());
       
        StringBuffer buffer = new StringBuffer();
        SVNErrorMessage[] postCommitHookErr = new SVNErrorMessage[1];
        String postCommitErrMessage = null;
        long newRev = -1;
        try {
            newRev = committer.commitTxn(true, true, postCommitHookErr, buffer);
        } catch (SVNException svne) {
            if (postCommitHookErr[0] == null) {
                try {
                    FSCommitter.abortTransaction(fsfs, txnName);
                } catch (SVNException svne1) {
View Full Code Here

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

                    SVNRepository repos = myResource.getRepository();
                    repos.setRevisionPropertyValue(myResource.getRevision(), reposPropName, null);
                }
            } else {
                DAVResourceURI resourceURI = myResource.getResourceURI();
                FSCommitter committer = getCommitter();
                committer.changeNodeProperty(resourceURI.getPath(), reposPropName, null);
            }
        } catch (SVNException svne) {
            throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "could not remove a property", null);
        }
        myProperties = null;
View Full Code Here

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

                    repos.setRevisionPropertyValue(myResource.getRevision(), reposPropName, value);
                    //TODO: maybe add logging here
                }
            } else {
                DAVResourceURI resourceURI = myResource.getResourceURI();
                FSCommitter committer = getCommitter();
                committer.changeNodeProperty(resourceURI.getPath(), reposPropName, value);
            }
        } catch (SVNException svne) {
            throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null, null);
        }
       
View Full Code Here

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

            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not begin a transaction", null);
            }
           
            FSCommitter committer = new FSCommitter(fsfs, root, txnInfo, resource.getLockTokens(), resource.getUserName());
            try {
                committer.makeFile(path);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not create empty file.", null);
            }
           
            try {
                DAVServletUtil.attachAutoRevisionProperties(txnInfo, path, fsfs);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not create empty file.", null);
            }
           
            StringBuffer conflictPath = new StringBuffer();
            try {
                committer.commitTxn(true, true, null, conflictPath);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_CONFLICT, "Conflict when committing ''{0}''.",
                        new Object[] { conflictPath.toString() });
            }
        }
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.