Package org.tmatesoft.svn.core.wc2
Class SvnUpdate
java.lang.Object
org.tmatesoft.svn.core.wc2.SvnOperation<long[]>
org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<long[]>
org.tmatesoft.svn.core.wc2.SvnUpdate
- All Implemented Interfaces:
ISvnOperationOptionsProvider
Represents update operation. Updates working copy to
revision.
If no revision is given, it brings working copy up-to-date with SVNRevision.HEAD revision.
Unversioned paths that are direct children of a versioned path will cause
an update that attempts to add that path, other unversioned paths are
skipped.
The targets can be from multiple working copies from
multiple repositories, but even if they all come from the same repository
there is no guarantee that revision represented by
SVNRevision.HEAD will remain the same as each path is updated.
If externals are ignored (ignoreExternals is true), doesn't process
externals definitions as part of this operation.
If depth is SVNDepth.INFINITY, updates fully
recursively. Else if it is SVNDepth.IMMEDIATES or
SVNDepth.FILES, updates each target and its file entries, but not
its subdirectories. Else if SVNDepth.EMPTY, updates exactly each
target, nonrecursively (essentially, updates the target's properties).
If depth is SVNDepth.UNKNOWN, takes the working
depth from paths and then behaves as described above.
If depthIsSticky is set and depth is not
SVNDepth.UNKNOWN, then in addition to updating paths
, also sets their sticky ambient depth value to depth.
If allowUnversionedObstructions is
true then the update tolerates existing
unversioned items that obstruct added paths. 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 update. Working properties of obstructing items
are set equal to the base properties. If
allowUnversionedObstructions is false
then the update will abort if there are
any unversioned obstructing items.
If the operation's ISVNEventHandler is non-null,
it is invoked for each item handled by
the update, and also for files restored from text-base. Also
ISVNCanceller.checkCancelled() will be used at various places
during the update to check whether the caller wants to stop the update.
This operation requires repository access (in case the repository is not
on the same machine, network connection is established).
SvnOperation.run() method returns an array of long revisions with each element set to
the revision to which revision was resolved.
SvnOperation.run() throws SVNException in the following cases:
-
exception with
SVNErrorCode.ILLEGAL_TARGET error code
- if target is not a local path
exception with SVNErrorCode.RA_ILLEGAL_URL error code
- 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.ENTRY_MISSING_URL error code
- if working copy item that has no URL
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected intbooleanGets whether the operation changes working copybooleanGets whether or not the requested depth should be written to the working copy.booleanGets whether or not intermediate directories should be made.booleanGets whether or not adds should be treated as modifications.voidsetDepthIsSticky(boolean depthIsSticky) Sets whether or not the requested depth should be written to the working copy.voidsetMakeParents(boolean makeParents) Sets whether or not intermediate directories should be made.voidsetTreatAddsAsModifications(boolean treatAddsAsModifications) Sets whether or not adds should be treated as modifications.Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnUpdate
getExternalsHandler, isAllowUnversionedObstructions, isIgnoreExternals, isUpdateLocksOnDemand, setAllowUnversionedObstructions, setExternalsHandler, setIgnoreExternals, setUpdateLocksOnDemandMethods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, initDefaults, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
Constructor Details
-
SvnUpdate
-
-
Method Details
-
ensureArgumentsAreValid
- Overrides:
ensureArgumentsAreValidin classSvnOperation<long[]>- Throws:
SVNException
-
isDepthIsSticky
public boolean isDepthIsSticky()Gets whether or not the requested depth should be written to the working copy.- Returns:
trueif the requested depth should be written to the working copy, otherwisefalse
-
setDepthIsSticky
public void setDepthIsSticky(boolean depthIsSticky) Sets whether or not the requested depth should be written to the working copy.- Parameters:
depthIsSticky-trueif the requested depth should be written to the working copy, otherwisefalse
-
isMakeParents
public boolean isMakeParents()Gets whether or not intermediate directories should be made.- Returns:
trueif intermediate directories should be made, otherwisefalse
-
setMakeParents
public void setMakeParents(boolean makeParents) Sets whether or not intermediate directories should be made.- Parameters:
makeParents-trueif intermediate directories should be made, otherwisefalse
-
isTreatAddsAsModifications
public boolean isTreatAddsAsModifications()Gets whether or not adds should be treated as modifications.- Returns:
trueif adds should be treated as modifications, otherwisefalse
-
setTreatAddsAsModifications
public void setTreatAddsAsModifications(boolean treatAddsAsModifications) Sets whether or not adds should be treated as modifications.- Parameters:
treatAddsAsModifications-trueif adds should be treated as modifications, otherwisefalse
-
getMaximumTargetsCount
protected int getMaximumTargetsCount()- Overrides:
getMaximumTargetsCountin classSvnOperation<long[]>
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<long[]>- Returns:
trueif the operation changes the working copy, otherwisefalse
-