Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNAnnotationGenerator


        revision == SVNRevision.PREVIOUS;
    }
   
    private void doAnnotate(String path, long startRev, File tmpFile, SVNRepository repos, long endRev, boolean ignoreMimeType,
            ISVNAnnotateHandler handler, String inputEncoding, boolean includeMergedRevisions) throws SVNException {
        SVNAnnotationGenerator generator = new SVNAnnotationGenerator(path, tmpFile, startRev, ignoreMimeType, includeMergedRevisions,
                getDiffOptions(), inputEncoding, handler, this);
       
       
        // always spool HTTP response for non-standard annotation handlers.
        boolean useSpool = handler != null && !handler.getClass().getName().startsWith("org.tmatesoft.svn.");
        boolean oldSpool = false;
       
        if (useSpool && repos instanceof DAVRepository) {
            oldSpool = ((DAVRepository) repos).isSpoolResponse();
            ((DAVRepository) repos).setSpoolResponse(true);
        }
        try {
            repos.getFileRevisions("", startRev > 0 ? startRev - 1 : startRev,
                                   endRev, includeMergedRevisions, generator);
            if (!generator.isLastRevisionReported()) {
                generator.reportAnnotations(handler, inputEncoding);
            }
        } finally {
            if (useSpool && repos instanceof DAVRepository) {
                ((DAVRepository) repos).setSpoolResponse(oldSpool);
            }
            generator.dispose();
            SVNFileUtil.deleteAll(tmpFile, !"text-base".equals(tmpFile.getName()), null);
        }
    }
View Full Code Here


      File tmpFile = SVNFileUtil.createTempDirectory("annotate");
      doAnnotate(repos.getLocation().toDecodedString(), startRev, tmpFile, repos, endRev, force, handler, inputEncoding);
  }

    private void doAnnotate(String path, long startRev, File tmpFile, SVNRepository repos, long endRev, boolean force, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException {
        SVNAnnotationGenerator generator = new SVNAnnotationGenerator(path, tmpFile, startRev, force, getDiffOptions(), this);
        try {
            repos.getFileRevisions("", startRev > 0 ? startRev - 1 : startRev, endRev, generator);
            generator.reportAnnotations(handler, inputEncoding);
        } finally {
            generator.dispose();
            SVNFileUtil.deleteAll(tmpFile, !"text-base".equals(tmpFile.getName()), null);
        }
    }
View Full Code Here

        doList(url, pegRevision, revision, false, recursive, handler);
    }

    private void doAnnotate(String path, long startRev, File tmpFile, SVNRepository repos, long endRev, boolean ignoreMimeType,
            ISVNAnnotateHandler handler, String inputEncoding, boolean includeMergedRevisions) throws SVNException {
        SVNAnnotationGenerator generator = new SVNAnnotationGenerator(path, tmpFile, startRev, ignoreMimeType, includeMergedRevisions,
                getDiffOptions(), inputEncoding, handler, this);
       
       
        // always spool HTTP response for non-standard annotation handlers.
        boolean useSpool = handler != null && !handler.getClass().getName().startsWith("org.tmatesoft.svn.");
        boolean oldSpool = false;
       
        if (useSpool && repos instanceof DAVRepository) {
            oldSpool = ((DAVRepository) repos).isSpoolResponse();
            ((DAVRepository) repos).setSpoolResponse(true);
        }
        try {
            repos.getFileRevisions("", startRev > 0 ? startRev - 1 : startRev,
                                   endRev, includeMergedRevisions, generator);
            if (!generator.isLastRevisionReported()) {
                generator.reportAnnotations(handler, inputEncoding);
            }
        } finally {
            if (useSpool && repos instanceof DAVRepository) {
                ((DAVRepository) repos).setSpoolResponse(oldSpool);
            }
            generator.dispose();
            SVNFileUtil.deleteAll(tmpFile, !"text-base".equals(tmpFile.getName()), null);
        }
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNAnnotationGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.