Skip to content

Commit

Permalink
Merge pull request #183 from hhandberg/issue-JENKINS-44076
Browse files Browse the repository at this point in the history
[JENKINS-44076] : hudson.scm.SubversionChangeLogSet.LogEntry.getAffectedPaths() does not provide expected result for parametrized Repository URLs
  • Loading branch information
jglick committed Jun 16, 2017
2 parents b1a34e7 + 0e6689c commit 8ef2211
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/hudson/scm/SubversionChangeLogSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,16 @@ private String preparePath(String path) {
}
ModuleLocation[] locations = ((SubversionSCM)scm).getLocations();
for (int i = 0; i < locations.length; i++) {
String commonPart = findCommonPart(locations[i].remote, path);
ModuleLocation expandedLocation = locations[i].getExpandedLocation(job);
// If the remote URL features a trailing '@REV' entry, strip it off before looking for common part
String expandedRemote = expandedLocation.remote;
if (expandedLocation.getRevision(null) != null) {
int idx = expandedRemote.lastIndexOf('@');
if (idx >= 0) {
expandedRemote = expandedRemote.substring(0, idx);
}
}
String commonPart = findCommonPart(expandedRemote, path);
if (commonPart != null) {
if (path.startsWith("/")) {
path = path.substring(1);
Expand Down

0 comments on commit 8ef2211

Please sign in to comment.