Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12052

Polling a mercurial repo fails when the only change to the branch since the last build is a merge

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Given this repo structure, where t2 was the last revision that was built by jenkins, when t3 is pushed to the central repo, polling fails and says that no changes have occurred.

      t3         - on branch 'trunk'. Should build, but doesn't
      | \
      |  d2      - on branch 'default'
      t2 |       - on branch 'trunk'. Was last built version.
      |  |
      |  d1      - on branch 'default'
      t1         - on branch 'trunk'.
      

      I think this is because after polling pulls the specified branch, it then only checks for changes on that branch excluding any merges, using "hg log --branch trunk --no-merges". This returns nothing in the above scenario, so no build occurs. If either the --branch option is removed it returns d2 & d1 changesets or if the --no-merges option is removed it returns the merge changeset, so I assume will perform a build.

      Performing the build manually with the Build Now button works correctly, and shows the correct changesets that were involved.

        Attachments

          Issue Links

            Activity

            Hide
            marcsanfacon Marc Sanfacon added a comment -

            We have the same issue since upgrading to the latest version (1.38).

            Show
            marcsanfacon Marc Sanfacon added a comment - We have the same issue since upgrading to the latest version (1.38).
            Hide
            dgodfrey Daniel Godfrey added a comment -

            I've built a snapshot of the current development version with an extra pull request, which fixes this issue.
            https://github.com/jenkinsci/mercurial-plugin/pull/13

            Show
            dgodfrey Daniel Godfrey added a comment - I've built a snapshot of the current development version with an extra pull request, which fixes this issue. https://github.com/jenkinsci/mercurial-plugin/pull/13

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                dgodfrey Daniel Godfrey
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: