Class SVNRepos

  • All Implemented Interfaces:
    ISVNRepos

    public class SVNRepos
    extends java.lang.Object
    implements ISVNRepos
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      SVNRepos()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancelOperation()
      cancel the active operation
      void create​(java.io.File path, boolean disableFsyncCommit, boolean keepLog, java.io.File configPath, java.lang.String fstype)
      create a subversion repository.
      void deltify​(java.io.File path, Revision start, Revision end)
      deltify the revisions in the repository
      void dispose()
      release the native peer (should not depend on finalize)
      void dump​(java.io.File path, java.io.OutputStream dataOut, Revision start, Revision end, boolean incremental, boolean useDeltas, ReposNotifyCallback callback)
      dump the data in a repository
      void freeze​(ReposFreezeAction action, java.io.File... paths)
      Take an exclusive lock on each of the listed repositories to prevent commits; then, while holding all the locks, call the action.invoke().
      Version getVersion()  
      void hotcopy​(java.io.File path, java.io.File targetPath, boolean cleanLogs)  
      void hotcopy​(java.io.File path, java.io.File targetPath, boolean cleanLogs, boolean incremental)
      make a hot copy of the repository
      void listDBLogs​(java.io.File path, ISVNRepos.MessageReceiver receiver)
      list all logfiles (BDB) in use or not)
      void listUnusedDBLogs​(java.io.File path, ISVNRepos.MessageReceiver receiver)
      list unused logfiles
      void load​(java.io.File path, java.io.InputStream dataInput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, java.lang.String relativePath, ReposNotifyCallback callback)
      load the data of a dump into a repository
      void load​(java.io.File path, java.io.InputStream dataInput, Revision start, Revision end, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, java.lang.String relativePath, ReposNotifyCallback callback)
      load the data of a dump into a repository
      java.util.Set<Lock> lslocks​(java.io.File path, Depth depth)
      list all locks in the repository
      void lstxns​(java.io.File path, ISVNRepos.MessageReceiver receiver)
      list all open transactions in a repository
      void pack​(java.io.File path, ReposNotifyCallback callback)
      pack the repository
      long recover​(java.io.File path, ReposNotifyCallback callback)
      recover the filesystem backend of a repository
      void rmlocks​(java.io.File path, java.lang.String[] locks)
      remove multiple locks from the repository
      void rmtxns​(java.io.File path, java.lang.String[] transactions)
      remove open transaction in a repository
      void setRevProp​(java.io.File path, Revision rev, java.lang.String propName, java.lang.String propValue, boolean usePreRevPropChangeHook, boolean usePostRevPropChangeHook)
      Change the value of the revision property propName to propValue.
      void upgrade​(java.io.File path, ReposNotifyCallback callback)
      upgrade the repository format
      void verify​(java.io.File path, Revision start, Revision end, ReposNotifyCallback callback)
      Verify the repository at path between revisions start and end.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SVNRepos

        public SVNRepos()
    • Method Detail

      • dispose

        public void dispose()
        Description copied from interface: ISVNRepos
        release the native peer (should not depend on finalize)
        Specified by:
        dispose in interface ISVNRepos
      • getVersion

        public Version getVersion()
        Specified by:
        getVersion in interface ISVNRepos
        Returns:
        Version information about the underlying native libraries.
      • create

        public void create​(java.io.File path,
                           boolean disableFsyncCommit,
                           boolean keepLog,
                           java.io.File configPath,
                           java.lang.String fstype)
                    throws ClientException
        Description copied from interface: ISVNRepos
        create a subversion repository.
        Specified by:
        create in interface ISVNRepos
        Parameters:
        path - the path where the repository will been created.
        disableFsyncCommit - disable to fsync at the commit (BDB).
        keepLog - keep the log files (BDB).
        configPath - optional path for user configuration files.
        fstype - the type of the filesystem (BDB or FSFS)
        Throws:
        ClientException - throw in case of problem
      • deltify

        public void deltify​(java.io.File path,
                            Revision start,
                            Revision end)
                     throws ClientException
        Description copied from interface: ISVNRepos
        deltify the revisions in the repository
        Specified by:
        deltify in interface ISVNRepos
        Parameters:
        path - the path to the repository
        start - start revision
        end - end revision
        Throws:
        ClientException - throw in case of problem
      • dump

        public void dump​(java.io.File path,
                         java.io.OutputStream dataOut,
                         Revision start,
                         Revision end,
                         boolean incremental,
                         boolean useDeltas,
                         ReposNotifyCallback callback)
                  throws ClientException
        Description copied from interface: ISVNRepos
        dump the data in a repository
        Specified by:
        dump in interface ISVNRepos
        Parameters:
        path - the path to the repository
        dataOut - the data will be outputed here
        start - the first revision to be dumped
        end - the last revision to be dumped
        incremental - the dump will be incremantal
        useDeltas - the dump will contain deltas between nodes
        callback - the callback to recieve notifications
        Throws:
        ClientException - throw in case of problem
      • load

        public void load​(java.io.File path,
                         java.io.InputStream dataInput,
                         boolean ignoreUUID,
                         boolean forceUUID,
                         boolean usePreCommitHook,
                         boolean usePostCommitHook,
                         java.lang.String relativePath,
                         ReposNotifyCallback callback)
                  throws ClientException
        Description copied from interface: ISVNRepos
        load the data of a dump into a repository
        Specified by:
        load in interface ISVNRepos
        Parameters:
        path - the path to the repository
        dataInput - the data input source
        ignoreUUID - ignore any UUID found in the input stream
        forceUUID - set the repository UUID to any found in the stream
        usePreCommitHook - use the pre-commit hook when processing commits
        usePostCommitHook - use the post-commit hook when processing commits
        relativePath - the directory in the repository, where the data in put optional.
        callback - the target for processing messages
        Throws:
        ClientException - throw in case of problem
      • recover

        public long recover​(java.io.File path,
                            ReposNotifyCallback callback)
                     throws ClientException
        Description copied from interface: ISVNRepos
        recover the filesystem backend of a repository
        Specified by:
        recover in interface ISVNRepos
        Parameters:
        path - the path to the repository
        Returns:
        youngest revision
        Throws:
        ClientException - throw in case of problem
      • rmtxns

        public void rmtxns​(java.io.File path,
                           java.lang.String[] transactions)
                    throws ClientException
        Description copied from interface: ISVNRepos
        remove open transaction in a repository
        Specified by:
        rmtxns in interface ISVNRepos
        Parameters:
        path - the path to the repository
        transactions - the transactions to be removed
        Throws:
        ClientException - throw in case of problem
      • setRevProp

        public void setRevProp​(java.io.File path,
                               Revision rev,
                               java.lang.String propName,
                               java.lang.String propValue,
                               boolean usePreRevPropChangeHook,
                               boolean usePostRevPropChangeHook)
                        throws SubversionException
        Description copied from interface: ISVNRepos
        Change the value of the revision property propName to propValue. By default, does not run pre-/post-revprop-change hook scripts.
        Specified by:
        setRevProp in interface ISVNRepos
        Parameters:
        path - The path to the repository.
        rev - The revision for which to change a property value.
        propName - The name of the property to change.
        propValue - The new value to set for the property.
        usePreRevPropChangeHook - Whether to run the pre-revprop-change hook script.
        usePostRevPropChangeHook - Whether to run the post-revprop-change hook script.
        Throws:
        SubversionException - If a problem occurs.
      • verify

        public void verify​(java.io.File path,
                           Revision start,
                           Revision end,
                           ReposNotifyCallback callback)
                    throws ClientException
        Description copied from interface: ISVNRepos
        Verify the repository at path between revisions start and end.
        Specified by:
        verify in interface ISVNRepos
        Parameters:
        path - the path to the repository
        start - the first revision
        end - the last revision
        callback - the callback to recieve notifications
        Throws:
        ClientException - If an error occurred.
      • lslocks

        public java.util.Set<Lock> lslocks​(java.io.File path,
                                           Depth depth)
                                    throws ClientException
        Description copied from interface: ISVNRepos
        list all locks in the repository
        Specified by:
        lslocks in interface ISVNRepos
        Parameters:
        path - the path to the repository
        depth - the depth to recurse
        Throws:
        ClientException - throw in case of problem
      • rmlocks

        public void rmlocks​(java.io.File path,
                            java.lang.String[] locks)
                     throws ClientException
        Description copied from interface: ISVNRepos
        remove multiple locks from the repository
        Specified by:
        rmlocks in interface ISVNRepos
        Parameters:
        path - the path to the repository
        locks - the name of the locked items
        Throws:
        ClientException - throw in case of problem
      • hotcopy

        public void hotcopy​(java.io.File path,
                            java.io.File targetPath,
                            boolean cleanLogs,
                            boolean incremental)
                     throws ClientException
        Description copied from interface: ISVNRepos
        make a hot copy of the repository
        Specified by:
        hotcopy in interface ISVNRepos
        Parameters:
        path - the path to the source repository
        targetPath - the path to the target repository
        cleanLogs - clean the unused log files in the source repository
        Throws:
        ClientException - throw in case of problem
      • load

        public void load​(java.io.File path,
                         java.io.InputStream dataInput,
                         Revision start,
                         Revision end,
                         boolean ignoreUUID,
                         boolean forceUUID,
                         boolean usePreCommitHook,
                         boolean usePostCommitHook,
                         java.lang.String relativePath,
                         ReposNotifyCallback callback)
                  throws ClientException
        Description copied from interface: ISVNRepos
        load the data of a dump into a repository
        Specified by:
        load in interface ISVNRepos
        Parameters:
        path - the path to the repository
        dataInput - the data input source
        start - the first revision to load
        end - the last revision to load
        ignoreUUID - ignore any UUID found in the input stream
        forceUUID - set the repository UUID to any found in the stream
        usePreCommitHook - use the pre-commit hook when processing commits
        usePostCommitHook - use the post-commit hook when processing commits
        relativePath - the directory in the repository, where the data in put optional.
        callback - the target for processing messages
        Throws:
        ClientException - throw in case of problem
      • freeze

        public void freeze​(ReposFreezeAction action,
                           java.io.File... paths)
                    throws ClientException
        Description copied from interface: ISVNRepos
        Take an exclusive lock on each of the listed repositories to prevent commits; then, while holding all the locks, call the action.invoke(). The repositories may or may not be readable by Subversion while frozen, depending on implementation details of the repository's filesystem backend. Repositories are locked in the listed order.
        Specified by:
        freeze in interface ISVNRepos
        Parameters:
        action - describes the action to perform
        paths - the set of repository paths
        Throws:
        ClientException