• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • mercurial-plugin
    • None

      Currently there is no support for excluding regions of the repository from SCM polling modifications to prevent unwanted builds.

      Attached is a patch to provide this functionality that is the same as the functionality in the CVS SCM.

      If set Hudson will ignore any files and/or folders in this list when determining if a build needs to be triggered.

          [JENKINS-7239] Support Excluded Regions in SCM Polling

          Jesse Glick added a comment -

          There is already a modules list that you can use, though this is impractical for very fine-grained excludes such as particular file extensions. I would rather work on JENKINS-5480 so that included file paths are configured by regexp; you can use (?!...) to do negative matching.

          BTW your patch deleted MercurialSCM/config.jelly I guess by accident.

          Jesse Glick added a comment - There is already a modules list that you can use, though this is impractical for very fine-grained excludes such as particular file extensions. I would rather work on JENKINS-5480 so that included file paths are configured by regexp; you can use (?!...) to do negative matching. BTW your patch deleted MercurialSCM/config.jelly I guess by accident.

          gilesie added a comment -

          For reference purposes please see the correct patch attached.

          gilesie added a comment - For reference purposes please see the correct patch attached.

          gilesie added a comment - - edited

          We have a situation where are repository contains multiple modules (Actually 700+ modules) such as

          core
          ui
          app
          

          In Hudson we would have two builds one for APP and one for UI. Changes in the app or core modules triggers a build of APP. Changes in the ui or core triggers a build of UI. We use the modules parameter to control when and when not to trigger a build.

          If we look at the APP build there is certain files within the core or app modules that we don't want to trigger a build if these files are modified. We do however want these files to appear in the changelog.

          In the example from JENKINS-5480 (listed below) if you had a file nbbuild/test.txt and it was modified it would not trigger a build. However would you expect to see nbbuild/test.txt in the change log?

          *profiler*/,nbbuild/**/*.java
          

          gilesie added a comment - - edited We have a situation where are repository contains multiple modules (Actually 700+ modules) such as core ui app In Hudson we would have two builds one for APP and one for UI. Changes in the app or core modules triggers a build of APP. Changes in the ui or core triggers a build of UI. We use the modules parameter to control when and when not to trigger a build. If we look at the APP build there is certain files within the core or app modules that we don't want to trigger a build if these files are modified. We do however want these files to appear in the changelog. In the example from JENKINS-5480 (listed below) if you had a file nbbuild/test.txt and it was modified it would not trigger a build. However would you expect to see nbbuild/test.txt in the change log? *profiler*/,nbbuild /**/ *.java

          Jesse Glick added a comment -

          So this is even more complicated - you want changes to certain files to not trigger a build, yet to be listed as changes. I think this is contrary to normal usage, and certainly inconsistent with the way the paths listed in the modules field behave. Not sure how many idiosyncratic customizations can be put into the plugin before it becomes unmaintainable.

          Jesse Glick added a comment - So this is even more complicated - you want changes to certain files to not trigger a build, yet to be listed as changes. I think this is contrary to normal usage, and certainly inconsistent with the way the paths listed in the modules field behave. Not sure how many idiosyncratic customizations can be put into the plugin before it becomes unmaintainable.

          gilesie added a comment -

          If you look at the Hudson CVS plugin. It has a configuration section of "Excluded Regions". This is used to ensure that during polling of changes Hudson will ignore any files and/or folders in this list.

          However if a file is not in this list and is modified it will trigger a build. However all files appear in the change log even the ones in the "Excluded Regions" list.

          So as you can see that my situation is normal usage coming from the CVS plugin and is not some idiosyncratic customization.

          I can see how this can create some concerns as the mercurial plugin uses a notion of "modules" to reduce triggering of builds, but a solution that solves both problems and is acceptable to become a core feature of the mercurial plugin and does not make it unmaintainable would be ideal.

          Do you think there should be a distinction between "modules/folders" that are not part of the build and excluded from change logs and "files/folders" that cause a build to be triggered?

          If you do then I would be happy to work on developing a solution that solves JENKINS-5480 and JENKINS-7239.

          gilesie added a comment - If you look at the Hudson CVS plugin. It has a configuration section of "Excluded Regions". This is used to ensure that during polling of changes Hudson will ignore any files and/or folders in this list. However if a file is not in this list and is modified it will trigger a build. However all files appear in the change log even the ones in the "Excluded Regions" list. So as you can see that my situation is normal usage coming from the CVS plugin and is not some idiosyncratic customization. I can see how this can create some concerns as the mercurial plugin uses a notion of "modules" to reduce triggering of builds, but a solution that solves both problems and is acceptable to become a core feature of the mercurial plugin and does not make it unmaintainable would be ideal. Do you think there should be a distinction between "modules/folders" that are not part of the build and excluded from change logs and "files/folders" that cause a build to be triggered? If you do then I would be happy to work on developing a solution that solves JENKINS-5480 and JENKINS-7239 .

          Manuel added a comment -

          What is the current state of this issue???

          Manuel added a comment - What is the current state of this issue???

          Jesse Glick added a comment -

          No one working on this (or JENKINS-5480) at the moment I think. Would be good to have an updated pull request that solves these two together, probably using regexps for flexibility. Needs to quietly upgrade existing job configs, as HUDSON-5480.diff did.

          Jesse Glick added a comment - No one working on this (or JENKINS-5480 ) at the moment I think. Would be good to have an updated pull request that solves these two together, probably using regexps for flexibility. Needs to quietly upgrade existing job configs, as HUDSON-5480.diff did.

            jglick Jesse Glick
            gilesie gilesie
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: