diff --git a/pom.xml b/pom.xml index 57704687..ba755b76 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 1.480.3 + 1.509.2 mercurial diff --git a/src/main/java/hudson/plugins/mercurial/MercurialStatus.java b/src/main/java/hudson/plugins/mercurial/MercurialStatus.java index 6bc08b4a..6d99ac21 100644 --- a/src/main/java/hudson/plugins/mercurial/MercurialStatus.java +++ b/src/main/java/hudson/plugins/mercurial/MercurialStatus.java @@ -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() {