Package org.tmatesoft.svn.core.wc2
Class SvnCheckout
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<V>
-
- org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<java.lang.Long>
-
- org.tmatesoft.svn.core.wc2.SvnCheckout
-
- All Implemented Interfaces:
ISvnOperationOptionsProvider
public class SvnCheckout extends AbstractSvnUpdate<java.lang.Long>
Represents checkout operation. Checks out a working copy ofsourceat revision, looked up atSvnTarget.getPegRevision(), usingtargetas the root directory of the newly checked out working copy. If sourceSvnTarget.getPegRevision()> isSVNRevision.UNDEFINEDor invalid, then it defaults toSVNRevision.HEAD. Ifdepth isSVNDepth.INFINITY, checks out fully recursively. Else if it isSVNDepth.IMMEDIATES, checks out sourcetargetand its immediate entries (subdirectories will be present, but will be at depthSVNDepth.EMPTYthemselves); elseSVNDepth.FILES, checks out sourcetargetand its file entries, but no subdirectories; else ifSVNDepth.EMPTY, checks out sourcetargetas an empty directory at that depth, with no entries present. Ifdepth isSVNDepth.UNKNOWN, then behave as if forSVNDepth.INFINITY, except in the case of resuming a previous checkout oftarget(i.e., updating), in which case uses the depth of the existing working copy. If externals are ignored (ignoreExternalsistrue), doesn't process externals definitions as part of this operation. IfisAllowUnversionedObstructionsistruethen the checkout tolerates existing unversioned items that obstruct added paths from source target. Only obstructions of the same type (file or directory) as the added item are tolerated. The text of obstructing files is left as-is, effectively treating it as a user modification after the checkout. Working properties of obstructing items are set equal to the base properties. IfisAllowUnversionedObstructionsisfalsethen the checkout will abort if there are any unversioned obstructing items. If the caller'sISVNEventHandleris non-null, it is invoked as the checkout processes. AlsoISVNCanceller.checkCancelled()will be used at various places during the checkout to check whether the caller wants to stop the checkout. This operation requires repository access (in case the repository is not on the same machine, network connection is established).SvnOperation.run()method returns value of the revision actually checked out from the repository.SvnOperation.run()throwsSVNExceptionin the following cases:-
exception with
SVNErrorCode.UNSUPPORTED_FEATUREerror code - iftarget's URL refers to a file rather than a directory exception withSVNErrorCode.RA_ILLEGAL_URLerror code - iftarget's URL does not exist, or if external item at therevisiondoesn't exist, or if external item at therevisionis not file or a directory exception withSVNErrorCode.WC_OBSTRUCTED_UPDATEerror code - if the working copy item is already a working copy item for a different URL exception withSVNErrorCode.WC_NODE_KIND_CHANGEerror code - if local file is already exists with the same name that incoming added directory exception withSVNErrorCode.ENTRY_MISSING_URLerror code - if working copy item that has no URL- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnCheckout(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidensureArgumentsAreValid()SvnTargetgetSource()Gets a repository location from where a working copy will be checked out.intgetTargetWorkingCopyFormat()booleanisChangesWorkingCopy()Gets whether the operation changes working copyvoidsetSource(SvnTarget source)Sets a repository location from where a working copy will be checked out.voidsetTargetWorkingCopyFormat(int targetWorkingCopyFormat)-
Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnUpdate
getExternalsHandler, isAllowUnversionedObstructions, isIgnoreExternals, isUpdateLocksOnDemand, setAllowUnversionedObstructions, setExternalsHandler, setIgnoreExternals, setUpdateLocksOnDemand
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, initDefaults, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnCheckout
protected SvnCheckout(SvnOperationFactory factory)
-
-
Method Detail
-
getSource
public SvnTarget getSource()
Gets a repository location from where a working copy will be checked out.- Returns:
- source of repository
-
setSource
public void setSource(SvnTarget source)
Sets a repository location from where a working copy will be checked out.- Parameters:
source- source of repository
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException- Overrides:
ensureArgumentsAreValidin classSvnOperation<java.lang.Long>- Throws:
SVNException
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<java.lang.Long>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
setTargetWorkingCopyFormat
public void setTargetWorkingCopyFormat(int targetWorkingCopyFormat)
-
getTargetWorkingCopyFormat
public int getTargetWorkingCopyFormat()
-
-