Examples of FSFS


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

     * @since                       1.1.1
     */
    public void doLoad(File repositoryRoot, InputStream dumpStream, boolean usePreCommitHook,
            boolean usePostCommitHook, SVNUUIDAction uuidAction, String parentDir) throws SVNException {
        CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder();
        FSFS fsfs = null;
        try {
            fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
            ISVNLoadHandler handler = createLoadHandler(fsfs, usePreCommitHook, usePostCommitHook,
                    uuidAction, parentDir);
            SVNDumpStreamParser parser = getDumpStreamParser();
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 doRecover(File repositoryRoot) throws SVNException {
        FSFS fsfs = null;
        try {
            fsfs = SVNAdminHelper.openRepositoryForRecovery(repositoryRoot);
           
            if (myEventHandler != null) {
                SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.RECOVERY_STARTED);
                myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
            }
            FSRecoverer recoverer = new FSRecoverer(fsfs, this);
            recoverer.runRecovery();
        } finally {
            if (fsfs != null) {
                fsfs.close();
            }
        }
    }
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 doUpgrade(File repositoryRoot)throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            if (myEventHandler != null) {
                SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.UPGRADE);
                myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
            }
           
            File reposFormatFile = fsfs.getRepositoryFormatFile();
            int format = fsfs.getReposFormat();
            SVNFileUtil.writeVersionFile(reposFormatFile, format);
            fsfs.upgrade();
            SVNFileUtil.writeVersionFile(reposFormatFile, FSFS.REPOSITORY_FORMAT);
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
        }
    }
View Full Code Here

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

     * @throws SVNException     exception with {@link SVNErrorCode#BAD_UUID} error code - if the <code>uuid</code>
     *                          is malformed
     * @since                   1.2.0, SVN 1.5.0
     */
    public void doSetUUID(File repositoryRoot, String uuid) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            if (uuid == null) {
                uuid = SVNUUIDGenerator.generateUUIDString();
            } else {
                String[] components = uuid.split("-");
                if (components.length != 5) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_UUID, "Malformed UUID ''{0}''",
                            uuid);
                    SVNErrorManager.error(err, SVNLogType.FSFS);
                }
            }
            fsfs.setUUID(uuid);
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
        }
    }
View Full Code Here

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

     * @param  newRepositoryRoot   repository to copy data to
     * @throws SVNException
     * @since                       1.2.0, SVN 1.5.0
     */
    public void doHotCopy(File srcRepositoryRoot, File newRepositoryRoot) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(srcRepositoryRoot, false);
        try {
            FSHotCopier copier = getHotCopier();
            copier.runHotCopy(fsfs, newRepositoryRoot);
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
View Full Code Here

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

     * @return                 the last revision
     * @throws SVNException
     * @since                  1.2.0
     */
    public long getYoungestRevision(File repositoryRoot) throws SVNException {
        FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
        try {
            return fsfs.getYoungestRevision();
        } finally {
            SVNAdminHelper.closeRepository(fsfs);
        }
    }
View Full Code Here

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

     * @return                  a log message
     * @throws SVNException     no repository is found at
     *                          <code>repositoryRoot</code>
     */
    public String doGetLog(File repositoryRoot, SVNRevision revision) throws SVNException {
        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        SVNProperties revProps = fsfs.getRevisionProperties(revNum);
        return revProps.getStringValue(SVNRevisionProperty.LOG);
    }
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 String doGetLog(File repositoryRoot, String transactionName) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        SVNProperties txnProps = fsfs.getTransactionProperties(txn.getTxnId());
        return txnProps.getStringValue(SVNRevisionProperty.LOG);
    }
View Full Code Here

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

     *                          information is also provided for copied paths
     * @throws SVNException     no repository is found at
     *                          <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

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

     *                          <li>if the specified transaction is not found
     *                          </li>
     *                          </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
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.