Examples of FSFS


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

     * @param  os               an output stream to write differences to
     * @throws SVNException     no repository is found at
     *                          <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);
        try {
            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}", new Long(baseRevision));
                SVNErrorManager.error(err, SVNLogType.FSFS);
            }
View Full Code Here

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

     *                          <li>if the specified transaction is not found
     *                          </li>
     *                          </ul>
     */
    public void doGetDiff(File repositoryRoot, String transactionName, boolean diffDeleted, boolean diffAdded, boolean diffCopyFrom, OutputStream os) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        try {
            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

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

        if (path == null && !revProps) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS, "Missing repository path argument");
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }

        FSFS fsfs = txnName == null ? open(repositoryRoot, revision) : open(repositoryRoot, txnName);
        try {
            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);
            }
   
            verifyPath(root, path);
            FSRevisionNode node = root.getRevisionNode(path);
            return node.getProperties(fsfs);
View Full Code Here

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

     * @param  repositoryRoot  root of the repository to pack
     * @throws SVNException
     * @since  1.3, SVN 1.6
     */
    public void doPack(File repositoryRoot) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            FSPacker packer = new FSPacker(myEventHandler);
            packer.pack(fsfs);
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
View Full Code Here

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

     * @param  repositoryRoot   repository root location
     * @throws SVNException
     * @since                   1.2.0, SVN 1.5.0 
     */
    public void doListLocks(File repositoryRoot) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            File digestFile = fsfs.getDigestFileFromRepositoryPath("/");
            ISVNLockHandler handler = new ISVNLockHandler() {
                public void handleLock(String path, SVNLock lock, SVNErrorMessage error) throws SVNException {
                    checkCancelled();
                    if (myEventHandler != null) {
                        SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.LOCK_LISTED, lock, error, null);
                        myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
                    }
                   
                }
                public void handleUnlock(String path, SVNLock lock, SVNErrorMessage error) throws SVNException {
                }
            };
            fsfs.walkDigestFiles(digestFile, handler, false);
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
        }
    }
View Full Code Here

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

    public void doRemoveLocks(File repositoryRoot, String[] paths) throws SVNException {
        if (paths == null) {
            return;
        }
       
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            for (int i = 0; i < paths.length; i++) {
                String path = paths[i];
                if (path == null) {
                    continue;
                }
                checkCancelled();
               
                SVNLock lock = null;
                try {
                    lock = fsfs.getLockHelper(path, false);
                    if (lock == null) {
                        if (myEventHandler != null) {
                            SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.NOT_LOCKED, null, null, "Path '" + path + "' isn't locked.");
                            myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
                        }
                        continue;
                    }
                   
                    fsfs.unlockPath(path, lock.getID(), null, true, false);
                    if (myEventHandler != null) {
                        SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.UNLOCKED, lock, null, "Removed lock on '" + path + "'.");
                        myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
                    }
                } catch (SVNException svne) {
View Full Code Here

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

     * @param  repositoryRoot   a repository root directory path
     * @throws SVNException
     * @since                   1.1.1
     */
    public void doListTransactions(File repositoryRoot) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            Map txns = fsfs.listTransactions();
   
            for(Iterator names = txns.keySet().iterator(); names.hasNext();) {
                String txnName = (String) names.next();
                File txnDir = (File) txns.get(txnName);
                if (myEventHandler != null) {
View Full Code Here

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

    public void doRemoveTransactions(File repositoryRoot, String[] transactions) throws SVNException {
        if (transactions == null) {
            return;
        }

        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            for (int i = 0; i < transactions.length; i++) {
                String txnName = transactions[i];
                fsfs.openTxn(txnName);
                fsfs.purgeTxn(txnName);
                SVNDebugLog.getDefaultLog().logFine(SVNLogType.FSFS, "Transaction '" + txnName + "' removed.\n");
                if (myEventHandler != null) {
                    SVNAdminEvent event = new SVNAdminEvent(txnName, fsfs.getTransactionDir(txnName), SVNAdminEventAction.TRANSACTION_REMOVED);
                    myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
                }
            }
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
View Full Code Here

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

     * @param  endRevision      revision to stop verification at
     * @throws SVNException     verification failed - a repository may be corrupted
     * @since                   1.2.0, SVN 1.5.0
     */
    public void doVerify(File repositoryRoot, SVNRevision startRevision, SVNRevision endRevision) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            long youngestRevision = fsfs.getYoungestRevision();
           
            long lowerRev = SVNAdminHelper.getRevisionNumber(startRevision, youngestRevision, fsfs);
            long upperRev = SVNAdminHelper.getRevisionNumber(endRevision, youngestRevision, fsfs);

            if (!SVNRevision.isValidRevisionNumber(upperRev)) {
View Full Code Here

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

     *                          deltas will be written instead of fulltexts
     * @throws SVNException
     * @since                   1.1.1
     */
    public void doDump(File repositoryRoot, OutputStream dumpStream, SVNRevision startRevision, SVNRevision endRevision, boolean isIncremental, boolean useDeltas) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            long youngestRevision = fsfs.getYoungestRevision();
           
            long lowerR = SVNAdminHelper.getRevisionNumber(startRevision, youngestRevision, fsfs);
            long upperR = SVNAdminHelper.getRevisionNumber(endRevision, youngestRevision, fsfs);
           
            if (!SVNRevision.isValidRevisionNumber(lowerR)) {
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.