Package org.tmatesoft.svn.core.wc
Interface ISVNAnnotateHandler
-
- All Known Implementing Classes:
SVNXMLAnnotateHandler
public interface ISVNAnnotateHandlerThe ISVNAnnotateHandler interface should be implemented to be further provided to SVNLogClient's doAnnotate() methods for processing annotation information per each text line.Here's an example code snippet:
import org.tmatesoft.svn.core.wc.ISVNAnnotateHandler; import org.tmatesoft.svn.core.wc.SVNLogClient; ... SVNLogClient logClient; ... logClient.doAnnotate(new File("path/to/WC/file"), SVNRevision.HEAD, SVNRevision.create(0), SVNRevision.HEAD, new ISVNAnnotateHandler(){ public void handleLine(Date date, long revision, String author, String line){ //implement this method as you wish, for example: System.out.println(revision + " " + author + " " + date + " " + line); } }); ...
- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
- See Also:
SVNLogClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidhandleEOF()Handles the EOF met after the document contents.voidhandleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line)Deprecated.voidhandleLine(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.booleanhandleRevision(java.util.Date date, long revision, java.lang.String author, java.io.File contents)Handles file information for a next revision.
-
-
-
Method Detail
-
handleLine
void handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line) throws SVNExceptionDeprecated.- Parameters:
date-revision-author-line-- Throws:
SVNException
-
handleLine
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 SVNExceptionHandles 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,mergedAuthorandmergedPathwill be set only if the corresponding methoddoAnnotateofSVNLogClientwas called withincludeMergedRevisionsset to true. Otherwise they are irrelevant. Note: if there is no blame information for this line,revisionwill be invalid andauthoranddatewill be null.- Parameters:
date- the time moment when changes tolinewere 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
boolean handleRevision(java.util.Date date, long revision, java.lang.String author, java.io.File contents) throws SVNExceptionHandles file information for a next revision. If this method returns true then file contents will be annotated forrevisionas well.- Parameters:
date- the time moment when changes tolinewere 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
void handleEOF() throws SVNExceptionHandles the EOF met after the document contents.- Throws:
SVNException- Since:
- 1.2.0
-
-