Skip to content
Permalink
Browse files

[FIXED JENKINS-18807] Ignore SCM triggers which ask to suppress post-…

…commit hooks.

Requires 1.493+, so just update to 1.509.x already.
  • Loading branch information...
jglick authored and thomedw committed Jul 18, 2013
1 parent 5906c07 commit c0c4bd98dd8f3e1aab161f3ecb562b0b96f4a520
Showing with 3 additions and 3 deletions.
  1. +1 −1 pom.xml
  2. +2 −2 src/main/java/hudson/plugins/mercurial/MercurialStatus.java
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.480.3</version>
<version>1.509.2</version>
</parent>

<artifactId>mercurial</artifactId>
@@ -120,7 +120,7 @@ private HttpResponse handleNotifyCommit(URI url) throws ServletException, IOExce
LOGGER.log(Level.INFO, "url == " + url + " repository == " + repository);
if (looselyMatches(url, repository)) urlFound = true; else continue;
SCMTrigger trigger = project.getTrigger(SCMTrigger.class);
if (trigger!=null) triggerFound = true; else continue;
if (trigger!=null && !trigger.isIgnorePostCommitHooks()) triggerFound = true; else continue;

LOGGER.log(Level.INFO, "Triggering the polling of {0}", project.getFullDisplayName());
trigger.run();
@@ -130,7 +130,7 @@ private HttpResponse handleNotifyCommit(URI url) throws ServletException, IOExce
final String msg;
if (!scmFound) msg = "No mercurial jobs found";
else if (!urlFound) msg = "No mercurial jobs using repository: " + url;
else if (!triggerFound) msg = "Jobs found but they aren't configured for polling";
else if (!triggerFound) msg = "Jobs found but they are not configured for polling or are ignoring post-commit hooks";
else msg = null;

return new HttpResponse() {

0 comments on commit c0c4bd9

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