Package org.tigris.subversion.javahl
Class SVNAdmin
java.lang.Object
org.tigris.subversion.javahl.SVNAdmin
public class SVNAdmin extends Object
This class offers the same commands as the svnadmin commandline
client.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SVNAdmin.MessageReceiver
interface to receive the messages -
Field Summary
-
Constructor Summary
Constructors Constructor Description SVNAdmin()
Standard empty constructor, builds just the native peer. -
Method Summary
Modifier and Type Method Description void
create(String path, boolean disableFsyncCommit, boolean keepLog, String configPath, String fstype)
create a subversion repository.void
deltify(String path, Revision start, Revision end)
deltify the revisions in the repositoryvoid
dispose()
release the native peer (should not depend on finalize)void
dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental)
dump the data in a repositoryvoid
dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental, boolean useDeltas)
dump the data in a repositoryprotected void
finalize()
release the native peer (should use dispose instead)Version
getVersion()
void
hotcopy(String path, String targetPath, boolean cleanLogs)
make a hot copy of the repositoryvoid
listDBLogs(String path, SVNAdmin.MessageReceiver receiver)
list all logfiles (BDB) in use or not)void
listUnusedDBLogs(String path, SVNAdmin.MessageReceiver receiver)
list unused logfilesvoid
load(String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, String relativePath)
load the data of a dump into a repository,void
load(String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, String relativePath)
load the data of a dump into a repository,Lock[]
lslocks(String path)
list all locks in the repositoryvoid
lstxns(String path, SVNAdmin.MessageReceiver receiver)
list all open transactions in a repositorylong
recover(String path)
recover the berkeley db of a repository, returns youngest revisionvoid
rmlocks(String path, String[] locks)
remove multiple locks from the repositoryvoid
rmtxns(String path, String[] transactions)
remove open transaction in a repositoryvoid
setLog(String path, Revision rev, String message, boolean bypassHooks)
Deprecated.Use setRevProp() instead.void
setRevProp(String path, Revision rev, String propName, String propValue, boolean usePreRevPropChangeHook, boolean usePostRevPropChangeHook)
Change the value of the revision propertypropName
topropValue
.void
verify(String path, OutputInterface messageOut, Revision start, Revision end)
Verify the repository atpath
between revisionsstart
andend
.
-
Field Details
-
cppAddr
protected long cppAddrslot for the adress of the native peer. The JNI code is the only user of this member -
BDB
Filesystem in a Berkeley DB- See Also:
- Constant Field Values
-
FSFS
Filesystem in the filesystem- See Also:
- Constant Field Values
-
-
Constructor Details
-
SVNAdmin
public SVNAdmin()Standard empty constructor, builds just the native peer.
-
-
Method Details
-
dispose
public void dispose()release the native peer (should not depend on finalize) -
finalize
protected void finalize()release the native peer (should use dispose instead) -
getVersion
- Returns:
- Version information about the underlying native libraries.
-
create
public void create(String path, boolean disableFsyncCommit, boolean keepLog, String configPath, String fstype) throws ClientExceptioncreate 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
deltify the revisions in the repository- Parameters:
path
- the path to the repositorystart
- start revisionend
- end revision- Throws:
ClientException
- throw in case of problem
-
dump
public void dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental) throws ClientExceptiondump the data in a repository- Parameters:
path
- the path to the repositorydataOut
- the data will be outputed hereerrorOut
- the messages will be outputed herestart
- the first revision to be dumpedend
- the last revision to be dumpedincremental
- the dump will be incremantal- Throws:
ClientException
- throw in case of problem
-
dump
public void dump(String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental, boolean useDeltas) throws ClientExceptiondump the data in a repository- Parameters:
path
- the path to the repositorydataOut
- the data will be outputed hereerrorOut
- the messages will be outputed herestart
- the first revision to be dumpedend
- the last revision to be dumpedincremental
- the dump will be incremantaluseDeltas
- the dump will contain deltas between nodes- Throws:
ClientException
- throw in case of problem- Since:
- 1.5
-
hotcopy
make a hot copy of the repository- Parameters:
path
- the path to the source repositorytargetPath
- the path to the target repositorycleanLogs
- clean the unused log files in the source repository- Throws:
ClientException
- throw in case of problem
-
listDBLogs
list all logfiles (BDB) in use or not)- Parameters:
path
- the path to the repositoryreceiver
- interface to receive the logfile names- Throws:
ClientException
- throw in case of problem
-
listUnusedDBLogs
public void listUnusedDBLogs(String path, SVNAdmin.MessageReceiver receiver) throws ClientExceptionlist unused logfiles- Parameters:
path
- the path to the repositoryreceiver
- interface to receive the logfile names- Throws:
ClientException
- throw in case of problem
-
load
public void load(String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, String relativePath) throws ClientExceptionload the data of a dump into a repository,- Parameters:
path
- the path to the repositorydataInput
- the data input sourcemessageOutput
- the target for processing messagesignoreUUID
- ignore any UUID found in the input streamforceUUID
- set the repository UUID to any found in the streamrelativePath
- the directory in the repository, where the data in put optional.- Throws:
ClientException
- throw in case of problem
-
load
public void load(String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, String relativePath) throws ClientExceptionload the data of a dump into a repository,- Parameters:
path
- the path to the repositorydataInput
- the data input sourcemessageOutput
- the target for processing messagesignoreUUID
- ignore any UUID found in the input streamforceUUID
- set the repository UUID to any found in the streamusePreCommitHook
- use the pre-commit hook when processing commitsusePostCommitHook
- use the post-commit hook when processing commitsrelativePath
- the directory in the repository, where the data in put optional.- Throws:
ClientException
- throw in case of problem- Since:
- 1.5
-
lstxns
list all open transactions in a repository- Parameters:
path
- the path to the repositoryreceiver
- receives one transaction name per call- Throws:
ClientException
- throw in case of problem
-
recover
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
remove open transaction in a repository- Parameters:
path
- the path to the repositorytransactions
- the transactions to be removed- Throws:
ClientException
- throw in case of problem
-
setLog
public void setLog(String path, Revision rev, String message, boolean bypassHooks) throws ClientExceptionDeprecated.Use setRevProp() instead.set the log message of a revision- Parameters:
path
- the path to the repositoryrev
- the revision to be changedmessage
- the message to be setbypassHooks
- if to bypass all repository hooks- Throws:
ClientException
- throw in case of problem
-
setRevProp
public void setRevProp(String path, Revision rev, String propName, String propValue, boolean usePreRevPropChangeHook, boolean usePostRevPropChangeHook) throws SubversionExceptionChange the value of the revision propertypropName
topropValue
. 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(String path, OutputInterface messageOut, Revision start, Revision end) throws ClientExceptionVerify the repository atpath
between revisionsstart
andend
.- Parameters:
path
- the path to the repositorymessageOut
- the receiver of all messagesstart
- the first revisionend
- the last revision- Throws:
ClientException
- If an error occurred.
-
lslocks
list all locks in the repository- Parameters:
path
- the path to the repository- Throws:
ClientException
- throw in case of problem- Since:
- 1.2
-
rmlocks
remove multiple locks from the repository- Parameters:
path
- the path to the repositorylocks
- the name of the locked items- Throws:
ClientException
- throw in case of problem- Since:
- 1.2
-