Package org.tmatesoft.svn.core.wc2
Class SvnDiffSummarize
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<T>
-
- org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SvnDiffStatus>
-
- org.tmatesoft.svn.core.wc2.SvnDiffSummarize
-
- All Implemented Interfaces:
ISvnObjectReceiver<SvnDiffStatus>,ISvnOperationOptionsProvider
public class SvnDiffSummarize extends SvnReceivingOperation<SvnDiffStatus>
Produces a diff summary which lists the changed items betweensourcein itspegRevision, as it changed betweenstartRevisionandendRevision, or diff summary betweenfirstSourceat itspegRevisionandsecondSourceat itspegRevision. Changes are produced without creating text deltas.-
If it is diff between
startRevisionandendRevisionof onesource:Sourcecan be either working copy path or URL. IfpegRevisionisinvalid, behaves identically to diff between two sources, usingsource's path for both sources. -
If it is diff between first
sourceand secondsource: First and secondsourcescan be either working copy path or URL. Bothsourcesmust represent the same node kind -- that is, if firstsourceis a directory, secondsourcesmust also be, and if firstsourcesis a file, secondsourcesmust also be.
ignoreAncestryisfalse, since a file might have been modified between two revisions, but still have the same contents. IfdepthisSVNDepth.INFINITY, diffs fully recursively. Else if it isSVNDepth.IMMEDIATES, diffs the named paths and their file children (if any), and diffs properties of subdirectories, but does not descend further into the subdirectories. Else ifSVNDepth.FILES, behaves as if forSVNDepth.IMMEDIATESexcept doesn't diff properties of subdirectories. IfSVNDepth.EMPTY, diffs exactly the named paths but nothing underneath them.SvnOperation.run()method throwsSVNExceptionin the following cases:-
exception with
SVNErrorCode.CLIENT_BAD_REVISIONerror code - if eitherstartRevisionorendRevisionisinvalidexception withSVNErrorCode.UNSUPPORTED_FEATUREerror code - if either ofstartRevisionor endRevision is eitherSVNRevision.WORKINGorSVNRevision.BASE- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private SVNRevisionendRevisionprivate SvnTargetfirstSourceprivate booleanignoreAncestryprivate SvnTargetsecondSourceprivate SvnTargetsourceprivate SVNRevisionstartRevision
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnDiffSummarize(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidensureArgumentsAreValid()private voidensureArgumentsAreValid(SVNURL url1, java.io.File path1, SVNRevision revision1, SVNURL url2, java.io.File path2, SVNRevision revision2, SVNRevision pegRevision)private voidensureRevisionIsValid(SVNRevision revision)SVNRevisiongetEndRevision()SvnTargetgetFirstSource()protected java.io.FilegetOperationalWorkingCopy()SvnTargetgetSecondSource()SvnTargetgetSource()Gets the diff'ssourcewith start and end revisions for one-target type of operation.SVNRevisiongetStartRevision()booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisIgnoreAncestry()voidsetIgnoreAncestry(boolean ignoreAncestry)voidsetSource(SvnTarget source, SVNRevision start, SVNRevision end)Sets the diff'ssourcewith start and end revisions for one-source type of operation.voidsetSources(SvnTarget source1, SvnTarget source2)Sets both diff'ssources.-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation
first, getReceiver, initDefaults, last, receive, run, setReceiver
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Field Detail
-
firstSource
private SvnTarget firstSource
-
secondSource
private SvnTarget secondSource
-
source
private SvnTarget source
-
startRevision
private SVNRevision startRevision
-
endRevision
private SVNRevision endRevision
-
ignoreAncestry
private boolean ignoreAncestry
-
-
Constructor Detail
-
SvnDiffSummarize
protected SvnDiffSummarize(SvnOperationFactory factory)
-
-
Method Detail
-
setSource
public void setSource(SvnTarget source, SVNRevision start, SVNRevision end)
Sets the diff'ssourcewith start and end revisions for one-source type of operation.- Parameters:
source- source of the diffstart- start revision of the diffend- end revision of the diff
-
setSources
public void setSources(SvnTarget source1, SvnTarget source2)
Sets both diff'ssources.- Parameters:
source1- first source of the diffsource2- second source of the diff
-
getSource
public SvnTarget getSource()
Gets the diff'ssourcewith start and end revisions for one-target type of operation.- Returns:
- source of the diff
-
getStartRevision
public SVNRevision getStartRevision()
-
getEndRevision
public SVNRevision getEndRevision()
-
getFirstSource
public SvnTarget getFirstSource()
-
getSecondSource
public SvnTarget getSecondSource()
-
isIgnoreAncestry
public boolean isIgnoreAncestry()
-
setIgnoreAncestry
public void setIgnoreAncestry(boolean ignoreAncestry)
-
getOperationalWorkingCopy
protected java.io.File getOperationalWorkingCopy()
- Overrides:
getOperationalWorkingCopyin classSvnOperation<SvnDiffStatus>
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException- Overrides:
ensureArgumentsAreValidin classSvnOperation<SvnDiffStatus>- Throws:
SVNException
-
ensureArgumentsAreValid
private void ensureArgumentsAreValid(SVNURL url1, java.io.File path1, SVNRevision revision1, SVNURL url2, java.io.File path2, SVNRevision revision2, SVNRevision pegRevision) throws SVNException
- Throws:
SVNException
-
ensureRevisionIsValid
private void ensureRevisionIsValid(SVNRevision revision) throws SVNException
- Throws:
SVNException
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<SvnDiffStatus>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-