Package org.tmatesoft.svn.cli.svn
Class SVNBlameCommand
- java.lang.Object
-
- org.tmatesoft.svn.cli.AbstractSVNCommand
-
- org.tmatesoft.svn.cli.svn.SVNCommand
-
- org.tmatesoft.svn.cli.svn.SVNXMLCommand
-
- org.tmatesoft.svn.cli.svn.SVNBlameCommand
-
- All Implemented Interfaces:
ISVNAnnotateHandler
public class SVNBlameCommand extends SVNXMLCommand implements ISVNAnnotateHandler
- Version:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuffer
myBuffer
private int
myCurrentLineNumber
-
Constructor Summary
Constructors Constructor Description SVNBlameCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsRevisionRange()
protected java.util.Collection
createSupportedOptions()
void
handleEOF()
Handles the EOF met after the document contents.void
handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line)
void
handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line, java.util.Date mergedDate, long mergedRevision, java.lang.String mergedAuthor, java.lang.String mergedPath, int lineNumber)
Handles per line annotation information - that is information about who last committed (changed) this line, the revision and timestamp when it was last committed.boolean
handleRevision(java.util.Date date, long revision, java.lang.String author, java.io.File contents)
Handles file information for a next revision.void
run()
-
Methods inherited from class org.tmatesoft.svn.cli.svn.SVNXMLCommand
addXMLProp, closeXMLTag, openCDataTag, openXMLTag, openXMLTag, printXMLFooter, printXMLHeader, printXMLPropHash
-
Methods inherited from class org.tmatesoft.svn.cli.svn.SVNCommand
getFileAmbigousErrorMessage, getGlobalOptions, getMessageAmbigousErrorMessage, getResourceBundleName, getSVNEnvironment, isCommitter
-
Methods inherited from class org.tmatesoft.svn.cli.AbstractSVNCommand
availableCommands, getAliases, getCommand, getDescription, getEnvironment, getName, getSupportedOptions, getValidOptions, init, isAlias, isFailed, isOptionSupported, registerCommand, setFailed
-
-
-
-
Method Detail
-
acceptsRevisionRange
public boolean acceptsRevisionRange()
- Overrides:
acceptsRevisionRange
in classSVNCommand
-
createSupportedOptions
protected java.util.Collection createSupportedOptions()
- Specified by:
createSupportedOptions
in classAbstractSVNCommand
-
run
public void run() throws SVNException
- Specified by:
run
in classAbstractSVNCommand
- Throws:
SVNException
-
handleLine
public void handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line) throws SVNException
- Specified by:
handleLine
in interfaceISVNAnnotateHandler
- Throws:
SVNException
-
handleLine
public void handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line, java.util.Date mergedDate, long mergedRevision, java.lang.String mergedAuthor, java.lang.String mergedPath, int lineNumber) throws SVNException
Description copied from interface:ISVNAnnotateHandler
Handles per line annotation information - that is information about who last committed (changed) this line, the revision and timestamp when it was last committed. ParametersmergedDate
,mergedRevision
,mergedAuthor
andmergedPath
will be set only if the corresponding methoddoAnnotate
ofSVNLogClient
was called withincludeMergedRevisions
set to true. Otherwise they are irrelevant. Note: if there is no blame information for this line,revision
will be invalid andauthor
anddate
will be null.- Specified by:
handleLine
in interfaceISVNAnnotateHandler
- Parameters:
date
- the time moment when changes toline
were committed to the repositoryrevision
- the revision the changes were committed toauthor
- the person who did those changesline
- a text line of the target file (on whichdoAnnotate()
was invoked)mergedDate
- date when merge changes occurredmergedRevision
- revision in which merge changes occurredmergedAuthor
- author of mergemergedPath
- absolute repository path of the merged filelineNumber
- number of the file line for which this information is annotated- Throws:
SVNException
-
handleRevision
public boolean handleRevision(java.util.Date date, long revision, java.lang.String author, java.io.File contents) throws SVNException
Description copied from interface:ISVNAnnotateHandler
Handles file information for a next revision. If this method returns true then file contents will be annotated forrevision
as well.- Specified by:
handleRevision
in interfaceISVNAnnotateHandler
- Parameters:
date
- the time moment when changes toline
were committed to the repositoryrevision
- the revision the changes were committed toauthor
- the person who did those changescontents
- temporary file with contents. This file shouldn't be used as persistent reference as it will be overwritten after this method exits and eventually deleted.- Returns:
- true to annotate the file for
revision
- Throws:
SVNException
-
handleEOF
public void handleEOF()
Description copied from interface:ISVNAnnotateHandler
Handles the EOF met after the document contents.- Specified by:
handleEOF
in interfaceISVNAnnotateHandler
-
-