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

Multiple hg repos vs matrix job - the same revision used for all repositories.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When I'm using Multiple SCM plugin in Matrix job, configurations build are failing because of wrong revision in hg update.
      Top level build:

      [common] $ hg pull --rev default /mnt/imports/data2/users/jenkins/hgcache/730F3D6CF2984FE6965438CDBB2F241CA1B4F220-common
      [common] $ hg update --clean --rev default
      0 files updated, 0 files merged, 0 files removed, 0 files unresolved
      [common] $ hg log --rev . --template {node}
      [common] $ hg log --rev . --template {rev}
      [common] $ hg log --rev 76175d754787279d7888132d364e2847c576134c
      ...
      [project_engine] $ hg pull --rev default /mnt/imports/data2/users/jenkins/hgcache/892EE33C3F9037402D2325A82FC02A50F873F87F-project_engine
      [project_engine] $ hg update --clean --rev default
      0 files updated, 0 files merged, 0 files removed, 0 files unresolved
      [project_engine] $ hg log --rev . --template {node}
      [project_engine] $ hg log --rev . --template {rev}
      [project_engine] $ hg log --rev 53dbe704b92059332f0af3ebe2d50f56aac7f4d9
      

      As you can see revisions for common & project_engine are different. The same build for each configuration gives an error because of the same revision for both projects:

      [common] $ hg update --rev 76175d754787279d7888132d364e2847c576134c
      739 files updated, 0 files merged, 0 files removed, 0 files unresolved
      ...
      [project_engine] $ hg update --rev 76175d754787279d7888132d364e2847c576134c
      abort: unknown revision '76175d754787279d7888132d364e2847c576134c'!
      

      I'm using hg sharing and caching and Template project for SCM - but they both work fine for non-matrix projects.

        Attachments

          Issue Links

            Activity

            Hide
            blt04 Brandon Turner added a comment -

            This bug is in the Mercurial plugin, not the multiple-scms plugin. Here's a potential fix: https://github.com/jenkinsci/mercurial-plugin/pull/55

            Show
            blt04 Brandon Turner added a comment - This bug is in the Mercurial plugin, not the multiple-scms plugin. Here's a potential fix: https://github.com/jenkinsci/mercurial-plugin/pull/55
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Brandon Turner
            Path:
            src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            src/test/java/hudson/plugins/mercurial/MatrixProjectTest.java
            http://jenkins-ci.org/commit/mercurial-plugin/1a33ebc7d1337659d07d995fc55a008cb9155897
            Log:
            Fix matrix builds with multiple SCMs

            This fixes a bug that causes Matrix Builds to fail when using two or
            more Mercurial repositories (via the multiple-scms plugin).

            Previously, each SCM tried to checkout the changeset from the first
            Mercurial repository. This checks for the presence of the
            multiple-scms plugin and, if the build uses it, looks up the parent
            changeset using multiple-scms.

            I also modified the MatrixBuild tests to fail faster when builds fail
            (added an await timeout).

            JENKINS-18237

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brandon Turner Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MatrixProjectTest.java http://jenkins-ci.org/commit/mercurial-plugin/1a33ebc7d1337659d07d995fc55a008cb9155897 Log: Fix matrix builds with multiple SCMs This fixes a bug that causes Matrix Builds to fail when using two or more Mercurial repositories (via the multiple-scms plugin). Previously, each SCM tried to checkout the changeset from the first Mercurial repository. This checks for the presence of the multiple-scms plugin and, if the build uses it, looks up the parent changeset using multiple-scms. I also modified the MatrixBuild tests to fail faster when builds fail (added an await timeout). JENKINS-18237
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            src/test/java/hudson/plugins/mercurial/MatrixProjectTest.java
            src/test/java/hudson/plugins/mercurial/MultiSCM.java
            src/test/java/hudson/plugins/mercurial/MultiSCMChangeLogParser.java
            src/test/java/hudson/plugins/mercurial/MultiSCMChangeLogSet.java
            src/test/java/hudson/plugins/mercurial/SCMTestBase.java
            http://jenkins-ci.org/commit/mercurial-plugin/5dfe7720d202bc8102f87f9eed26e144761eadb0
            Log:
            Merge pull request #55 from blt04/fix-matrix-multi

            [FIXED JENKINS-18237] Fix matrix multiple scm builds

            Compare: https://github.com/jenkinsci/mercurial-plugin/compare/1b5c20155dd0...5dfe7720d202

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MatrixProjectTest.java src/test/java/hudson/plugins/mercurial/MultiSCM.java src/test/java/hudson/plugins/mercurial/MultiSCMChangeLogParser.java src/test/java/hudson/plugins/mercurial/MultiSCMChangeLogSet.java src/test/java/hudson/plugins/mercurial/SCMTestBase.java http://jenkins-ci.org/commit/mercurial-plugin/5dfe7720d202bc8102f87f9eed26e144761eadb0 Log: Merge pull request #55 from blt04/fix-matrix-multi [FIXED JENKINS-18237] Fix matrix multiple scm builds Compare: https://github.com/jenkinsci/mercurial-plugin/compare/1b5c20155dd0...5dfe7720d202

              People

              • Assignee:
                kbell Kevin Bell
                Reporter:
                igorkostenko Igor Kostenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: