}
}
// determine where to perform polling. prefer the node where the build happened,
// in case a cluster is non-uniform. see http://www.nabble.com/svn-connection-from-slave-only-td24970587.html
VirtualChannel ch=null;
if (workspace != null && !isPollFromMaster()) {
ch = workspace.getChannel();
}
if (ch==null) ch= MasterComputer.localChannel;
final String nodeName = ch instanceof Channel ? ((Channel) ch).getName() : "master";
final SVNLogHandler logHandler = new SVNLogHandler(createSVNLogFilter(), listener);
final Map<String,ISVNAuthenticationProvider> authProviders = new LinkedHashMap<String,
ISVNAuthenticationProvider>();
for (ModuleLocation loc: getLocations()) {
String url;
try {
url = loc.getExpandedLocation(project).getSVNURL().toDecodedString();
} catch (SVNException ex) {
ex.printStackTrace(listener.error(Messages.SubversionSCM_pollChanges_exception(loc.getURL())));
return BUILD_NOW;
}
authProviders.put(url, createAuthenticationProvider(project, loc));
}
final ISVNAuthenticationProvider defaultAuthProvider = createAuthenticationProvider(project, null);
// figure out the remote revisions
return ch.call(new CompareAgainstBaselineCallable(baseline, logHandler, project.getName(), listener, defaultAuthProvider, authProviders, nodeName));
}