Skip to content
Permalink
Browse files

Merge pull request #30 from jglick/getEffectiveBrowser-JENKINS-35098

[JENKINS-35098] Work around core misfeature when using 1.642.x or 1.651.x
  • Loading branch information...
jglick committed Oct 31, 2016
2 parents d074acb + 70ec663 commit 7ef365b3c4709be370caf1ac32f242472cf2705b
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
@@ -51,6 +51,7 @@
import hudson.model.listeners.RunListener;
import hudson.model.listeners.SCMListener;
import hudson.scm.ChangeLogSet;
import hudson.scm.RepositoryBrowser;
import hudson.scm.SCM;
import hudson.scm.SCMRevisionState;
import hudson.security.ACL;
@@ -674,7 +675,7 @@ public boolean hasntStartedYet() {
if (co.changelogFile != null && co.changelogFile.isFile()) {
try {
ChangeLogSet<? extends ChangeLogSet.Entry> changeLogSet =
co.scm.createChangeLogParser().parse(this, co.scm.getEffectiveBrowser(), co.changelogFile);
co.scm.createChangeLogParser().parse(this, getEffectiveBrowser(co.scm), co.changelogFile);
if (!changeLogSet.isEmptySet()) {
changeSets.add(changeLogSet);
}
@@ -687,6 +688,12 @@ public boolean hasntStartedYet() {
return changeSets;
}

/** Replacement for {@link SCM#getEffectiveBrowser} to work around JENKINS-35098. TODO 2.7.3+ delete */
private static RepositoryBrowser<?> getEffectiveBrowser(SCM scm) {
RepositoryBrowser<?> b = scm.getBrowser();
return b != null ? b : scm.guessBrowser();
}

@RequirePOST
public synchronized HttpResponse doStop() {
Executor e = getOneOffExecutor();

0 comments on commit 7ef365b

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