org.tigris.subversion.javahl
Class SVNAdmin

java.lang.Object
  extended by org.tigris.subversion.javahl.SVNAdmin

public class SVNAdmin
extends java.lang.Object


Nested Class Summary
static interface SVNAdmin.MessageReceiver
          interface to receive the messages
 
Field Summary
static java.lang.String BDB
          Filesystem in a Berkeley DB
protected  long cppAddr
           
static java.lang.String FSFS
          Filesystem in the filesystem
 
Constructor Summary
SVNAdmin()
           
 
Method Summary
 void create(java.lang.String path, boolean disableFsyncCommit, boolean keepLog, java.lang.String configPath, java.lang.String fstype)
          create a subversion repository.
 void deltify(java.lang.String path, org.tigris.subversion.javahl.Revision start, org.tigris.subversion.javahl.Revision end)
          deltify the revisions in the repository
 void dispose()
           
 void dump(java.lang.String path, org.tigris.subversion.javahl.OutputInterface dataOut, org.tigris.subversion.javahl.OutputInterface errorOut, org.tigris.subversion.javahl.Revision start, org.tigris.subversion.javahl.Revision end, boolean incremental)
          dump the data in a repository
 void dump(java.lang.String path, org.tigris.subversion.javahl.OutputInterface dataOut, org.tigris.subversion.javahl.OutputInterface errorOut, org.tigris.subversion.javahl.Revision start, org.tigris.subversion.javahl.Revision end, boolean incremental, boolean useDeltas)
          dump the data in a repository
protected  org.tmatesoft.svn.core.wc.admin.SVNAdminClient getAdminClient()
           
 org.tigris.subversion.javahl.Version getVersion()
           
 void hotcopy(java.lang.String path, java.lang.String targetPath, boolean cleanLogs)
          make a hot copy of the repository
 void listDBLogs(java.lang.String path, SVNAdmin.MessageReceiver receiver)
          list all logfiles (BDB) in use or not)
 void listUnusedDBLogs(java.lang.String path, SVNAdmin.MessageReceiver receiver)
          list unused logfiles
 void load(java.lang.String path, org.tigris.subversion.javahl.InputInterface dataInput, org.tigris.subversion.javahl.OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, java.lang.String relativePath)
           
 void load(java.lang.String path, org.tigris.subversion.javahl.InputInterface dataInput, org.tigris.subversion.javahl.OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, java.lang.String relativePath)
          load the data of a dump into a repository,
 org.tigris.subversion.javahl.Lock[] lslocks(java.lang.String path)
          list all locks in the repository
 void lstxns(java.lang.String path, SVNAdmin.MessageReceiver receiver)
          list all open transactions in a repository
 long recover(java.lang.String path)
          recover the berkeley db of a repository, returns youngest revision
 void rmlocks(java.lang.String path, java.lang.String[] locks)
          remove multiple locks from the repository
 void rmtxns(java.lang.String path, java.lang.String[] transactions)
          remove open transaction in a repository
 void setLog(java.lang.String path, org.tigris.subversion.javahl.Revision rev, java.lang.String message, boolean bypassHooks)
          Deprecated. Use setRevProp() instead.
 void setRevProp(java.lang.String path, org.tigris.subversion.javahl.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 verify(java.lang.String path, org.tigris.subversion.javahl.OutputInterface messageOut, org.tigris.subversion.javahl.Revision start, org.tigris.subversion.javahl.Revision end)
          verify the repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cppAddr

protected long cppAddr

BDB

public static final java.lang.String BDB
Filesystem in a Berkeley DB

See Also:
Constant Field Values

FSFS

public static final java.lang.String FSFS
Filesystem in the filesystem

See Also:
Constant Field Values
Constructor Detail

SVNAdmin

public SVNAdmin()
Method Detail

dispose

public void dispose()

getVersion

public org.tigris.subversion.javahl.Version getVersion()
Returns:
Version information about the underlying native libraries.

getAdminClient

protected org.tmatesoft.svn.core.wc.admin.SVNAdminClient getAdminClient()

create

public void create(java.lang.String path,
                   boolean disableFsyncCommit,
                   boolean keepLog,
                   java.lang.String configPath,
                   java.lang.String fstype)
            throws org.tigris.subversion.javahl.ClientException
create a subversion repository.

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.lang.String path,
                    org.tigris.subversion.javahl.Revision start,
                    org.tigris.subversion.javahl.Revision end)
             throws org.tigris.subversion.javahl.ClientException
deltify the revisions in the repository

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.lang.String path,
                 org.tigris.subversion.javahl.OutputInterface dataOut,
                 org.tigris.subversion.javahl.OutputInterface errorOut,
                 org.tigris.subversion.javahl.Revision start,
                 org.tigris.subversion.javahl.Revision end,
                 boolean incremental)
          throws org.tigris.subversion.javahl.ClientException
dump the data in a repository

Parameters:
path - the path to the repository
dataOut - the data will be outputed here
errorOut - the messages will be outputed here
start - the first revision to be dumped
end - the last revision to be dumped
incremental - the dump will be incremantal
Throws:
ClientException - throw in case of problem

dump

public void dump(java.lang.String path,
                 org.tigris.subversion.javahl.OutputInterface dataOut,
                 org.tigris.subversion.javahl.OutputInterface errorOut,
                 org.tigris.subversion.javahl.Revision start,
                 org.tigris.subversion.javahl.Revision end,
                 boolean incremental,
                 boolean useDeltas)
          throws org.tigris.subversion.javahl.ClientException
dump the data in a repository

Parameters:
path - the path to the repository
dataOut - the data will be outputed here
errorOut - the messages 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
Throws:
ClientException - throw in case of problem
Since:
1.5

hotcopy

public void hotcopy(java.lang.String path,
                    java.lang.String targetPath,
                    boolean cleanLogs)
             throws org.tigris.subversion.javahl.ClientException
make a hot copy of the repository

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

listDBLogs

public void listDBLogs(java.lang.String path,
                       SVNAdmin.MessageReceiver receiver)
                throws org.tigris.subversion.javahl.ClientException
list all logfiles (BDB) in use or not)

Parameters:
path - the path to the repository
receiver - interface to receive the logfile names
Throws:
ClientException - throw in case of problem

listUnusedDBLogs

public void listUnusedDBLogs(java.lang.String path,
                             SVNAdmin.MessageReceiver receiver)
                      throws org.tigris.subversion.javahl.ClientException
list unused logfiles

Parameters:
path - the path to the repository
receiver - interface to receive the logfile names
Throws:
ClientException - throw in case of problem

load

public void load(java.lang.String path,
                 org.tigris.subversion.javahl.InputInterface dataInput,
                 org.tigris.subversion.javahl.OutputInterface messageOutput,
                 boolean ignoreUUID,
                 boolean forceUUID,
                 java.lang.String relativePath)
          throws org.tigris.subversion.javahl.ClientException
load the data of a dump into a repository,

Parameters:
path - the path to the repository
dataInput - the data input source
messageOutput - the target for processing messages
ignoreUUID - ignore any UUID found in the input stream
forceUUID - set the repository UUID to any found in the stream
relativePath - the directory in the repository, where the data in put optional.
Throws:
ClientException - throw in case of problem

load

public void load(java.lang.String path,
                 org.tigris.subversion.javahl.InputInterface dataInput,
                 org.tigris.subversion.javahl.OutputInterface messageOutput,
                 boolean ignoreUUID,
                 boolean forceUUID,
                 boolean usePreCommitHook,
                 boolean usePostCommitHook,
                 java.lang.String relativePath)
          throws org.tigris.subversion.javahl.ClientException
Throws:
org.tigris.subversion.javahl.ClientException

lstxns

public void lstxns(java.lang.String path,
                   SVNAdmin.MessageReceiver receiver)
            throws org.tigris.subversion.javahl.ClientException
list all open transactions in a repository

Parameters:
path - the path to the repository
receiver - receives one transaction name per call
Throws:
ClientException - throw in case of problem

recover

public long recover(java.lang.String path)
             throws org.tigris.subversion.javahl.ClientException
recover the berkeley db of a repository, returns youngest revision

Parameters:
path - the path to the repository
Throws:
ClientException - throw in case of problem

rmtxns

public void rmtxns(java.lang.String path,
                   java.lang.String[] transactions)
            throws org.tigris.subversion.javahl.ClientException
remove open transaction in a repository

Parameters:
path - the path to the repository
transactions - the transactions to be removed
Throws:
ClientException - throw in case of problem

setLog

public void setLog(java.lang.String path,
                   org.tigris.subversion.javahl.Revision rev,
                   java.lang.String message,
                   boolean bypassHooks)
            throws org.tigris.subversion.javahl.ClientException
Deprecated. Use setRevProp() instead.

set the log message of a revision

Parameters:
path - the path to the repository
rev - the revision to be changed
message - the message to be set
bypassHooks - if to bypass all repository hooks
Throws:
ClientException - throw in case of problem

setRevProp

public void setRevProp(java.lang.String path,
                       org.tigris.subversion.javahl.Revision rev,
                       java.lang.String propName,
                       java.lang.String propValue,
                       boolean usePreRevPropChangeHook,
                       boolean usePostRevPropChangeHook)
                throws org.tigris.subversion.javahl.SubversionException
Change the value of the revision property propName to propValue. By default, does not run pre-/post-revprop-change hook scripts.

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.
Since:
1.5.0

verify

public void verify(java.lang.String path,
                   org.tigris.subversion.javahl.OutputInterface messageOut,
                   org.tigris.subversion.javahl.Revision start,
                   org.tigris.subversion.javahl.Revision end)
            throws org.tigris.subversion.javahl.ClientException
verify the repository

Parameters:
path - the path to the repository
messageOut - the receiver of all messages
start - the first revision
end - the last revision
Throws:
ClientException - throw in case of problem

lslocks

public org.tigris.subversion.javahl.Lock[] lslocks(java.lang.String path)
                                            throws org.tigris.subversion.javahl.ClientException
list all locks in the repository

Parameters:
path - the path to the repository
Throws:
ClientException - throw in case of problem
Since:
1.2

rmlocks

public void rmlocks(java.lang.String path,
                    java.lang.String[] locks)
             throws org.tigris.subversion.javahl.ClientException
remove multiple locks from the repository

Parameters:
path - the path to the repository
locks - the name of the locked items
Throws:
ClientException - throw in case of problem
Since:
1.2