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

Mercurial repository is always cloned instead of being updated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: mercurial-plugin
    • Labels:
      None
    • Environment:
      Linux, Jenkis 1.506, Mercurial extension v. 1.44, mercurial 2.2
    • Similar Issues:

      Description

      My system-level hgrc file sets debug to on:

      hg showconfig|grep ui.debug
      /etc/mercurial/hgrc:28: ui.debug=true

      This seems to cause problems when parsing the output of hg.

      Here's the log output:

      13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
      13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
      13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
      13:25:38 sending capabilities command
      13:25:38 sending lookup command
      13:25:38 query 1; heads
      13:25:38 sending batch command
      13:25:38 sending getbundle command
      13:25:38 adding changesets
      13:25:38 changesets: 1 chunks
      13:25:38 add changeset e1cfb9e9c39a
      13:25:38 changesets: 2 chunks
      [...]

        Attachments

          Issue Links

            Activity

            elifarley Elifarley created issue -
            elifarley Elifarley made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-13329 [ JENKINS-13329 ]
            elifarley Elifarley made changes -
            Environment Linux, Jenkis 1.458, mercurial 1.7 Linux, Jenkis 1.506, Mercurial extension v. 1.44, mercurial 2.2
            Description JENKINS-4672 gives possibility to setup Marcurial debug flag.
            When I switch it on, the all mercurial call is done with option "--debug".

            The first command, during the build, checks if configuration of repository wasn't changed.
            This check is done by comparision result of commad "hg showconfig paths.default" with jenkins configuration.

            But there is a different output if the debug option is ON.
            Without debug option :
                 $ hg showconfig paths.default
                 https://hg/hg/zpis

            With debug option :
                 hg --debug showconfig paths.default
                 read config from: /etc/mercurial/hgrc
                 read config from: /data/hudson/.hgrc
                 none: https://hg/hg/zpis

            So with the debug option, the mercurial configuration is always different as jenkins configuration.

            Result is :
            -----------
            Building in workspace /data/hudson/jobs/vlk-pokus/workspace
            [workspace] $ hg --debug showconfig paths.default
            read config from: /etc/mercurial/hgrc
            read config from: /data/hudson/.hgrc
            none: https://hg/hg/zpis
            which looks different than https://hg/hg/zpis
            so falling back to fresh clone rather than incremental update


            Workaround : Switch off the degug option.

            Here's the log output:

            13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
            13:25:38 sending capabilities command
            13:25:38 sending lookup command
            13:25:38 query 1; heads
            13:25:38 sending batch command
            13:25:38 sending getbundle command
            13:25:38 adding changesets
            13:25:38 changesets: 1 chunks
            13:25:38 add changeset e1cfb9e9c39a
            13:25:38 changesets: 2 chunks
            [...]
            elifarley Elifarley made changes -
            Description Here's the log output:

            13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
            13:25:38 sending capabilities command
            13:25:38 sending lookup command
            13:25:38 query 1; heads
            13:25:38 sending batch command
            13:25:38 sending getbundle command
            13:25:38 adding changesets
            13:25:38 changesets: 1 chunks
            13:25:38 add changeset e1cfb9e9c39a
            13:25:38 changesets: 2 chunks
            [...]
            hg showconfig|grep ui.debug
            /etc/mercurial/hgrc:28: ui.debug=true

            Here's the log output:

            13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
            13:25:38 sending capabilities command
            13:25:38 sending lookup command
            13:25:38 query 1; heads
            13:25:38 sending batch command
            13:25:38 sending getbundle command
            13:25:38 adding changesets
            13:25:38 changesets: 1 chunks
            13:25:38 add changeset e1cfb9e9c39a
            13:25:38 changesets: 2 chunks
            [...]
            elifarley Elifarley made changes -
            Description hg showconfig|grep ui.debug
            /etc/mercurial/hgrc:28: ui.debug=true

            Here's the log output:

            13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
            13:25:38 sending capabilities command
            13:25:38 sending lookup command
            13:25:38 query 1; heads
            13:25:38 sending batch command
            13:25:38 sending getbundle command
            13:25:38 adding changesets
            13:25:38 changesets: 1 chunks
            13:25:38 add changeset e1cfb9e9c39a
            13:25:38 changesets: 2 chunks
            [...]
            My system-level hgrc file sets debug to on:

            hg showconfig|grep ui.debug
            /etc/mercurial/hgrc:28: ui.debug=true


            This seems to cause problems when parsing the output of hg.


            Here's the log output:

            13:25:37 Building remotely on myslave in workspace /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 $ hg clone --rev 2.8.4 --noupdate http://mymercurialrepo.com.br/hg/main/myjob /var/data/jenkins-slave/workspace/MYJOB-2.8.4
            13:25:38 using http://mymercurialrepo.com.br/hg/main/myjob
            13:25:38 sending capabilities command
            13:25:38 sending lookup command
            13:25:38 query 1; heads
            13:25:38 sending batch command
            13:25:38 sending getbundle command
            13:25:38 adding changesets
            13:25:38 changesets: 1 chunks
            13:25:38 add changeset e1cfb9e9c39a
            13:25:38 changesets: 2 chunks
            [...]
            Hide
            elifarley Elifarley added a comment -

            Adding the "--quiet" option will probably fix it, as in:

            hg --quiet showconfig paths.default

            This way the output should be stable no matter what the system-level hgrc file says about ui.debug

            Show
            elifarley Elifarley added a comment - Adding the "--quiet" option will probably fix it, as in: hg --quiet showconfig paths.default This way the output should be stable no matter what the system-level hgrc file says about ui.debug
            elifarley Elifarley made changes -
            Link This issue is related to JENKINS-13329 [ JENKINS-13329 ]
            elifarley Elifarley made changes -
            Link This issue duplicates JENKINS-13329 [ JENKINS-13329 ]
            elifarley Elifarley made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ] Jesse Glick [ jglick ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 148091 ] JNJira + In-Review [ 177088 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                elifarley Elifarley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: