Skip to content
Permalink
Browse files

[JENKINS-35098] Work around core misfeature when using 1.642.x or 1.6…

…51.x.
  • Loading branch information...
jglick committed Oct 28, 2016
1 parent d074acb commit 70ec663adff70fb17a97c77bdea4a3ea081cd0ec
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 70ec663

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