doLog(url, paths, pegRevision, startRevision, endRevision, stopOnCopy, discoverChangedPaths, false, limit, null, handler);
/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @see #doList(File, SVNRevision, SVNRevision, boolean, ISVNDirEntryHandler) */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, false, recursive, handler); }
/** * 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); }
SVNRepository repos = createRepository(url, null, pegRevision, revision, pegRev); if (pegRev[0] < 0) { pegRev[0] = getRevisionNumber(revision, repos, null); doList(repos, pegRev[0], handler, fetchLocks, recursive);
/** * Returns an instance of the {@link SVNLogClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNLogClient</b> instance */ public SVNLogClient getLogClient() { if (myLogClient == null) { myLogClient = new SVNLogClient(this, myOptions); myLogClient.setEventHandler(myEventHandler); myLogClient.setDebugLog(getDebugLog()); myLogClient.setIgnoreExternals(myIsIgnoreExternals); } return myLogClient; }
/** * Returns an instance of the {@link SVNLogClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNLogClient</b> instance */ public SVNLogClient getLogClient() { if (myLogClient == null) { myLogClient = new SVNLogClient(this, myOptions); myLogClient.setEventHandler(myEventHandler); myLogClient.setDebugLog(getDebugLog()); } return myLogClient; }
private void dumpRepositoryContents() throws SVNException { System.out.println("Repository contents:"); SVNURL repoURL = SVNURL.parseURIEncoded( "svn://localhost/"); SVNLogClient logClient = new SVNLogClient((ISVNAuthenticationManager)null, null); logClient.doList(repoURL, SVNRevision.HEAD, SVNRevision.HEAD, false, true, dirEntry -> System.out.println(dirEntry.getRelativePath())); }
SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient(); SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer); if (getSVNEnvironment().isIncludeExternals()) { client.setIgnoreExternals(false); client.doList(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this); } else { client.doList(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment())); client.doLog(new File[] {target.getFile()}, editedRevisionRangesList, target.getPegRevision(), getSVNEnvironment().isStopOnCopy(), getSVNEnvironment().isVerbose(), getSVNEnvironment().isUseMergeHistory(), getSVNEnvironment().getLimit(), targets.remove(0); String[] paths = (String[]) targets.toArray(new String[targets.size()]); client.doLog(target.getURL(), paths, target.getPegRevision(), editedRevisionRangesList, getSVNEnvironment().isStopOnCopy(), getSVNEnvironment().isVerbose(),
SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient(); final SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer); client.setDiffOptions(getSVNEnvironment().getDiffOptions()); boolean hasMissingTargets = false; for (Iterator ts = targets.iterator(); ts.hasNext();) { client.doAnnotate(target.getFile(), target.getPegRevision(), start, endRev, getSVNEnvironment().isForce(), getSVNEnvironment().isUseMergeHistory(), this, null); } else { client.doAnnotate(target.getURL(), target.getPegRevision(), start, endRev, getSVNEnvironment().isForce(), getSVNEnvironment().isUseMergeHistory(),
SVNLogClient svnLogClient = new SVNLogClient(svnManager, null); svnLogClient.doAnnotate(svnurl, SVNRevision.UNDEFINED, SVNRevision.create(1l), endRevision, new SvnBlameHandler(svnRepository, path,
endRevision = pegRevision; SVNRepository repos = createRepository(null, path, pegRevision, endRevision); long endRev = getRevisionNumber(endRevision, repos, path); long startRev = getRevisionNumber(startRevision, repos, path); if (endRev < startRev) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Start revision must precede end revision")); tmpFile = SVNFileUtil.createTempDirectory("annotate"); doAnnotate(path.getAbsolutePath(), startRev, tmpFile, repos, endRev, force, handler, null);
/** * Returns an instance of the {@link SVNLogClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNLogClient</b> instance */ public SVNLogClient getLogClient() { if (myLogClient == null) { myLogClient = myOperationFactory != null ? new SVNLogClient(myOperationFactory) : new SVNLogClient(this, myOptions); initClientDefaults(myLogClient); } return myLogClient; }
SvnAnnotate annotate = getOperationsFactory().createAnnotate(); annotate.addTarget(SvnTarget.fromURL(url, pegRevision)); annotate.setStartRevision(startRevision); annotate.setEndRevision(endRevision); annotate.setDiffOptions(getDiffOptions()); annotate.setReceiver(SvnCodec.annotateReceiver(handler)); annotate.run();
myLogClient.setEventHandler(handler);
myLogClient.setIgnoreExternals(myIsIgnoreExternals);
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); } }
SVNLogClient logClient = new SVNLogClient(authManager, null); logClient.doList(repoURL, SVNRevision.HEAD, SVNRevision.HEAD, false, false, dirEntryHandler);
SVNLogClient client = getSVNEnvironment().getClientManager().getLogClient(); SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer); if (getSVNEnvironment().isIncludeExternals()) { client.setIgnoreExternals(false); client.doList(target.getFile(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this); } else { client.doList(target.getURL(), target.getPegRevision(), getSVNEnvironment().getStartRevision(), fetchLocks, depth, fields, this);
/** * Returns an instance of the {@link SVNLogClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNLogClient</b> instance */ public SVNLogClient getLogClient() { if (myLogClient == null) { myLogClient = new SVNLogClient(this, myOptions); myLogClient.setEventHandler(myEventHandler); myLogClient.setDebugLog(getDebugLog()); myLogClient.setIgnoreExternals(myIsIgnoreExternals); } return myLogClient; }