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

A failed update sets revision of build to 000000+

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • mercurial-plugin
    • None

      The mercurial plugin ensures that a failed clone operation throws the corresponding exception, but that's not the case if the subsequent update fails: no check is done of the return code of the hg update command.

      The effect is that the revision of the build is set to 000000+, which causes a huge changelog calculation in the next build, as basically the calculated log includes all the changesets in the history of the repo.

      I've even seen a worse corner case, where a build is assigned up to three different revisions if, for example, two update attempts fail and the third one works when using the cache+share extension.

          [JENKINS-12829] A failed update sets revision of build to 000000+

          David Santiago Turiño created issue -
          David Santiago Turiño made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          David Santiago Turiño added a comment - Pushed tentative fix in https://github.com/jenkinsci/mercurial-plugin/pull/22

          Code changed in jenkins
          User: David Santiago Turiño
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java
          src/test/java/hudson/plugins/mercurial/SharingSCMTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/b1a2f8465fced379a54b6116d0fa059fc40deff7
          Log:
          JENKINS-12829: A failed update sets revision of build to 000000+

          The mercurial plugin ensures that a failed clone operation throws the
          corresponding exception, but that's not the case if the subsequent
          update fails: no check is done of the return code of the hg update
          command.

          The effect is that the revision of the build is set to 000000+, which
          causes a huge change log calculation in the next build, as basically
          the calculated log includes all thechange setss in the history of the
          repo.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Santiago Turiño Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java src/test/java/hudson/plugins/mercurial/SharingSCMTest.java http://jenkins-ci.org/commit/mercurial-plugin/b1a2f8465fced379a54b6116d0fa059fc40deff7 Log: JENKINS-12829 : A failed update sets revision of build to 000000+ The mercurial plugin ensures that a failed clone operation throws the corresponding exception, but that's not the case if the subsequent update fails: no check is done of the return code of the hg update command. The effect is that the revision of the build is set to 000000+, which causes a huge change log calculation in the next build, as basically the calculated log includes all thechange setss in the history of the repo.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/a7483f9809464854c6af2d01db7ab6aab1c98461
          Log:
          Merge pull request #22 from nimeacuerdo/fix-multiple-revisions-per-build-issue

          [FIXED JENKINS-12829] A failed update sets revision of build to 000000+

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/99d221c...a7483f9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java http://jenkins-ci.org/commit/mercurial-plugin/a7483f9809464854c6af2d01db7ab6aab1c98461 Log: Merge pull request #22 from nimeacuerdo/fix-multiple-revisions-per-build-issue [FIXED JENKINS-12829] A failed update sets revision of build to 000000+ Compare: https://github.com/jenkinsci/mercurial-plugin/compare/99d221c...a7483f9
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 143287 ] New: JNJira + In-Review [ 190483 ]

            nimeacuerdo David Santiago Turiño
            nimeacuerdo David Santiago Turiño
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: