|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tmatesoft.svn.core.wc.SVNBasicClient
org.tmatesoft.svn.core.wc.admin.SVNAdminClient
The SVNAdminClient class provides methods that brings repository-side functionality and repository synchronizing features.
Repository administrative methods are analogues of the corresponding commands of the native Subversion 'svnadmin' utility, while repository synchronizing methods are the ones for the 'svnsync' utility.
Here's a list of the SVNAdminClient's methods matched against corresponing commands of the Subversion svnsync and svnadmin command-line utilities:
SVNKit | Subversion |
doInitialize() | 'svnsync initialize' |
doSynchronize() | 'svnsync synchronize' |
doCopyRevisionProperties() | 'svnsync copy-revprops' |
doDump() | 'svnadmin dump' |
doListTransactions() | 'svnadmin lstxns' |
doLoad() | 'svnadmin load' |
doRemoveTransactions() | 'svnadmin rmtxns' |
doVerify() | 'svnadmin verify' |
Nested Class Summary |
Nested classes inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
SVNBasicClient.RepositoryReference, SVNBasicClient.SVNRepositoryLocation |
Field Summary |
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler |
UNKNOWN |
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller |
NULL |
Constructor Summary | |
SVNAdminClient(ISVNAuthenticationManager authManager,
ISVNOptions options)
Creates a new admin client. |
|
SVNAdminClient(ISVNRepositoryPool repositoryPool,
ISVNOptions options)
Creates a new admin client. |
Method Summary | |
void |
doCompleteSynchronize(SVNURL fromURL,
SVNURL toURL)
Completely synchronizes two repositories. |
void |
doCopyRevisionProperties(SVNURL toURL,
long revision)
Copies revision properties from the source repository that the destination one is synchronized with to the given revision of the destination repository itself. |
SVNURL |
doCreateRepository(File path,
String uuid,
boolean enableRevisionProperties,
boolean force)
Creates an FSFS-type repository. |
SVNURL |
doCreateRepository(File path,
String uuid,
boolean enableRevisionProperties,
boolean force,
boolean pre14Compatible)
Creates an FSFS-type repository. |
void |
doDump(File repositoryRoot,
OutputStream dumpStream,
SVNRevision startRevision,
SVNRevision endRevision,
boolean isIncremental,
boolean useDeltas)
Dumps contents of the repository to the provided output stream in a 'dumpfile' portable format. |
void |
doInitialize(SVNURL fromURL,
SVNURL toURL)
Initializes synchronization between source and target repositories. |
void |
doListLocks(File repositoryRoot)
|
void |
doListTransactions(File repositoryRoot)
Lists all uncommitted transactions. |
void |
doLoad(File repositoryRoot,
InputStream dumpStream)
Reads the provided dump stream committing new revisions to a repository. |
void |
doLoad(File repositoryRoot,
InputStream dumpStream,
boolean usePreCommitHook,
boolean usePostCommitHook,
SVNUUIDAction uuidAction,
String parentDir)
Reads the provided dump stream committing new revisions to a repository. |
void |
doRemoveLocks(File repositoryRoot,
String[] paths)
|
void |
doRemoveTransactions(File repositoryRoot,
String[] transactions)
Removes the specified outstanding transactions from a repository. |
void |
doSynchronize(SVNURL toURL)
Synchronizes the repository at the given url. |
void |
doVerify(File repositoryRoot)
Verifies the data stored in the repository. |
void |
doVerify(File repositoryRoot,
SVNRevision startRevision,
SVNRevision endRevision)
|
void |
setEventHandler(ISVNEventHandler handler)
Sets an event handler for this object. |
void |
setReplayHandler(ISVNLogEntryHandler handler)
Sets a replication handler that will receive a log entry object per each replayed revision. |
Methods inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
checkCancelled, createRepository, createRepository, createRepository, createWCAccess, createWCAccess, dispatchEvent, dispatchEvent, getDebugLog, getEventDispatcher, getLocations, getOptions, getRepositoryPool, getRevisionNumber, getURL, handleEvent, isIgnoreExternals, isLeaveConflictsUnresolved, setDebugLog, setEventPathPrefix, setIgnoreExternals, setLeaveConflictsUnresolved, setOptions, sleepForTimeStamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SVNAdminClient(ISVNAuthenticationManager authManager, ISVNOptions options)
authManager
- an auth manageroptions
- an options driverpublic SVNAdminClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
repositoryPool
- a repository pooloptions
- an options driverMethod Detail |
public void setReplayHandler(ISVNLogEntryHandler handler)
Log entries dispatched to the handler may not contain changed paths and committed log message until this features are implemented in future releases.
handler
- a replay handlerpublic void setEventHandler(ISVNEventHandler handler)
ISVNAdminEventHandler
should be provided to SVNAdminClent
via this method also.
setEventHandler
in class SVNBasicClient
handler
- an event handlerpublic SVNURL doCreateRepository(File path, String uuid, boolean enableRevisionProperties, boolean force) throws SVNException
SVNRepositoryFactory.createLocalRepository(File, String, boolean, boolean)
}.
If uuid
is null a new uuid will be generated, otherwise
the specified will be used.
If enableRevisionProperties
is true, an empty
pre-revprop-change hook will be placed into the repository /hooks subdir. This enables changes to
revision properties of the newly created repository.
If force
is true and path
already
exists, deletes that path and creates a repository in its place.
path
- a repository root dir pathuuid
- a repository uuidenableRevisionProperties
- enables/disables changes to revision propertiesforce
- forces operation to run
SVNException
doCreateRepository(File, String, boolean, boolean, boolean)
public SVNURL doCreateRepository(File path, String uuid, boolean enableRevisionProperties, boolean force, boolean pre14Compatible) throws SVNException
SVNRepositoryFactory.createLocalRepository(File, String, boolean, boolean)
}.
If uuid
is null a new uuid will be generated, otherwise
the specified will be used.
If enableRevisionProperties
is true, an empty
pre-revprop-change hook will be placed into the repository /hooks subdir. This enables changes to
revision properties of the newly created repository.
If force
is true and path
already
exists, deletes that path and creates a repository in its place.
Set pre14Compatible
to true if you want a new repository
to be compatible with pre-1.4 servers.
path
- a repository root dir pathuuid
- a repository uuidenableRevisionProperties
- enables/disables changes to revision propertiesforce
- forces operation to runpre14Compatible
- true to
create a repository with pre-1.4 format
SVNException
public void doCopyRevisionProperties(SVNURL toURL, long revision) throws SVNException
This method is equivalent to the command 'copy-revprops' of the native Subversion svnsync utility.
Note that the destination repository given as toURL
must be synchronized with a source
repository. Please, see doInitialize(SVNURL, SVNURL)
} how to initialize such a synchronization.
toURL
- a url to the destination repository which must be synchronized
with another repositoryrevision
- a particular revision of the source repository to copy revision properties
from
SVNException
public void doInitialize(SVNURL fromURL, SVNURL toURL) throws SVNException
This method is equivalent to the command 'initialize' ('init') of the native Subversion svnsync utility. Initialization places information of a source repository to a destination one (setting special revision properties in revision 0) as well as copies all revision props from revision 0 of the source repository to revision 0 of the destination one.
fromURL
- a source repository urltoURL
- a destination repository url
SVNException
public void doCompleteSynchronize(SVNURL fromURL, SVNURL toURL) throws SVNException
This method initializes the destination repository and then copies all revision
changes (including revision properties)
from the given source repository to the destination one. First it
tries to use synchronization features similar to the native Subversion
'svnsync' capabilities. But if a server does not support
replay
functionality, SVNKit uses its own repository
replication feature (see SVNRepositoryReplicator
})
fromURL
- a url of a repository to copy fromtoURL
- a destination repository url
SVNException
public void doSynchronize(SVNURL toURL) throws SVNException
Synchronization means copying revision changes and revision properties from the source repository (that the destination one is synchronized with) to the destination one starting at the last merged revision. This method is equivalent to the command 'synchronize' ('sync') of the native Subversion svnsync utility.
toURL
- a destination repository url
SVNException
public void doListLocks(File repositoryRoot) throws SVNException
SVNException
public void doRemoveLocks(File repositoryRoot, String[] paths) throws SVNException
SVNException
public void doListTransactions(File repositoryRoot) throws SVNException
SVNAdminEvent
with action set to SVNAdminEventAction.TRANSACTION_LISTED
to the registered
ISVNAdminEventHandler
(if any). To register your ISVNAdminEventHandler
pass it to setEventHandler(ISVNEventHandler)
. For this operation the following
information can be retrieved out of SVNAdminEvent
:
SVNAdminEvent.getTxnName()
to get itSVNAdminEvent.getTxnDir()
to get it
repositoryRoot
- a repository root directory path
SVNException
public void doRemoveTransactions(File repositoryRoot, String[] transactions) throws SVNException
SVNAdminEvent
with action set to SVNAdminEventAction.TRANSACTION_REMOVED
to the registered
ISVNAdminEventHandler
(if any). To register your ISVNAdminEventHandler
pass it to setEventHandler(ISVNEventHandler)
. For this operation the following
information can be retrieved out of SVNAdminEvent
:
SVNAdminEvent.getTxnName()
to get itSVNAdminEvent.getTxnDir()
to get it
repositoryRoot
- a repository root directory pathtransactions
- an array with transaction names
SVNException
public void doVerify(File repositoryRoot) throws SVNException
repositoryRoot
- a repository root directory path
SVNException
- verification failed - a repository may be corruptedpublic void doVerify(File repositoryRoot, SVNRevision startRevision, SVNRevision endRevision) throws SVNException
SVNException
public void doDump(File repositoryRoot, OutputStream dumpStream, SVNRevision startRevision, SVNRevision endRevision, boolean isIncremental, boolean useDeltas) throws SVNException
On each revision dumped this method fires an SVNAdminEvent
with action set to SVNAdminEventAction.REVISION_DUMPED
to the registered
ISVNAdminEventHandler
(if any). To register your ISVNAdminEventHandler
pass it to setEventHandler(ISVNEventHandler)
. For this operation the following
information can be retrieved out of SVNAdminEvent
:
SVNAdminEvent.getRevision()
to get it
repositoryRoot
- a repository root directory pathdumpStream
- an output stream to write dumped contents tostartRevision
- the first revision to start dumping fromendRevision
- the last revision to end dumping atisIncremental
- if true
then the first revision dumped will be a
diff against the previous revision; otherwise
the first revision is a fulltext.useDeltas
- if true
deltas will be written instead of fulltexts
SVNException
public void doLoad(File repositoryRoot, InputStream dumpStream) throws SVNException
On each revision loaded this method fires an SVNAdminEvent
with action set to SVNAdminEventAction.REVISION_LOADED
to the registered
ISVNAdminEventHandler
(if any). To register your ISVNAdminEventHandler
pass it to setEventHandler(ISVNEventHandler)
. For this operation the following
information can be retrieved out of SVNAdminEvent
:
SVNAdminEvent.getOriginalRevision()
to get itSVNAdminEvent.getRevision()
to get it
A call to this method is equivalent to
doLoad(repositoryRoot, dumpStream, false, false, SVNUUIDAction.DEFAULT, null)
.
repositoryRoot
- the root directory path of the repository where
new revisions will be committeddumpStream
- stream with dumped contents of a repository
SVNException
doLoad(File, InputStream, boolean, boolean, SVNUUIDAction, String)
public void doLoad(File repositoryRoot, InputStream dumpStream, boolean usePreCommitHook, boolean usePostCommitHook, SVNUUIDAction uuidAction, String parentDir) throws SVNException
On each revision loaded this method fires an SVNAdminEvent
with action set to SVNAdminEventAction.REVISION_LOADED
to the registered
ISVNAdminEventHandler
(if any). To register your ISVNAdminEventHandler
pass it to setEventHandler(ISVNEventHandler)
. For this operation the following
information can be retrieved out of SVNAdminEvent
:
SVNAdminEvent.getOriginalRevision()
to get itSVNAdminEvent.getRevision()
to get it
repositoryRoot
- the root directory path of the repository where
new revisions will be committeddumpStream
- stream with dumped contents of a repositoryusePreCommitHook
- if true
then calls a pre-commit hook before committingusePostCommitHook
- if true
then calls a post-commit hook after committinguuidAction
- one of the three possible ways to treat uuidsparentDir
- if not null
then loads at this directory in the repository
SVNException
|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |