Package org.tmatesoft.svn.core.wc2
Class SvnAnnotate
java.lang.Object
org.tmatesoft.svn.core.wc2.SvnOperation<SvnAnnotateItem>
org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SvnAnnotateItem>
org.tmatesoft.svn.core.wc2.SvnAnnotate
- All Implemented Interfaces:
ISvnObjectReceiver<SvnAnnotateItem>
,ISvnOperationOptionsProvider
Represents annotate operation.
Obtains and reports annotation information for each line-blame item
associated with revision
endRevision
of target
, using
startRevision
as the default source of all blame.
Passes annotation information to a annotation handler if provided.
Target
can represent URL or working copy path (used to get corresponding URLs).
Target
's pegRevision
indicates in which revision target
is
valid. If pegRevision
is SVNRevision.UNDEFINED
, then
it defaults to SVNRevision.HEAD
.
-
If working copy is SVN 1.7 working copy:
If
endRevision
isSVNRevision.UNDEFINED
, then it defaults toSVNRevision.HEAD
iftarget
is URL orSVNRevision.WORKING
iftarget
is working copy path. -
If working copy is SVN 1.6 working copy:
If
startRevision
isnull
orinvalid
, then it defaults to revision 1. IfendRevision
isnull
orinvalid
, then it defaults totarget
'spegRevision
.
SvnOperation.run()
method returns SvnAnnotateItem
information reported by the operation.
SvnOperation.run()
throws SVNException
in the following cases:
-
exception with
SVNErrorCode.CLIENT_BAD_REVISION
error code
- if startRevision
is older than endRevision
exception with SVNErrorCode.CLIENT_BAD_REVISION
error code
- if both startRevision
and endRevision
are either null
or
invalid
exception with SVNErrorCode.CLIENT_IS_BINARY_FILE
error code
- if any of the revisions of target
's path have a binary
mime-type, unless ignoreMimeType
is true
, in which case blame
information will be generated regardless of the MIME types of
the revisions
exception with SVNErrorCode.UNSUPPORTED_FEATURE
error code -
if either startRevision
or endRevision
is SVNRevision.WORKING
(for SVN 1.6 working copy only).
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets diff options for the operation.Gets the revision of the operation to end with.Gets the caller's handler to process annotation information.Gets the name of character set to decode input bytes.Gets the revision of the operation to start from.boolean
Gets whether the operation changes working copyboolean
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.boolean
Gets whether or not data based upon revisions which have been merged to targets also should be returned.void
setDiffOptions
(SVNDiffOptions diffOptions) Sets diff options for the operation.void
setEndRevision
(SVNRevision endRevision) Sets the revision of the operation to end with.void
setHandler
(ISVNAnnotateHandler handler) Sets the caller's handler to process annotation information.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.void
setInputEncoding
(String inputEncoding) Sets the name of character set to decode input bytes.void
setStartRevision
(SVNRevision startRevision) Sets the revision of the operation to start from.void
setUseMergeHistory
(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 Details
-
SvnAnnotate
-
-
Method Details
-
getHandler
Gets the caller's handler to process annotation information.- Returns:
- handler to process annotation information if set
-
setHandler
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:
true
if 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
-true
if 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:
true
if 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
-true
if mime types should be ignored, otherwisefalse
-
getStartRevision
Gets the revision of the operation to start from.- Returns:
- revision to start from
-
setStartRevision
Sets the revision of the operation to start from.- Parameters:
startRevision
- revision to start from
-
getEndRevision
Gets the revision of the operation to end with.- Returns:
- revision to end with
-
setEndRevision
Sets the revision of the operation to end with.- Parameters:
endRevision
- revision to end with
-
getInputEncoding
Gets the name of character set to decode input bytes.- Returns:
- name of character set
-
setInputEncoding
Sets the name of character set to decode input bytes.- Parameters:
inputEncoding
- name of character set
-
getDiffOptions
Gets diff options for the operation.- Returns:
- diff options
-
setDiffOptions
Sets diff options for the operation.- Parameters:
diffOptions
- diff options
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopy
in classSvnOperation<SvnAnnotateItem>
- Returns:
true
if the operation changes the working copy, otherwisefalse
-