|
JavaSVN 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.SVNCopyClient
The SVNCopyClient provides methods to perform any kinds of copying and moving that SVN supports - operating on both Working Copies (WC) and URLs.
Copy operations allow a user to copy versioned files and directories with all their previous history in several ways.
Supported copy operations are:
Besides just copying SVNCopyClient also is able to move a versioned item - that is first making a copy of the source item and then scheduling the source item for deletion when operating on a Working Copy, or right committing the deletion of the source item when operating immediately on the repository.
Supported move operations are:
Overloaded doCopy() methods of SVNCopyClient are similar to
'svn copy' and 'svn move' commands of the SVN command line client.
| 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 |
| Constructor Summary | |
|
SVNCopyClient(ISVNAuthenticationManager authManager,
ISVNOptions options)
Constructs and initializes an SVNCopyClient object with the specified run-time configuration and authentication drivers. |
protected |
SVNCopyClient(ISVNRepositoryPool repositoryPool,
ISVNOptions options)
|
| Method Summary | |
void |
doCopy(File srcPath,
SVNRevision srcRevision,
File dstPath,
boolean force,
boolean isMove)
Copies/moves a source Working Copy path to a destination Working Copy path. |
SVNCommitInfo |
doCopy(File srcPath,
SVNRevision srcRevision,
SVNURL dstURL,
String commitMessage)
Copies a source Working Copy path (or its repository location URL) to a destination URL immediately committing changes to a repository. |
long |
doCopy(SVNURL srcURL,
SVNRevision srcRevision,
File dstPath)
Copies a source URL to a destination Working Copy path. |
SVNCommitInfo |
doCopy(SVNURL srcURL,
SVNRevision srcRevision,
SVNURL dstURL,
boolean isMove,
String commitMessage)
Copies/moves a source URL to a destination one immediately committing changes to a 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. |
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. |
| Methods inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
checkCancelled, createRepository, createRepository, createRepository, createWCAccess, createWCAccess, dispatchEvent, dispatchEvent, getEventDispatcher, getLocations, getOptions, getRepositoryPool, getRevisionNumber, getURL, handleEvent, isIgnoreExternals, isLeaveConflictsUnresolved, setEventHandler, setEventPathPrefix, setIgnoreExternals, setLeaveConflictsUnresolved, sleepForTimeStamp |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SVNCopyClient(ISVNAuthenticationManager authManager,
ISVNOptions options)
If options is null,
then this SVNCopyClient 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 SVNCopyClient 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 driver
protected SVNCopyClient(ISVNRepositoryPool repositoryPool,
ISVNOptions options)
| Method Detail |
public void setCommitHandler(ISVNCommitHandler handler)
If using SVNCopyClient 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(),
SVNCommitItempublic ISVNCommitHandler getCommitHandler()
setCommitHandler(ISVNCommitHandler),
DefaultSVNCommitHandler
public SVNCommitInfo doCopy(SVNURL srcURL,
SVNRevision srcRevision,
SVNURL dstURL,
boolean isMove,
String commitMessage)
throws SVNException
srcURL - a source repository location URLsrcRevision - a revision of srcURLdstURL - a target URL where srcURL is to be
copied/movedisMove - true to move the source
to the target (only URL-to-URL),
false to copycommitMessage - a commit log message
SVNException - if one of the following is true:
srcURL and dstURL are not in the
same repository
srcURL was not found in srcRevision
dstURL already exists
isMove = true and
dstURL = srcURL
public SVNCommitInfo doCopy(File srcPath,
SVNRevision srcRevision,
SVNURL dstURL,
String commitMessage)
throws SVNException
If srcRevision is not SVNRevision.WORKING then the repository
location URL of srcPath is copied to dstURL. Otherwise
srcPath itself.
srcPath - a source Working Copy pathsrcRevision - a revision of srcPathdstURL - a target URL where srcPath is to be
copiedcommitMessage - a commit log message
SVNException - if one of the following is true:
srcPath is not under version control
srcPath has no URL
srcPath was not
found in srcRevision
dstURL already exists
public long doCopy(SVNURL srcURL,
SVNRevision srcRevision,
File dstPath)
throws SVNException
dstPath will be automatically scheduled for addition with history.
srcURL - a source URLsrcRevision - a revision of srcURLdstPath - a destination WC path
SVNException - if one of the following is true:
srcURL was not found in srcRevision
dstPath already exists
dstPath appears in srcURL
dstPath and srcURL are from
different repositories
dstPath is under version control but missing
public void doCopy(File srcPath,
SVNRevision srcRevision,
File dstPath,
boolean force,
boolean isMove)
throws SVNException
If srcRevision is not SVNRevision.WORKING and
isMove = false, then the repository
location URL of srcPath is copied to dstPath. Otherwise
srcPath itself.
dstPath will be automatically scheduled for addition with history.
srcPath - a source WC pathsrcRevision - a revision of srcPathdstPath - a destination WC pathforce - true to force the operation
to runisMove - true to move the source
to the target (only WC-to-WC),
false to copy
SVNException - if one of the following is true:
dstPath already exists and is in the way
containing an item with the same name as the source
srcPath is not under version control
srcPath does not exist
srcPath has no URL
dstPath is a child of srcPath
dstPath is scheduled for deletion
isMove = true and
dstURL = srcURL
|
JavaSVN Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||