Package org.tmatesoft.svn.core.internal.io.fs

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


     *                          </ul>
     */
    public void doGetTree(File repositoryRoot, String path, SVNRevision revision, boolean includeIDs, ISVNTreeHandler handler) throws SVNException {
        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        FSRoot root = fsfs.createRevisionRoot(revNum);
        path = path == null ? "/" : path;
        FSRevisionNode node = root.getRevisionNode(path);
        FSID id = includeIDs ? node.getId() : null;
        SVNNodeKind kind = root.checkNodeKind(path);
        getTree(fsfs, root, path, kind, id, includeIDs, 0, handler);
    }
View Full Code Here


     *                          </ul>
     */
    public void doGetTree(File repositoryRoot, String path, String transactionName, boolean includeIDs, ISVNTreeHandler handler) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        FSRoot root = fsfs.createTransactionRoot(txn.getTxnId());
        path = path == null ? "/" : path;
        FSRevisionNode node = root.getRevisionNode(path);
        FSID id = includeIDs ? node.getId() : null;
        SVNNodeKind kind = root.checkNodeKind(path);
        getTree(fsfs, root, path, kind, id, includeIDs, 0, handler);
    }
View Full Code Here

     *                          <code>repositoryRoot</code>
     */
    public void doGetDiff(File repositoryRoot, SVNRevision revision, boolean diffDeleted, boolean diffAdded, boolean diffCopyFrom, OutputStream os) throws SVNException {
        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        FSRoot root = fsfs.createRevisionRoot(revNum);
        long baseRevision = revNum - 1;
        if (!SVNRevision.isValidRevisionNumber(baseRevision)) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "Invalid base revision {0,number,integer}", new Long(baseRevision));
            SVNErrorManager.error(err);
        }
View Full Code Here

     *                          </ul>
     */
    public void doGetDiff(File repositoryRoot, String transactionName, boolean diffDeleted, boolean diffAdded, boolean diffCopyFrom, OutputStream os) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        FSRoot root = fsfs.createTransactionRoot(txn.getTxnId());
        long baseRevision = txn.getBaseRevision();

        if (!SVNRevision.isValidRevisionNumber(baseRevision)) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "Transaction ''{0}'' is not based on a revision; how odd", transactionName);
            SVNErrorManager.error(err);
View Full Code Here

            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS, "Missing repository path argument");
            SVNErrorManager.error(err);
        }

        FSFS fsfs = txnName == null ? open(repositoryRoot, revision) : open(repositoryRoot, txnName);
        FSRoot root = null;
        if (txnName == null) {
            long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
            if (revProps) {
                return fsfs.getRevisionProperties(revNum);
            }
            root = fsfs.createRevisionRoot(revNum);
        } else {
            FSTransactionInfo txn = fsfs.openTxn(txnName);
            if (revProps) {
                return fsfs.getTransactionProperties(txn.getTxnId());
            }
            root = fsfs.createTransactionRoot(txn.getTxnId());
        }

        verifyPath(root, path);
        FSRevisionNode node = root.getRevisionNode(path);
        return node.getProperties(fsfs);
    }
View Full Code Here

            }
        }

        node.myAction = SVNChangeEntry.TYPE_DELETED;
        SVNLocationEntry baseLocation = findRealBaseLocation(node);
        FSRoot baseRoot = null;
        if (!SVNRevision.isValidRevisionNumber(baseLocation.getRevision())) {
            baseRoot = myBaseRoot;
        } else {
            baseRoot = myFSFS.createRevisionRoot(baseLocation.getRevision());
        }
       
        SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath());
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
            SVNErrorManager.error(err);
        }
       
View Full Code Here

            SVNErrorManager.error(err, SVNLogType.FSFS);
        }

        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        FSRoot root = fsfs.createRevisionRoot(revNum);
        catFile(root, path, out);
    }
View Full Code Here

            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
       
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        FSRoot root = fsfs.createTransactionRoot(txn);
        catFile(root, path, out);
    }
View Full Code Here

     *                          <code>repositoryRoot</code>
     */
    public void doGetChanged(File repositoryRoot, SVNRevision revision, ISVNChangeEntryHandler handler, boolean includeCopyInfo) throws SVNException {
        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        FSRoot root = fsfs.createRevisionRoot(revNum);
        long baseRevision = revNum - 1;
        SVNNodeEditor editor = generateDeltaTree(fsfs, root, baseRevision);
        editor.traverseTree(includeCopyInfo, handler);
    }
View Full Code Here

     *                          </ul>
     */
    public void doGetChanged(File repositoryRoot, String transactionName, ISVNChangeEntryHandler handler, boolean includeCopyInfo) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        FSRoot root = fsfs.createTransactionRoot(txn);
        long baseRevision = txn.getBaseRevision();

        if (!SVNRevision.isValidRevisionNumber(baseRevision)) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "Transaction ''{0}'' is not based on a revision; how odd", transactionName);
            SVNErrorManager.error(err, SVNLogType.FSFS);
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.io.fs.FSRoot

Copyright © 2018 www.massapicom. 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.