| java.lang.Object org.tmatesoft.svn.core.SVNAnnotationGenerator
SVNAnnotationGenerator | public class SVNAnnotationGenerator implements ISVNFileRevisionHandler(Code) | | The SVNAnnotationGenerator class is used to annotate files - that is
to place author and revision information in-line for the specified
file.
Since SVNAnnotationGenerator implements ISVNFileRevisionHandler,
it is merely passed to a
org.tmatesoft.svn.core.io.SVNRepository.getFileRevisions(StringlonglongISVNFileRevisionHandler) getFileRevisions()
method of SVNRepository. After that you handle the resultant annotated
file line-by-line providing an ISVNAnnotateHandler implementation to the
SVNAnnotationGenerator.reportAnnotations(ISVNAnnotateHandler,String) reportAnnotations() method:
import org.tmatesoft.svn.core.SVNAnnotationGenerator;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.wc.SVNAnnotateHandler;
...
File tmpFile;
SVNRepository repos;
ISVNAnnotateHandler annotateHandler;
ISVNEventHandler cancelHandler;
long startRev = 0;
long endRev = 150;
...
SVNAnnotationGenerator generator = new SVNAnnotationGenerator(path, tmpFile, cancelHandler);
try {
repos.getFileRevisions("", startRev, endRev, generator);
generator.reportAnnotations(annotateHandler, null);
} finally {
generator.dispose();
}
...
version: 1.1.1 author: TMate Software Ltd. |
Constructor Summary | |
public | SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, ISVNEventHandler cancelBaton) Constructs an annotation generator object. | public | SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, boolean force, ISVNEventHandler cancelBaton) Constructs an annotation generator object. | public | SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, boolean force, SVNDiffOptions diffOptions, ISVNEventHandler cancelBaton) Constructs an annotation generator object. |
SVNAnnotationGenerator | public SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, ISVNEventHandler cancelBaton)(Code) | | Constructs an annotation generator object.
This constructor is equivalent to
SVNAnnotationGenerator(path, tmpDirectory, startRevision, false, cancelBaton) .
Parameters: path - a file path (relative to a repository location) Parameters: tmpDirectory - a revision to stop at Parameters: startRevision - a start revision to begin annotation with Parameters: cancelBaton - a baton which is used to check if an operation is cancelled |
SVNAnnotationGenerator | public SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, boolean force, ISVNEventHandler cancelBaton)(Code) | | Constructs an annotation generator object.
Parameters: path - a file path (relative to a repository location) Parameters: tmpDirectory - a revision to stop at Parameters: startRevision - a start revision to begin annotation with Parameters: force - forces binary files processing Parameters: cancelBaton - a baton which is used to check if an operation is cancelled |
SVNAnnotationGenerator | public SVNAnnotationGenerator(String path, File tmpDirectory, long startRevision, boolean force, SVNDiffOptions diffOptions, ISVNEventHandler cancelBaton)(Code) | | Constructs an annotation generator object.
Parameters: path - a file path (relative to a repository location) Parameters: tmpDirectory - a revision to stop at Parameters: startRevision - a start revision to begin annotation with Parameters: force - forces binary files processing Parameters: diffOptions - diff options Parameters: cancelBaton - a baton which is used to check if an operation is cancelled |
reportAnnotations | public void reportAnnotations(ISVNAnnotateHandler handler, String inputEncoding) throws SVNException(Code) | | Dispatches file lines along with author & revision info to the provided
annotation handler.
If inputEncoding is null then
"file.encoding" system property is used.
Parameters: handler - an annotation handler that processes file lines withauthor & revision info Parameters: inputEncoding - a desired character set (encoding) of text lines throws: SVNException - |
|
|