Collection expanded = new ArrayList(sources.length);
for (int i = 0; i < sources.length; i++) {
SVNCopySource source = sources[i];
if (source.isCopyContents() && source.isURL()) {
// get children at revision.
SVNRevision pegRevision = source.getPegRevision();
if (!pegRevision.isValid()) {
pegRevision = SVNRevision.HEAD;
}
SVNRevision startRevision = source.getRevision();
if (!startRevision.isValid()) {
startRevision = pegRevision;
}
SVNRepositoryLocation[] locations = getLocations(source.getURL(), null, null, pegRevision, startRevision, SVNRevision.UNDEFINED);
SVNRepository repository = createRepository(locations[0].getURL(), null, null, true);
long revision = locations[0].getRevisionNumber();