Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
with
17 additions
and
24 deletions.
-
+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; |
|
|
} |
|
|
|
|
|
/** |
|
|