|
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.SVNCommitClient
The SVNCommitClient class provides methods to perform operations that relate to committing changes to an SVN repository. These operations are similar to respective commands of the native SVN command line client and include ones which operate on working copy items as well as ones that operate only on a repository.
Here's a list of the SVNCommitClient's commit-related methods matched against corresponing commands of the SVN command line client:
SVNKit | Subversion |
doCommit() | 'svn commit' |
doImport() | 'svn import' |
doDelete() | 'svn delete URL' |
doMkDir() | 'svn mkdir URL' |
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 | |
SVNCommitClient(ISVNAuthenticationManager authManager,
ISVNOptions options)
Constructs and initializes an SVNCommitClient object with the specified run-time configuration and authentication drivers. |
|
SVNCommitClient(ISVNRepositoryPool repositoryPool,
ISVNOptions options)
|
Method Summary | |
SVNCommitPacket |
doCollectCommitItems(File[] paths,
boolean keepLocks,
boolean force,
boolean recursive)
Collects commit items (containing detailed information on each Working Copy item that was changed and need to be committed to the repository) into a single SVNCommitPacket. |
SVNCommitPacket[] |
doCollectCommitItems(File[] paths,
boolean keepLocks,
boolean force,
boolean recursive,
boolean combinePackets)
Collects commit items (containing detailed information on each Working Copy item that was changed and need to be committed to the repository) into different SVNCommitPackets. |
SVNCommitInfo |
doCommit(File[] paths,
boolean keepLocks,
String commitMessage,
boolean force,
boolean recursive)
Committs local changes made to the Working Copy items (provided as an array of File s) to the repository. |
SVNCommitInfo[] |
doCommit(SVNCommitPacket[] commitPackets,
boolean keepLocks,
String commitMessage)
Committs local changes, made to the Working Copy items, to the repository. |
SVNCommitInfo |
doCommit(SVNCommitPacket commitPacket,
boolean keepLocks,
String commitMessage)
Committs local changes made to the Working Copy items to the repository. |
SVNCommitInfo |
doDelete(SVNURL[] urls,
String commitMessage)
Committs removing specified URL-paths from the repository. |
SVNCommitInfo |
doImport(File path,
SVNURL dstURL,
String commitMessage,
boolean recursive)
Committs an addition of a local unversioned file or directory into the repository. |
SVNCommitInfo |
doImport(File path,
SVNURL dstURL,
String commitMessage,
boolean useGlobalIgnores,
boolean recursive)
Committs an addition of a local unversioned file or directory into the repository. |
SVNCommitInfo |
doMkDir(SVNURL[] urls,
String commitMessage)
Committs a creation of a new directory/directories in the repository. |
ISVNCommitHandler |
getCommitHandler()
Returns the specified commit handler (if set) being in use or a default one (DefaultSVNCommitHandler) if no special implementations of ISVNCommitHandler were previousely provided. |
ISVNCommitParameters |
getCommitParameters()
Returns commit parameters. |
void |
setCommitHander(ISVNCommitHandler handler)
Deprecated. use setCommitHandler(ISVNCommitHandler) instead |
void |
setCommitHandler(ISVNCommitHandler handler)
Sets an implementation of ISVNCommitHandler to the commit handler that will be used during commit operations to handle commit log messages. |
void |
setCommitParameters(ISVNCommitParameters parameters)
Sets commit parameters to use. |
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, setEventHandler, 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 SVNCommitClient(ISVNAuthenticationManager authManager, ISVNOptions options)
If options
is null,
then this SVNCommitClient will be using a default run-time
configuration driver which takes client-side settings from the
default SVN's run-time configuration area but is not able to
change those settings (read more on ISVNOptions
and SVNWCUtil
).
If authManager
is null,
then this SVNCommitClient will be using a default authentication
and network layers driver (see SVNWCUtil.createDefaultAuthenticationManager()
)
which uses server-side settings and auth storage from the
default SVN's run-time configuration area (or system properties
if that area is not found).
authManager
- an authentication and network layers driveroptions
- a run-time configuration options driverpublic SVNCommitClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
Method Detail |
public void setCommitHander(ISVNCommitHandler handler)
setCommitHandler(ISVNCommitHandler)
instead
handler
- public void setCommitHandler(ISVNCommitHandler handler)
If using SVNCommitClient without specifying any
commit handler then a default one will be used - DefaultSVNCommitHandler
.
handler
- an implementor's handler that will be used to handle
commit log messagesgetCommitHandler()
,
ISVNCommitHandler
public ISVNCommitHandler getCommitHandler()
setCommitHander(ISVNCommitHandler)
,
ISVNCommitHandler
,
DefaultSVNCommitHandler
public void setCommitParameters(ISVNCommitParameters parameters)
When no parameters are set default
ones are used.
parameters
- commit parametersgetCommitParameters()
public ISVNCommitParameters getCommitParameters()
If no user parameters were previously specified, once creates and
returns default
ones.
setCommitParameters(ISVNCommitParameters)
public SVNCommitInfo doDelete(SVNURL[] urls, String commitMessage) throws SVNException
urls
- an array containing URL-strings that represent
repository locations to be removedcommitMessage
- a string to be a commit log message
SVNException
- if one of the following is true:
public SVNCommitInfo doMkDir(SVNURL[] urls, String commitMessage) throws SVNException
urls
- an array containing URL-strings that represent
new repository locations to be createdcommitMessage
- a string to be a commit log message
SVNException
- if some of URLs refer to different
repositoriespublic SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean recursive) throws SVNException
dstURL
) contains any
non-existent parent directories they will be automatically created by the
server.
path
- a local unversioned file or directory to be imported
into the repositorydstURL
- a URL-string that represents a repository location
where the path
will be importedcommitMessage
- a string to be a commit log messagerecursive
- this flag is relevant only when the path
is
a directory: if true then the entire directory
tree will be imported including all child directories, otherwise
only items located in the directory itself
SVNException
- if one of the following is true:
dstURL
is invalid
dstURL
already
exists
path
contains a reserved name - '.svn'
public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean useGlobalIgnores, boolean recursive) throws SVNException
dstURL
) contains any
non-existent parent directories they will be automatically created by the
server.
path
- a local unversioned file or directory to be imported
into the repositorydstURL
- a URL-string that represents a repository location
where the path
will be importedcommitMessage
- a string to be a commit log messageuseGlobalIgnores
- if true
then those paths that match global ignore patterns controlled
by a config options driver (see isIgnored()
)
will not be imported, otherwise global ignore patterns are not
usedrecursive
- this flag is relevant only when the path
is
a directory: if true then the entire directory
tree will be imported including all child directories, otherwise
only items located in the directory itself
SVNException
- if one of the following is true:
dstURL
is invalid
dstURL
already
exists
path
contains a reserved name - '.svn'
public SVNCommitInfo doCommit(File[] paths, boolean keepLocks, String commitMessage, boolean force, boolean recursive) throws SVNException
File
s) to the repository.
paths
- an array of local items which should be traversed
to commit changes they have to the repositorykeepLocks
- if true and there are local items that
were locked then the commit will left them locked,
otherwise the items will be unlocked after the commit
succeedscommitMessage
- a string to be a commit log messageforce
- true to force a non-recursive commit; if
recursive
is set to true the force
flag is ignoredrecursive
- relevant only for directory items: if true then
the entire directory tree will be committed including all child directories,
otherwise only items located in the directory itself
SVNException
doCommit(SVNCommitPacket, boolean, String)
public SVNCommitInfo doCommit(SVNCommitPacket commitPacket, boolean keepLocks, String commitMessage) throws SVNException
commitPacket
contains commit items (SVNCommitItem)
which represent local Working Copy items that were changed and are to be committed.
Commit items are gathered in a single SVNCommitPacket
by invoking doCollectCommitItems()
.
commitPacket
- a single object that contains items to be committedkeepLocks
- if true and there are local items that
were locked then the commit will left them locked,
otherwise the items will be unlocked after the commit
succeedscommitMessage
- a string to be a commit log message
SVNException
SVNCommitItem
public SVNCommitInfo[] doCommit(SVNCommitPacket[] commitPackets, boolean keepLocks, String commitMessage) throws SVNException
commitPackets
is an array of packets that contain commit items (SVNCommitItem)
which represent local Working Copy items that were changed and are to be committed.
Commit items are gathered in a single SVNCommitPacket
by invoking doCollectCommitItems()
.
This allows to commit separate trees of Working Copies "belonging" to different
repositories. One packet per one repository. If repositories are different (it means more than
one commit will be done), commitMessage
may be replaced by a commit handler
to be a specific one for each commit.
commitPackets
- logically grouped items to be committedkeepLocks
- if true and there are local items that
were locked then the commit will left them locked,
otherwise the items will be unlocked after the commit
succeedscommitMessage
- a string to be a commit log message
SVNException
public SVNCommitPacket doCollectCommitItems(File[] paths, boolean keepLocks, boolean force, boolean recursive) throws SVNException
doCommit()
.
paths
- an array of local items which should be traversed
to collect information on every changed item (one
SVNCommitItem per each
modified local item)keepLocks
- if true and there are local items that
were locked then these items will be left locked after
traversing all of them, otherwise the items will be unlockedforce
- forces collecting commit items for a non-recursive commitrecursive
- relevant only for directory items: if true then
the entire directory tree will be traversed including all child
directories, otherwise only items located in the directory itself
will be processed
SVNCommitPacket.EMPTY
is returned
SVNException
SVNCommitItem
public SVNCommitPacket[] doCollectCommitItems(File[] paths, boolean keepLocks, boolean force, boolean recursive, boolean combinePackets) throws SVNException
paths
- an array of local items which should be traversed
to collect information on every changed item (one
SVNCommitItem per each
modified local item)keepLocks
- if true and there are local items that
were locked then these items will be left locked after
traversing all of them, otherwise the items will be unlockedforce
- forces collecting commit items for a non-recursive commitrecursive
- relevant only for directory items: if true then
the entire directory tree will be traversed including all child
directories, otherwise only items located in the directory itself
will be processedcombinePackets
- if true then collected commit
packets will be joined into a single one, so that to be committed
in a single transaction
SVNException
SVNCommitItem
|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |