| SVNKit Home | |
| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.tmatesoft.svn.core.wc.SVNBasicClientorg.tmatesoft.svn.core.wc.SVNMoveClientpublic class SVNMoveClientextends SVNBasicClientNested Class Summary |
Nested classes/interfaces inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient | |
SVNBasicClient.RepositoryReference, SVNBasicClient.SVNRepositoryLocation | |
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler | |
UNKNOWN | |
Constructor Summary | |
| |
| |
Method Summary | |
void |
|
void |
|
void |
|
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, sleepForTimeStamp | |
public SVNMoveClient(ISVNAuthenticationManager authManager, ISVNOptions options)
Constructs and initializes an SVNMoveClient object with the specified run-time configuration and authentication drivers. Ifoptionsis null, then this SVNMoveClient 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 onISVNOptionsandSVNWCUtil). IfauthManageris null, then this SVNMoveClient will be using a default authentication and network layers driver (seeSVNWCUtil.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).
- Parameters:
authManager- an authentication and network layers driveroptions- a run-time configuration options driver
public void doMove(File src,
File dst)
throws SVNExceptionMoves a source item to a destination one.dstshould not exist. Furher it's considered to be versioned if its parent directory is under version control, otherwisedstis considered to be unversioned. If bothsrcanddstare unversioned, then simply movessrctodstin the filesystem. Ifsrcis versioned butdstis not, then exportssrctodstin the filesystem and removessrcfrom version control. Ifdstis versioned butsrcis not, then movessrctodst(even ifdstis scheduled for deletion). If bothsrcanddstare versioned and located within the same Working Copy, then movessrctodst(even ifdstis scheduled for deletion), or tries to replacedstwithsrcif the former is missing and has a node kind different from the node kind of the source. Ifsrcis scheduled for addition with history,dstwill be set the same ancestor URL and revision from which the source was copied. Ifsrcanddstare located in different Working Copies, then this method copiessrctodst, tries to put the latter under version control and finally removessrc.
- Parameters:
src- a source pathdst- a destination path
- Throws:
SVNException- if one of the following is true:
dstalready existssrcdoes not exist
public void doVirtualCopy(File src,
File dst,
boolean move)
throws SVNExceptionCopies/moves administrative version control information of a source file to administrative information of a destination file. For example, if you have manually copied/moved a source file to a target one (manually means just in the filesystem, not using version control operations) and then would like to turn this copying/moving into a complete version control copy or move operation, use this method that will finish all the work for you - it will copy/move all the necessary administrative information (kept in the source .svn directory) to the target .svn directory. In that case when you have your files copied/moved in the filesystem, you can not perform standard (version control) copying/moving - since the target already exists and the source may be already deleted. Use this method to overcome that restriction.
- Parameters:
src- a source file path (was copied/moved todst)dst- a destination file pathmove- if true then completes movingsrctodst, otherwise completes copyingsrctodst
- Throws:
SVNException- if one of the following is true:
move =true andsrcstill existsdstdoes not existdstis a directorysrcis a directorysrcis not under version controldstis already under version control- if
srcis copied but not scheduled for addition, and SVNKit is not able to locate the copied directory root forsrc
public void undoMove(File src,
File dst)
throws SVNExceptionReverts a previous move operation back. Provided in pair withdoMove()and used to roll back move operations. In this casesrcis considered to be the target of the previsous move operation, anddstis regarded to be the source of that same operation which have been moved tosrcand now is to be restored.dstcould exist in that case if it has been a WC directory that was scheduled for deletion during the previous move operation. Furherdstis considered to be versioned if its parent directory is under version control, otherwisedstis considered to be unversioned. If bothsrcanddstare unversioned, then simply movessrcback todstin the filesystem. Ifsrcis versioned butdstis not, then unmovessrctodstin the filesystem and removessrcfrom version control. Ifdstis versioned butsrcis not, then first tries to make a revert ondst- if it has not been committed yet, it will be simply reverted. However in the casedsthas been already removed from the repository,srcwill be copied back todstand scheduled for addition. Thensrcis removed from the filesystem. If bothsrcanddstare versioned then the following situations are possible:then
- If
dstis still scheduled for deletion, then it is reverted back andsrcis scheduled for deletion.- in the case if
dstexists but is not scheduled for deletion,srcis cleanly exported todstand removed from version control.- if
dstandsrcare from different repositories (appear to be in different Working Copies), thensrcis copied todst(with schedulingdstfor addition, but not with history since copying is made in the filesystem only) and removed from version control.- if both
dstandsrcare in the same repository (appear to be located in the same Working Copy) and:- if
srcis scheduled for addition with history, then copiessrctodstspecifying the source ancestor's URL and revision (i.e. the ancestor of the source is the ancestor of the destination);- if
srcis already under version control, then copiessrctodstspecifying the source URL and revision as the ancestor (i.e.srcitself is the ancestor ofdst);- if
srcis just scheduled for addition (without history), then simply copiessrctodst(only in the filesystem, without history) and schedulesdstfor addition;srcis removed from version control.
- Parameters:
src- a source pathdst- a destination path
- Throws:
SVNException- ifsrcdoes not exist