Package org.tmatesoft.svn.core.wc2
Class SvnRevert
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<java.lang.Void>
-
- org.tmatesoft.svn.core.wc2.SvnRevert
-
- All Implemented Interfaces:
ISvnOperationOptionsProvider
public class SvnRevert extends SvnOperation<java.lang.Void>
Represents revert operation. Restores the pristine version of working copytargets
, effectively undoing any local mods. For each path intargets
, reverts it if it is a file. Else if it is a directory, reverts according todepth
: If depth isSVNDepth.EMPTY
, reverts just the properties on the directory; else ifSVNDepth.FILES
, reverts the properties and any files immediately under the directory; else ifSVNDepth.IMMEDIATES
, reverts all of the preceding plus properties on immediate subdirectories; else ifSVNDepth.INFINITY
, reverts path and everything under it fully recursively.changeLists
is a collection ofString
changelist names, used as a restrictive filter on items reverted; that is, doesn't revert any item unless it's a member of one of those changelists. IfchangeLists
is empty (ornull
), no changelist filtering occurs. If an item specified for reversion is not under version control, then does not fail with an exception, just invokesISVNEventHandler
using notification codeSVNEventAction.SKIP
.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
preserveModifiedCopies
private boolean
revertMissingDirectories
-
Constructor Summary
Constructors Modifier Constructor Description protected
SvnRevert(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
ensureArgumentsAreValid()
protected int
getMaximumTargetsCount()
boolean
isChangesWorkingCopy()
Gets whether the operation changes working copyboolean
isPreserveModifiedCopies()
boolean
isRevertMissingDirectories()
void
setPreserveModifiedCopies(boolean preserveModifiedCopies)
void
setRevertMissingDirectories(boolean revertMissingDirectories)
-
Methods 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 Detail
-
SvnRevert
protected SvnRevert(SvnOperationFactory factory)
-
-
Method Detail
-
isRevertMissingDirectories
public boolean isRevertMissingDirectories()
-
setRevertMissingDirectories
public void setRevertMissingDirectories(boolean revertMissingDirectories)
-
isPreserveModifiedCopies
public boolean isPreserveModifiedCopies()
-
setPreserveModifiedCopies
public void setPreserveModifiedCopies(boolean preserveModifiedCopies)
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException
- Overrides:
ensureArgumentsAreValid
in classSvnOperation<java.lang.Void>
- Throws:
SVNException
-
getMaximumTargetsCount
protected int getMaximumTargetsCount()
- Overrides:
getMaximumTargetsCount
in classSvnOperation<java.lang.Void>
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopy
in classSvnOperation<java.lang.Void>
- Returns:
true
if the operation changes the working copy, otherwisefalse
-
-