Class MercurialStatus

java.lang.Object
hudson.plugins.mercurial.MercurialStatus
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject, RootAction, UnprotectedRootAction

@Extension public class MercurialStatus extends Object implements UnprotectedRootAction
Information screen for the use of Mercurial in Jenkins.
  • Field Details

  • Constructor Details

    • MercurialStatus

      public MercurialStatus()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • doNotifyCommit

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doNotifyCommit(@QueryParameter(required=true) String url, @QueryParameter String branch, @QueryParameter String changesetId) throws jakarta.servlet.ServletException, IOException
      Handles the incoming commit notification. NOTE: This handles two types of notification:
      • Legacy notification such as from hooks like:
         commit.jenkins = wget -q -O /dev/null <jenkins root>/mercurial/notifyCommit?url=<repository remote url>
         
      • Modern notifications such as from hooks like:
         commit.jenkins = python:<path to hook.py>
         
        using an in-process hook as shown in MercurialRule.registerHook.
      When used with a legacy notification, multi-branch jobs will be forced to perform full indexing, whereas when used with a modern notification that includes the branch and changesetId then the notification will be processed using the SCM API event subsystem resulting in a much more scoped and efficient processing of the event.
      Parameters:
      url - the URL of the mercurial repository
      branch - (optional) branch name of the commit.
      changesetId - (optional) changesetId of the commit.
      Returns:
      the HTTP response
      Throws:
      jakarta.servlet.ServletException - if something goes wrong.
      IOException - if something goes wrong.