Package org.tmatesoft.svn.core.wc2
Class SvnScheduleForAddition
- All Implemented Interfaces:
ISvnOperationOptionsProvider
Represents add operation.
Schedules working copy
targets
for addition to the repository.
If depth
is SVNDepth.EMPTY
, adds just
targets
and nothing below it. If SVNDepth.FILES
, adds
targets
and any file children of targets
. If
SVNDepth.IMMEDIATES
, adds targets
, any file children,
and any immediate subdirectories (but nothing underneath those
subdirectories). If SVNDepth.INFINITY
, adds targets
and everything under it fully recursively.
targets
' parent must be under revision control already (unless
makeParents
is true
), but
targets
are not.
If force
is set, target
is a directory, depth
is
SVNDepth.INFINITY
, then schedules for addition unversioned files
and directories scattered deep within a versioned tree.
If includeIgnored
is false
,
doesn't add files or directories that match ignore patterns.
If makeParents
is true
,
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 with
SvnRevert
operation.
SvnOperation.run()
method throws SVNException
in the following cases:
-
exception with
SVNErrorCode.ENTRY_EXISTS
error
code - if force
is not set and a path is already
under version
exception with
SVNErrorCode.CLIENT_NO_VERSIONED_PARENT
error code -
if makeParents
is true
but no unversioned paths
stepping upper from a path are found- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns operation's add parameters, whose controls inconsistent EOL's.protected int
protected void
boolean
Returns whether to recurse up path's directory and look for a versioned directory.boolean
boolean
Gets whether the operation changes working copyboolean
isForce()
Returns whether to throw exceptions on already-versioned itemsboolean
Return whether to add files or directories that match ignore patterns.boolean
isMkDir()
Returns whether a directory attarget
's path also should be createdboolean
Gets whether or not to use parent working copy format.void
setAddParameters
(ISvnAddParameters addParameters) Sets operation's add parameters, whose controls inconsistent EOL's.void
setAddParents
(boolean addParents) Sets whether to recurse up path's directory and look for a versioned directory.void
setApplyAutoProperties
(boolean applyAutoProperties) void
setForce
(boolean force) Sets whether to throw exceptions on already-versioned itemsvoid
setIncludeIgnored
(boolean includeIgnored) Sets whether to add files or directories that match ignore patterns.void
setMkDir
(boolean mkDir) Sets whether a directory attarget
's path also should be createdMethods 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 Details
-
SvnScheduleForAddition
-
-
Method Details
-
initDefaults
protected void initDefaults()- Overrides:
initDefaults
in classSvnOperation<Void>
-
isForce
public boolean isForce()Returns whether to throw exceptions on already-versioned items- Returns:
true
if operation does not throw exceptions on already-versioned items,false
if exception should be thrown
-
isIncludeIgnored
public boolean isIncludeIgnored()Return whether to add files or directories that match ignore patterns.- Returns:
true
if 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:
true
if 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
-true
if operation does not throw exceptions on already-versioned items,false
if exception should be thrown
-
setIncludeIgnored
public void setIncludeIgnored(boolean includeIgnored) Sets whether to add files or directories that match ignore patterns.- Parameters:
includeIgnored
-true
if 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
-true
if 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:
getMaximumTargetsCount
in classSvnOperation<Void>
-
isUseParentWcFormat
public boolean isUseParentWcFormat()Description copied from class:SvnOperation
Gets whether or not to use parent working copy format.- Overrides:
isUseParentWcFormat
in classSvnOperation<Void>
- Returns:
true
if parent working copy format should be used, otherwisefalse
-
getAddParameters
Returns operation's add parameters, whose controls inconsistent EOL's.- Returns:
- add parameters of the operation
- See Also:
-
setAddParameters
Sets operation's add parameters, whose controls inconsistent EOL's.- Parameters:
addParameters
- add parameters of the operation- See Also:
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopy
in classSvnOperation<Void>
- Returns:
true
if the operation changes the working copy, otherwisefalse
-