|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.wc2.SvnOperation<V> org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<long[]> org.tmatesoft.svn.core.wc2.SvnUpdate
public class SvnUpdate
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.
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:
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
Constructor Summary | |
---|---|
protected |
SvnUpdate(SvnOperationFactory factory)
|
Method Summary | |
---|---|
protected void |
ensureArgumentsAreValid()
|
protected int |
getMaximumTargetsCount()
|
boolean |
isChangesWorkingCopy()
Gets whether the operation changes working copy |
boolean |
isDepthIsSticky()
Gets whether or not the requested depth should be written to the working copy. |
boolean |
isMakeParents()
Gets whether or not intermediate directories should be made. |
boolean |
isTreatAddsAsModifications()
Gets whether or not adds should be treated as modifications. |
void |
setDepthIsSticky(boolean depthIsSticky)
Sets whether or not the requested depth should be written to the working copy. |
void |
setMakeParents(boolean makeParents)
Sets whether or not intermediate directories should be made. |
void |
setTreatAddsAsModifications(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, setUpdateLocksOnDemand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SvnUpdate(SvnOperationFactory factory)
Method Detail |
---|
protected void ensureArgumentsAreValid() throws SVNException
ensureArgumentsAreValid
in class SvnOperation<long[]>
SVNException
public boolean isDepthIsSticky()
true
if the requested depth should be written to the working copy, otherwise false
public void setDepthIsSticky(boolean depthIsSticky)
depthIsSticky
- true
if the requested depth should be written to the working copy, otherwise false
public boolean isMakeParents()
true
if intermediate directories should be made, otherwise false
public void setMakeParents(boolean makeParents)
makeParents
- true
if intermediate directories should be made, otherwise false
public boolean isTreatAddsAsModifications()
true
if adds should be treated as modifications, otherwise false
public void setTreatAddsAsModifications(boolean treatAddsAsModifications)
treatAddsAsModifications
- true
if adds should be treated as modifications, otherwise false
protected int getMaximumTargetsCount()
getMaximumTargetsCount
in class SvnOperation<long[]>
public boolean isChangesWorkingCopy()
isChangesWorkingCopy
in class SvnOperation<long[]>
true
if the operation changes the working copy, otherwise false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |