Skip to content
Permalink
Browse files

Do integration on the first module regardless of the number of module…

…s defined and the "Ignore externals" option (see [JENKINS-26280])
  • Loading branch information
hugueschabot committed Jan 10, 2015
1 parent e33bc18 commit 8eddd8faa48960f0d46364e6dc15317aafbc1098
Showing with 17 additions and 24 deletions.
  1. +17 −24 src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
@@ -134,33 +134,26 @@ public SvnInfo getSvnInfo() {
if (!(scm instanceof SubversionSCM)) {
return null;
}

// TODO: check for multiple locations ?
SubversionSCM svn = (SubversionSCM) scm;
ModuleLocation[] locations = svn.getLocations();
if (locations.length == 1) {
TaskListener listener = new LogTaskListener(LOGGER, WARNING);
ModuleLocation firstLocation = svn.getLocations()[0];
// expand system and node environment variables as well as the
// project parameters
firstLocation = Utility.getExpandedLocation(firstLocation,
getProject());
if (!firstLocation.isIgnoreExternalsOption()) {
try {
SVNRevisionState state = build.getAction(SVNRevisionState.class);
long revision = state.getRevision(firstLocation.getURL());

return new SvnInfo(firstLocation.getSVNURL().toDecodedString(), revision);
} catch (SVNException e) {
LOGGER.log(WARNING, "Could not get SVN URL and revision", e);
} catch (IOException e) {
LOGGER.log(WARNING, "Could not get SVN URL and revision", e);
} catch (InterruptedException e) {
LOGGER.log(WARNING, "Could not get SVN URL and revision", e);
}
}
}

return null; // can't handle more than 1 URLs

ModuleLocation firstLocation = svn.getLocations()[0];
// expand system and node environment variables as well as the
// project parameters
firstLocation = Utility.getExpandedLocation(firstLocation, getProject());

try {
SVNRevisionState state = build.getAction(SVNRevisionState.class);
long revision = state.getRevision(firstLocation.getURL());

return new SvnInfo(firstLocation.getSVNURL().toDecodedString(), revision);
} catch (SVNException e) {
LOGGER.log(WARNING, "Could not get SVN URL and revision", e);
}

return null;
}

/**

0 comments on commit 8eddd8f

Please sign in to comment.
You can’t perform that action at this time.