Package org.tmatesoft.svn.core.wc2
Class SvnAnnotate
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<T>
-
- org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SvnAnnotateItem>
-
- org.tmatesoft.svn.core.wc2.SvnAnnotate
-
- All Implemented Interfaces:
ISvnObjectReceiver<SvnAnnotateItem>,ISvnOperationOptionsProvider
public class SvnAnnotate extends SvnReceivingOperation<SvnAnnotateItem>
Represents annotate operation. Obtains and reports annotation information for each line-blame item associated with revisionendRevisionoftarget, usingstartRevisionas the default source of all blame. Passes annotation information to a annotation handler if provided.Targetcan represent URL or working copy path (used to get corresponding URLs).Target'spegRevisionindicates in which revisiontargetis valid. IfpegRevisionisSVNRevision.UNDEFINED, then it defaults toSVNRevision.HEAD.-
If working copy is SVN 1.7 working copy:
If
endRevisionisSVNRevision.UNDEFINED, then it defaults toSVNRevision.HEADiftargetis URL orSVNRevision.WORKINGiftargetis working copy path. -
If working copy is SVN 1.6 working copy:
If
startRevisionisnullorinvalid, then it defaults to revision 1. IfendRevisionisnullorinvalid, then it defaults totarget'spegRevision.
SvnOperation.run()method returnsSvnAnnotateIteminformation reported by the operation.SvnOperation.run()throwsSVNExceptionin the following cases:-
exception with
SVNErrorCode.CLIENT_BAD_REVISIONerror code - ifstartRevisionis older thanendRevisionexception withSVNErrorCode.CLIENT_BAD_REVISIONerror code - if bothstartRevisionandendRevisionare eithernullorinvalidexception withSVNErrorCode.CLIENT_IS_BINARY_FILEerror code - if any of the revisions oftarget's path have a binary mime-type, unlessignoreMimeTypeistrue, in which case blame information will be generated regardless of the MIME types of the revisions exception withSVNErrorCode.UNSUPPORTED_FEATUREerror code - if eitherstartRevisionorendRevisionisSVNRevision.WORKING(for SVN 1.6 working copy only).- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnAnnotate(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SVNDiffOptionsgetDiffOptions()Gets diff options for the operation.SVNRevisiongetEndRevision()Gets the revision of the operation to end with.ISVNAnnotateHandlergetHandler()Gets the caller's handler to process annotation information.java.lang.StringgetInputEncoding()Gets the name of character set to decode input bytes.SVNRevisiongetStartRevision()Gets the revision of the operation to start from.booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisIgnoreMimeType()Gets whether or not operation should be run on all files treated as text, no matter what SVNKit has inferred from the mime-type property.booleanisUseMergeHistory()Gets whether or not data based upon revisions which have been merged to targets also should be returned.voidsetDiffOptions(SVNDiffOptions diffOptions)Sets diff options for the operation.voidsetEndRevision(SVNRevision endRevision)Sets the revision of the operation to end with.voidsetHandler(ISVNAnnotateHandler handler)Sets the caller's handler to process annotation information.voidsetIgnoreMimeType(boolean ignoreMimeType)Sets whether or not operation should be run on all files treated as text, no matter what SVNKit has inferred from the mime-type property.voidsetInputEncoding(java.lang.String inputEncoding)Sets the name of character set to decode input bytes.voidsetStartRevision(SVNRevision startRevision)Sets the revision of the operation to start from.voidsetUseMergeHistory(boolean useMergeHistory)Sets whether or not data based upon revisions which have been merged to targets also should be returned.-
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, ensureArgumentsAreValid, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnAnnotate
protected SvnAnnotate(SvnOperationFactory factory)
-
-
Method Detail
-
getHandler
public ISVNAnnotateHandler getHandler()
Gets the caller's handler to process annotation information.- Returns:
- handler to process annotation information if set
-
setHandler
public void setHandler(ISVNAnnotateHandler handler)
Sets the caller's handler to process annotation information.- Parameters:
handler- handler to process annotation information
-
isUseMergeHistory
public boolean isUseMergeHistory()
Gets whether or not data based upon revisions which have been merged to targets also should be returned.- Returns:
trueif merged history should be used, otherwisefalse
-
setUseMergeHistory
public void setUseMergeHistory(boolean useMergeHistory)
Sets whether or not data based upon revisions which have been merged to targets also should be returned.- Parameters:
useMergeHistory-trueif merged history should be use, otherwisefalse
-
isIgnoreMimeType
public boolean isIgnoreMimeType()
Gets whether or not operation should be run on all files treated as text, no matter what SVNKit has inferred from the mime-type property.- Returns:
trueif mime types should be ignored, otherwisefalse
-
setIgnoreMimeType
public void setIgnoreMimeType(boolean ignoreMimeType)
Sets whether or not operation should be run on all files treated as text, no matter what SVNKit has inferred from the mime-type property.- Parameters:
ignoreMimeType-trueif mime types should be ignored, otherwisefalse
-
getStartRevision
public SVNRevision getStartRevision()
Gets the revision of the operation to start from.- Returns:
- revision to start from
-
setStartRevision
public void setStartRevision(SVNRevision startRevision)
Sets the revision of the operation to start from.- Parameters:
startRevision- revision to start from
-
getEndRevision
public SVNRevision getEndRevision()
Gets the revision of the operation to end with.- Returns:
- revision to end with
-
setEndRevision
public void setEndRevision(SVNRevision endRevision)
Sets the revision of the operation to end with.- Parameters:
endRevision- revision to end with
-
getInputEncoding
public java.lang.String getInputEncoding()
Gets the name of character set to decode input bytes.- Returns:
- name of character set
-
setInputEncoding
public void setInputEncoding(java.lang.String inputEncoding)
Sets the name of character set to decode input bytes.- Parameters:
inputEncoding- name of character set
-
getDiffOptions
public SVNDiffOptions getDiffOptions()
Gets diff options for the operation.- Returns:
- diff options
-
setDiffOptions
public void setDiffOptions(SVNDiffOptions diffOptions)
Sets diff options for the operation.- Parameters:
diffOptions- diff options
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<SvnAnnotateItem>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-