Package org.tigris.subversion.javahl
Class SVNAdmin
- java.lang.Object
-
- org.tigris.subversion.javahl.SVNAdmin
-
public class SVNAdmin extends java.lang.Object
- Version:
- 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SVNAdmin.MessageReceiver
interface to receive the messages
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BDB
Filesystem in a Berkeley DBprotected long
cppAddr
static java.lang.String
FSFS
Filesystem in the filesystemprivate SVNClientImpl
myDelegate
private SVNAdminClient
mySVNAdminClient
-
Constructor Summary
Constructors Constructor Description SVNAdmin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
create(java.lang.String path, boolean disableFsyncCommit, boolean keepLog, java.lang.String configPath, java.lang.String fstype)
create a subversion repository.private static java.io.InputStream
createInputStream(InputInterface dataIn)
private static java.io.OutputStream
createOutputStream(OutputInterface dataOut)
void
deltify(java.lang.String path, Revision start, Revision end)
deltify the revisions in the repositoryvoid
dispose()
void
dump(java.lang.String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental)
dump the data in a repositoryvoid
dump(java.lang.String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental, boolean useDeltas)
dump the data in a repositoryprotected SVNAdminClient
getAdminClient()
Version
getVersion()
void
hotcopy(java.lang.String path, java.lang.String targetPath, boolean cleanLogs)
make a hot copy of the repositoryvoid
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 logfilesvoid
load(java.lang.String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, java.lang.String relativePath)
void
load(java.lang.String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, java.lang.String relativePath)
load the data of a dump into a repository,Lock[]
lslocks(java.lang.String path)
list all locks in the repositoryvoid
lstxns(java.lang.String path, SVNAdmin.MessageReceiver receiver)
list all open transactions in a repositoryprivate void
notImplementedYet()
private void
notImplementedYet(java.lang.String message)
long
recover(java.lang.String path)
recover the berkeley db of a repository, returns youngest revisionvoid
rmlocks(java.lang.String path, java.lang.String[] locks)
remove multiple locks from the repositoryvoid
rmtxns(java.lang.String path, java.lang.String[] transactions)
remove open transaction in a repositoryvoid
setLog(java.lang.String path, Revision rev, java.lang.String message, boolean bypassHooks)
Deprecated.Use setRevProp() instead.private static void
setRevisionProperty(java.lang.String path, Revision rev, java.lang.String propName, java.lang.String propValue, boolean bypassPreRevPropChangeHook, boolean bypassPostRevPropChangeHook)
void
setRevProp(java.lang.String path, Revision rev, java.lang.String propName, java.lang.String propValue, boolean usePreRevPropChangeHook, boolean usePostRevPropChangeHook)
Change the value of the revision propertypropName
topropValue
.void
verify(java.lang.String path, OutputInterface messageOut, Revision start, Revision end)
verify the repository
-
-
-
Field Detail
-
cppAddr
protected long cppAddr
-
myDelegate
private SVNClientImpl myDelegate
-
mySVNAdminClient
private SVNAdminClient mySVNAdminClient
-
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
-
-
Method Detail
-
dispose
public void dispose()
-
getVersion
public Version getVersion()
- Returns:
- Version information about the underlying native libraries.
-
getAdminClient
protected SVNAdminClient getAdminClient()
-
create
public void create(java.lang.String path, boolean disableFsyncCommit, boolean keepLog, java.lang.String configPath, java.lang.String fstype) throws 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, Revision start, Revision end) throws ClientException
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(java.lang.String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental) throws ClientException
dump 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(java.lang.String path, OutputInterface dataOut, OutputInterface errorOut, Revision start, Revision end, boolean incremental, boolean useDeltas) throws ClientException
dump 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
public void hotcopy(java.lang.String path, java.lang.String targetPath, boolean cleanLogs) throws ClientException
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
public void listDBLogs(java.lang.String path, SVNAdmin.MessageReceiver receiver) throws ClientException
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(java.lang.String path, SVNAdmin.MessageReceiver receiver) throws ClientException
list 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(java.lang.String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, java.lang.String relativePath) throws ClientException
load 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(java.lang.String path, InputInterface dataInput, OutputInterface messageOutput, boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook, boolean usePostCommitHook, java.lang.String relativePath) throws ClientException
- Throws:
ClientException
-
lstxns
public void lstxns(java.lang.String path, SVNAdmin.MessageReceiver receiver) throws ClientException
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
public long recover(java.lang.String path) throws 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 ClientException
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(java.lang.String path, Revision rev, java.lang.String message, boolean bypassHooks) throws ClientException
Deprecated.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(java.lang.String path, Revision rev, java.lang.String propName, java.lang.String propValue, boolean usePreRevPropChangeHook, boolean usePostRevPropChangeHook) throws SubversionException
Change 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
-
setRevisionProperty
private static void setRevisionProperty(java.lang.String path, Revision rev, java.lang.String propName, java.lang.String propValue, boolean bypassPreRevPropChangeHook, boolean bypassPostRevPropChangeHook) throws SVNException
- Throws:
SVNException
-
verify
public void verify(java.lang.String path, OutputInterface messageOut, Revision start, Revision end) throws ClientException
verify the repository- Parameters:
path
- the path to the repositorymessageOut
- the receiver of all messagesstart
- the first revisionend
- the last revision- Throws:
ClientException
- throw in case of problem
-
lslocks
public Lock[] lslocks(java.lang.String path) throws 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 ClientException
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
-
createOutputStream
private static java.io.OutputStream createOutputStream(OutputInterface dataOut)
-
createInputStream
private static java.io.InputStream createInputStream(InputInterface dataIn)
-
notImplementedYet
private void notImplementedYet() throws ClientException
- Throws:
ClientException
-
notImplementedYet
private void notImplementedYet(java.lang.String message) throws ClientException
- Throws:
ClientException
-
-