Package org.tmatesoft.svn.core.wc2

# Class SvnCheckout

java.lang.Object
org.tmatesoft.svn.core.wc2.SvnOperation<V>
org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<Long>
org.tmatesoft.svn.core.wc2.SvnCheckout

All Implemented Interfaces:
  `ISvnOperationOptionsProvider`

public class SvnCheckout extends AbstractSvnUpdate<Long>
Represents checkout operation. Checks out a working copy of `source` at revision, looked up at `SvnTarget.getPegRevision()`, using `target` as the root directory of the newly checked out working copy.

If source `SvnTarget.getPegRevision()`> is `SVNRevision.UNDEFINED` or invalid, then it defaults to `SVNRevision.HEAD`.

If `depth</depth> is `SVNDepth.INFINITY`, checks out fully recursively. Else if it is `SVNDepth.IMMEDIATES`, checks out source `target` and its immediate entries (subdirectories will be present, but will be at depth `SVNDepth.EMPTY` themselves); else `SVNDepth.FILES`, checks out source `target` and its file entries, but no subdirectories; else if `SVNDepth.EMPTY`, checks out source `target` as an empty directory at that depth, with no entries present.

If `depth</depth> is `SVNDepth.UNKNOWN`, then behave as if for `SVNDepth.INFINITY`, except in the case of resuming a previous checkout of `target` (i.e., updating), in which case uses the depth of the existing working copy.

If externals are ignored (`ignoreExternals` is `true`), doesn't process externals definitions as part of this operation.

If `isAllowUnversionedObstructions` is `true` then 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. If `isAllowUnversionedObstructions` is `false` then the checkout will abort if there are any unversioned obstructing items.

If the caller's `ISVNEventHandler` is non-`null`, it is invoked as the checkout processes. Also `ISVNCanceller.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()` throws `SVNException` in the following cases:

exception with `SVNErrorCode.UNSUPPORTED_FEATURE` error code - if `target`'s URL refers to a file rather than a directory
exception with `SVNErrorCode.RA_ILLEGAL_URL` error code - if `target`'s URL does not exist, or if external item at the `revision` doesn't exist, or if external item at the `revision` is not file or a directory
exception with `SVNErrorCode.WC_OBSTRUCTED_UPDATE` error code - if the working copy item is already a working copy item for a different URL
exception with `SVNErrorCode.WC_NODE_KIND_CHANGE` error code - if local file is already exists with the same name that incoming added directory
exception with `SVNErrorCode.ENTRY_MISSING_URL` error code - if working copy item that has no URL

``

Version:
  1.7
Author:
  TMate Software Ltd.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`SvnCheckout(SvnOperationFactory factory)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`ensureArgumentsAreValid()`
`SvnTarget`
`getSource()`
Gets a repository location from where a working copy will be checked out.
`int`
`getTargetWorkingCopyFormat()`
`boolean`
`isChangesWorkingCopy()`
Gets whether the operation changes working copy
`void`
`setSource(SvnTarget source)`
Sets a repository location from where a working copy will be checked out.
`void`
`setTargetWorkingCopyFormat(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SvnCheckout

protected SvnCheckout(SvnOperationFactory factory)

## Method Details

### 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:
  `ensureArgumentsAreValid` in class `SvnOperation<Long>`
Throws:
  `SVNException`

### isChangesWorkingCopy

public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy

Overrides:
  `isChangesWorkingCopy` in class `SvnOperation<Long>`
Returns:
  `true` if the operation changes the working copy, otherwise `false`

### setTargetWorkingCopyFormat

public void setTargetWorkingCopyFormat(int targetWorkingCopyFormat)

### getTargetWorkingCopyFormat

public int getTargetWorkingCopyFormat()