public interface ISVNAnnotateHandler
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); } }); ...
SVNLogClient
Modifier and Type | Method and Description |
---|---|
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)
Deprecated.
|
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 handleLine(java.util.Date date, long revision, java.lang.String author, java.lang.String line) throws SVNException
handleLine(Date, long, String, String, Date, long, String, String, int)
insteaddate
- revision
- author
- line
- SVNException
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
mergedDate
, mergedRevision
, mergedAuthor
and
mergedPath
will be set only if the corresponding method doAnnotate
of
SVNLogClient
was called with includeMergedRevisions
set to true.
Otherwise they are irrelevant.
Note: if there is no blame information for this line, revision
will be
invalid and author
and date
will be null.date
- the time moment when changes to line
were commited
to the repositoryrevision
- the revision the changes were commited toauthor
- the person who did those changesline
- a text line of the target file (on which
doAnnotate()
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 annotatedSVNException
boolean handleRevision(java.util.Date date, long revision, java.lang.String author, java.io.File contents) throws SVNException
revision
as well.date
- the time moment when changes to line
were commited
to the repositoryrevision
- the revision the changes were commited 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.revision
SVNException
void handleEOF()
Copyright © 2004-2011 TMate Software Ltd. All Rights Reserved.