Package org.tmatesoft.svn.core.wc2
Class SvnScheduleForAddition
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<java.lang.Void>
-
- org.tmatesoft.svn.core.wc2.SvnScheduleForAddition
-
- All Implemented Interfaces:
ISvnOperationOptionsProvider
public class SvnScheduleForAddition extends SvnOperation<java.lang.Void>
Represents add operation. Schedules working copytargetsfor addition to the repository. IfdepthisSVNDepth.EMPTY, adds justtargetsand nothing below it. IfSVNDepth.FILES, addstargetsand any file children oftargets. IfSVNDepth.IMMEDIATES, addstargets, any file children, and any immediate subdirectories (but nothing underneath those subdirectories). IfSVNDepth.INFINITY, addstargetsand everything under it fully recursively.targets' parent must be under revision control already (unlessmakeParentsistrue), buttargetsare not. Ifforceis set,targetis a directory,depthisSVNDepth.INFINITY, then schedules for addition unversioned files and directories scattered deep within a versioned tree. IfincludeIgnoredisfalse, doesn't add files or directories that match ignore patterns. IfmakeParentsistrue, recurse up path's directory and look for a versioned directory. If found, add all intermediate paths between it and the path. Important: this is a *scheduling* operation. No changes will happen to the repository until a commit occurs. This scheduling can be removed withSvnRevertoperation.SvnOperation.run()method throwsSVNExceptionin the following cases:-
exception with
SVNErrorCode.ENTRY_EXISTSerror code - ifforceis not set and a path is already under version exception withSVNErrorCode.CLIENT_NO_VERSIONED_PARENTerror code - ifmakeParentsistruebut no unversioned paths stepping upper from a path are found- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnScheduleForAddition(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISvnAddParametersgetAddParameters()Returns operation's add parameters, whose controls inconsistent EOL's.protected intgetMaximumTargetsCount()protected voidinitDefaults()booleanisAddParents()Returns whether to recurse up path's directory and look for a versioned directory.booleanisApplyAutoProperties()booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisForce()Returns whether to throw exceptions on already-versioned itemsbooleanisIncludeIgnored()Return whether to add files or directories that match ignore patterns.booleanisMkDir()Returns whether a directory attarget's path also should be createdbooleanisUseParentWcFormat()Gets whether or not to use parent working copy format.voidsetAddParameters(ISvnAddParameters addParameters)Sets operation's add parameters, whose controls inconsistent EOL's.voidsetAddParents(boolean addParents)Sets whether to recurse up path's directory and look for a versioned directory.voidsetApplyAutoProperties(boolean applyAutoProperties)voidsetForce(boolean force)Sets whether to throw exceptions on already-versioned itemsvoidsetIncludeIgnored(boolean includeIgnored)Sets whether to add files or directories that match ignore patterns.voidsetMkDir(boolean mkDir)Sets whether a directory attarget's path also should be created-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureArgumentsAreValid, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnScheduleForAddition
protected SvnScheduleForAddition(SvnOperationFactory factory)
-
-
Method Detail
-
initDefaults
protected void initDefaults()
- Overrides:
initDefaultsin classSvnOperation<java.lang.Void>
-
isForce
public boolean isForce()
Returns whether to throw exceptions on already-versioned items- Returns:
trueif operation does not throw exceptions on already-versioned items,falseif exception should be thrown
-
isIncludeIgnored
public boolean isIncludeIgnored()
Return whether to add files or directories that match ignore patterns.- Returns:
trueif ignore patterns should not be applied to paths being added, otherwisefalse
-
isApplyAutoProperties
public boolean isApplyAutoProperties()
-
isAddParents
public boolean isAddParents()
Returns whether to recurse up path's directory and look for a versioned directory. If found, add all intermediate paths between it and the path.- Returns:
trueif operation should climb upper and schedule also all unversioned paths in the way
-
setForce
public void setForce(boolean force)
Sets whether to throw exceptions on already-versioned items- Parameters:
force-trueif operation does not throw exceptions on already-versioned items,falseif exception should be thrown
-
setIncludeIgnored
public void setIncludeIgnored(boolean includeIgnored)
Sets whether to add files or directories that match ignore patterns.- Parameters:
includeIgnored-trueif ignore patterns should not be applied to paths being added, otherwisefalse
-
setApplyAutoProperties
public void setApplyAutoProperties(boolean applyAutoProperties)
-
setAddParents
public void setAddParents(boolean addParents)
Sets whether to recurse up path's directory and look for a versioned directory. If found, add all intermediate paths between it and the path.- Parameters:
addParents-trueif operation should climb upper and schedule also all unversioned paths in the way
-
isMkDir
public boolean isMkDir()
Returns whether a directory attarget's path also should be created- Returns:
true, if a directory attarget's path also should be created
-
setMkDir
public void setMkDir(boolean mkDir)
Sets whether a directory attarget's path also should be created- Parameters:
mkDir-true, if a directory attarget's path also should be created
-
getMaximumTargetsCount
protected int getMaximumTargetsCount()
- Overrides:
getMaximumTargetsCountin classSvnOperation<java.lang.Void>
-
isUseParentWcFormat
public boolean isUseParentWcFormat()
Description copied from class:SvnOperationGets whether or not to use parent working copy format.- Overrides:
isUseParentWcFormatin classSvnOperation<java.lang.Void>- Returns:
trueif parent working copy format should be used, otherwisefalse
-
getAddParameters
public ISvnAddParameters getAddParameters()
Returns operation's add parameters, whose controls inconsistent EOL's.- Returns:
- add parameters of the operation
- See Also:
ISvnAddParameters
-
setAddParameters
public void setAddParameters(ISvnAddParameters addParameters)
Sets operation's add parameters, whose controls inconsistent EOL's.- Parameters:
addParameters- add parameters of the operation- See Also:
ISvnAddParameters
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<java.lang.Void>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-