/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, inputEncoding)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @param inputEncoding a desired character set (encoding) of text lines * @throws SVNException * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, inputEncoding); }
/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, inputEncoding)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @param inputEncoding a desired character set (encoding) of text lines * @throws SVNException * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, inputEncoding); }
/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, null)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, null); }
/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, null)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, false, false, handler, null); }
/** * Obtains annotation information for each file text line from a repository * (using a Working Copy path to get a corresponding URL) and passes it to a * provided annotation handler. * * <p/> * This method is equivalent to a call to * <code>doAnnotate(path, pegRevision, startRevision, endRevision, false, false, handler, null)</code>. * * @param path a WC file item to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(File, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(File path, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(path, pegRevision, startRevision, endRevision, false, false, handler, null); }
/** * Obtains annotation information for each file text line from a repository * (using a Working Copy path to get a corresponding URL) and passes it to a * provided annotation handler. * * <p/> * This method is equivalent to a call to * <code>doAnnotate(path, pegRevision, startRevision, endRevision, false, false, handler, null)</code>. * * @param path a WC file item to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(File, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) */ public void doAnnotate(File path, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(path, pegRevision, startRevision, endRevision, false, false, handler, null); }
/** * Obtains annotation information for each file text line from a repository and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, inputEncoding)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param ignoreMimeType forces operation to run (all files to be treated as * text, no matter what SVNKit has inferred from the mime-type * property) * @param handler a caller's handler to process annotation information * @param inputEncoding a desired character set (encoding) of text lines * @throws SVNException * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) * @since 1.1 */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, boolean ignoreMimeType, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, inputEncoding); }
/** * Obtains annotation information for each file text line from a repository and passes it to a provided annotation handler. * * <p> * This method is equivalent to a call to <code>doAnnotate(url, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, inputEncoding)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param ignoreMimeType forces operation to run (all files to be treated as * text, no matter what SVNKit has inferred from the mime-type * property) * @param handler a caller's handler to process annotation information * @param inputEncoding a desired character set (encoding) of text lines * @throws SVNException * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) * @since 1.1 */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, boolean ignoreMimeType, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, inputEncoding); }
/** * Obtains annotation information for each file text line from a repository * (using a Working Copy path to get a corresponding URL) and passes it to a * provided annotation handler. * * <p/> * This method is equivalent to a call to * <code>doAnnotate(path, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, null)</code>. * * @param path a WC file item to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param ignoreMimeType forces operation to run (all files to be treated as * text, no matter what SVNKit has inferred from the mime-type * property) * @param handler a caller's handler to process annotation information * @throws SVNException * @see #doAnnotate(File, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) * @since 1.1 */ public void doAnnotate(File path, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, boolean ignoreMimeType, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(path, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, null); }
/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * If <code>startRevision</code> is invalid (for example, * <code>startRevision = </code>{@link SVNRevision#UNDEFINED UNDEFINED}) then * it's set to revision 1. * * <p> * Calling this method is equivalent to * <code>doAnnotate(url, pegRevision, startRevision, endRevision, handler, null)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(File, SVNRevision, SVNRevision, SVNRevision, ISVNAnnotateHandler) */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, handler, null); }
/** * Obtains annotation information for each file text line from a repository * and passes it to a provided annotation handler. * * <p> * If <code>startRevision</code> is invalid (for example, * <code>startRevision = </code>{@link SVNRevision#UNDEFINED UNDEFINED}) then * it's set to revision 1. * * <p> * Calling this method is equivalent to * <code>doAnnotate(url, pegRevision, startRevision, endRevision, false, handler, inputEncoding)</code>. * * @param url a URL of a text file that is to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @param inputEncoding a desired character set (encoding) of text lines * @throws SVNException */ public void doAnnotate(SVNURL url, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler, String inputEncoding) throws SVNException { doAnnotate(url, pegRevision, startRevision, endRevision, false, handler, inputEncoding); }
/** * Obtains annotation information for each file text line from a repository * (using a Working Copy path to get a corresponding URL) and passes it to a * provided annotation handler. * * <p> * If <code>startRevision</code> is invalid (for example, * <code>startRevision = </code>{@link SVNRevision#UNDEFINED UNDEFINED}) then * it's set to revision 1. * * <p> * Calling this method is equivalent to * <code>doAnnotate(path, pegRevision, startRevision, endRevision, false, handler)</code>. * * @param path a WC file item to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param handler a caller's handler to process annotation information * @throws SVNException if <code>startRevision > endRevision</code> * @see #doAnnotate(SVNURL, SVNRevision, SVNRevision, SVNRevision, ISVNAnnotateHandler) */ public void doAnnotate(File path, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(path, pegRevision, startRevision, endRevision, false, handler); }
/** * Obtains annotation information for each file text line from a repository * (using a Working Copy path to get a corresponding URL) and passes it to a * provided annotation handler. * * <p/> * This method is equivalent to a call to * <code>doAnnotate(path, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, null)</code>. * * @param path a WC file item to be annotated * @param pegRevision a revision in which <code>path</code> is first looked up * in the repository * @param startRevision a revision for an operation to start from * @param endRevision a revision for an operation to stop at * @param ignoreMimeType forces operation to run (all files to be treated as * text, no matter what SVNKit has inferred from the mime-type * property) * @param handler a caller's handler to process annotation information * @throws SVNException * @see #doAnnotate(File, SVNRevision, SVNRevision, SVNRevision, boolean, boolean, ISVNAnnotateHandler, String) * @since 1.1 */ public void doAnnotate(File path, SVNRevision pegRevision, SVNRevision startRevision, SVNRevision endRevision, boolean ignoreMimeType, ISVNAnnotateHandler handler) throws SVNException { doAnnotate(path, pegRevision, startRevision, endRevision, ignoreMimeType, false, handler, null); }
/** * @param clientManager * @param file * @since 1.10 */ public static void blame( SVNClientManager clientManager, File file, ISVNAnnotateHandler handler ) throws SVNException { clientManager.getLogClient().doAnnotate( file, SVNRevision.UNDEFINED, SVNRevision.create( 1 ), SVNRevision.HEAD, true, false, handler, null ); }
@Override @Deprecated public String blame(String file, String currentCommit, Integer line) { try { SVNURL url = SVNURL.parseURIEncoded(path + File.separator + file); ISVNAuthenticationManager authManager = getAuthenticationManager(); SVNLogClient logClient = SVNClientManager.newInstance(null, authManager).getLogClient(); boolean ignoreMimeType = false; boolean includeMergedRevisions = false; logClient.doAnnotate(url, SVNRevision.UNDEFINED, SVNRevision.create(Integer.parseInt(currentCommit)), SVNRevision.HEAD, ignoreMimeType, includeMergedRevisions, null, null); return String.valueOf(SVNRevision.create(Integer.parseInt(currentCommit)).getNumber()); } catch (SVNException e) { throw new RuntimeException(e); } }
public void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, final BlameCallback callback) throws ClientException { SVNLogClient client = getSVNLogClient(); ISVNAnnotateHandler handler = new ISVNAnnotateHandler(){ public void handleLine(Date date, long revision, String author, String line) { if(callback!=null){ callback.singleLine(date, revision, author, line); } } }; try { if(isURL(path)){ client.doAnnotate(SVNURL.parseURIEncoded(path), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), handler); }else{ client.doAnnotate(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), handler); } } catch (SVNException e) { throwException(e); } }
private void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, ISVNAnnotateHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(path)) { client.doAnnotate(SVNURL.parseURIEncoded(path), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } else { client.doAnnotate(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
private void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, ISVNAnnotateHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(path)) { client.doAnnotate(SVNURL.parseURIEncoded(path), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } else { client.doAnnotate(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
private void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, ISVNAnnotateHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(path)) { client.doAnnotate(SVNURL.parseURIEncoded(path), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } else { client.doAnnotate(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revisionStart), JavaHLObjectFactory.getSVNRevision(revisionEnd), ignoreMimeType, includeMergedRevisions, handler, null); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
SVNLogClient svnLogClient = new SVNLogClient(svnManager, null); svnLogClient.doAnnotate(svnurl, SVNRevision.UNDEFINED, SVNRevision.create(1l), endRevision, new SvnBlameHandler(svnRepository, path,