public static void changelog( SVNClientManager clientManager, SVNURL svnUrl, SVNRevision startRevision, SVNRevision endRevision, boolean stopOnCopy, boolean reportPaths, ISVNLogEntryHandler handler ) throws SVNException { SVNLogClient logClient = clientManager.getLogClient(); logClient.doLog( svnUrl, null, startRevision, startRevision, endRevision, stopOnCopy, reportPaths, MAX_LOG_ENTRIES, handler ); }
protected SVNLogClient getSVNLogClient() { return getClientManager().getLogClient(); }
public SVNLogClient getLogClient() { return wrapUp(core.getLogClient()); }
protected SVNLogClient getSVNLogClient(){ return getClientManager().getLogClient(); }
protected SVNLogClient getSVNLogClient() { return getClientManager().getLogClient(); }
protected SVNLogClient getLogClient(SVNRepository repository) { return getClientManager(repository).getLogClient(); }
protected SVNLogClient getSVNLogClient() { return getClientManager().getLogClient(); }
/** * @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); } }
private List<Revision> getSVNLogs(final SVNClientManager clientManager, final String[] paths, final SVNRevision startRevision, final int start, final int limit) throws StoreException.ReadException { try { final SVNLogClient logClient = clientManager.getLogClient(); final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler(); // In order to get history is "descending" order, the startRevision should be the one closer to HEAD logClient.doLog(svnUrl, paths, /* pegRevision */ SVNRevision.HEAD, startRevision, SVNRevision.create(1), /* stopOnCopy */ false, /* discoverChangedPaths */ false, /* includeMergedRevisions */ false, /* limit */ start + limit, new String[]{SVNRevisionProperty.LOG, SVNRevisionProperty.AUTHOR, SVNRevisionProperty.DATE}, handler); final List<SVNLogEntry> entries = handler.getLogEntries(); final List<Revision> revisions; if (entries.size() <= start) { revisions = Collections.emptyList(); } else { final int end = Math.min(start + limit, entries.size()); revisions = Lists.newArrayListWithCapacity(end - start); for (int i = 0; i < end - start; i++) { final SVNLogEntry entry = entries.get(start + i); revisions.add(new Revision(String.valueOf(entry.getRevision()), entry.getAuthor(), entry.getDate(), entry.getMessage())); } } return revisions; } catch (final SVNException e) { throw new StoreException.ReadException("Unable to get older revisions"); } }
private List<Revision> getSVNLogs(final SVNClientManager clientManager, final String[] paths, final SVNRevision startRevision, final int start, final int limit) throws StoreException.ReadException { try { final SVNLogClient logClient = clientManager.getLogClient(); final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler(); // In order to get history is "descending" order, the startRevision should be the one closer to HEAD logClient.doLog(svnUrl, paths, /* pegRevision */ SVNRevision.HEAD, startRevision, SVNRevision.create(1), /* stopOnCopy */ false, /* discoverChangedPaths */ false, /* includeMergedRevisions */ false, /* limit */ start + limit, new String[]{SVNRevisionProperty.LOG, SVNRevisionProperty.AUTHOR, SVNRevisionProperty.DATE}, handler); final List<SVNLogEntry> entries = handler.getLogEntries(); final List<Revision> revisions; if (entries.size() <= start) { revisions = Collections.emptyList(); } else { final int end = Math.min(start + limit, entries.size()); revisions = Lists.newArrayListWithCapacity(end - start); for (int i = 0; i < end - start; i++) { final SVNLogEntry entry = entries.get(start + i); revisions.add(new Revision(String.valueOf(entry.getRevision()), entry.getAuthor(), entry.getDate(), entry.getMessage())); } } return revisions; } catch (final SVNException e) { throw new StoreException.ReadException("Unable to get older revisions"); } }
final String[] targetPaths = {path}; final SVNLogClient logClient = clientManager.getLogClient(); final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();
final String[] targetPaths = {path}; final SVNLogClient logClient = clientManager.getLogClient(); final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();
SVNLogClient logClient = getSVNManager().getLogClient();
/** * Checks it the revision range [from,to] has any changes that are not excluded via exclusions. */ public boolean findNonExcludedChanges(SVNURL url, long from, long to, ISVNAuthenticationProvider authProvider) throws SVNException { if (from > to) { return false; // empty revision range, meaning no change } // if no exclusion rules are defined, don't waste time going through "svn log". if (!hasExclusionRule()) { return true; } final SVNClientManager manager = createSvnClientManager(authProvider); try { manager.getLogClient().doLog(url, null, SVNRevision.UNDEFINED, SVNRevision.create(from), // get log entries from the local revision + 1 SVNRevision.create(to), // to the remote revision false, // Don't stop on copy. true, // Report paths. false, // Don't included merged revisions 0, // Retrieve log entries for unlimited number of revisions. null, // Retrieve all revprops this); } finally { manager.dispose(); } return isChangesFound(); }
/** * Checks it the revision range [from,to] has any changes that are not excluded via exclusions. */ public boolean findNonExcludedChanges(SVNURL url, long from, long to, ISVNAuthenticationProvider authProvider) throws SVNException { if (from > to) { return false; // empty revision range, meaning no change } // if no exclusion rules are defined, don't waste time going through "svn log". if (!hasExclusionRule()) { return true; } final SVNClientManager manager = createSvnClientManager(authProvider); try { manager.getLogClient().doLog(url, null, SVNRevision.UNDEFINED, SVNRevision.create(from), // get log entries from the local revision + 1 SVNRevision.create(to), // to the remote revision false, // Don't stop on copy. true, // Report paths. false, // Don't included merged revisions 0, // Retrieve log entries for unlimited number of revisions. null, // Retrieve all revprops this); } finally { manager.dispose(); } return isChangesFound(); }
javaRepo.getClientManager().getLogClient().doList( SVNURL.parseURIEncoded( baseUrl + "/tags" ), SVNRevision.HEAD, SVNRevision.HEAD, false, false, dirEntryHandler ); javaRepo.getClientManager().getLogClient().doList( SVNURL.parseURIEncoded( baseUrl + "/branches" ), SVNRevision.HEAD, SVNRevision.HEAD, false, false, dirEntryHandler );
public boolean run(Collection<SubversionSCM.External> externals, Result changeLog) throws IOException, InterruptedException { boolean changelogFileCreated = false; final SVNClientManager manager = SubversionSCM.createSvnClientManager(build.getProject()); try { SVNLogClient svnlc = manager.getLogClient(); TransformerHandler th = createTransformerHandler(); th.setResult(changeLog); SVNXMLLogHandler logHandler = new SVNXMLLogHandler(th); // work around for http://svnkit.com/tracker/view.php?id=175 th.setDocumentLocator(DUMMY_LOCATOR); logHandler.startDocument(); for (ModuleLocation l : scm.getLocations(build)) { changelogFileCreated |= buildModule(l.getURL(), svnlc, logHandler); } for(SubversionSCM.External ext : externals) { changelogFileCreated |= buildModule( getUrlForPath(build.getWorkspace().child(ext.path)), svnlc, logHandler); } if(changelogFileCreated) { logHandler.endDocument(); } return changelogFileCreated; } finally { manager.dispose(); } }
public boolean run(Collection<SubversionSCM.External> externals, Result changeLog) throws IOException, InterruptedException { boolean changelogFileCreated = false; final SVNClientManager manager = SubversionSCM.createSvnClientManager(build.getProject()); try { SVNLogClient svnlc = manager.getLogClient(); TransformerHandler th = createTransformerHandler(); th.setResult(changeLog); SVNXMLLogHandler logHandler = new SVNXMLLogHandler(th); // work around for http://svnkit.com/tracker/view.php?id=175 th.setDocumentLocator(DUMMY_LOCATOR); logHandler.startDocument(); for (ModuleLocation l : scm.getLocations(build)) { changelogFileCreated |= buildModule(l.getURL(), svnlc, logHandler); } for(SubversionSCM.External ext : externals) { changelogFileCreated |= buildModule( getUrlForPath(build.getWorkspace().child(ext.path)), svnlc, logHandler); } if(changelogFileCreated) { logHandler.endDocument(); } return changelogFileCreated; } finally { manager.dispose(); } }
final SVNClientManager manager = SubversionSCM.createClientManager(authProvider).getCore(); try { SVNLogClient svnlc = manager.getLogClient(); PathContext context = getUrlForPath(workspace.child(l.getLocalDir()), authProvider); context.moduleWorkspacePath = l.getLocalDir();