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

mercurial SCM always clones (instead of pulling) when using https

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • mercurial-plugin
    • Xubuntu 12.04 precise, Java 1.6.0_24, hg 2.0.2, Jenkins 1.493, Jenkins Mercurial Plugin 1.42

      Hi,
      I am observing that the Jenkins Mercurial plugin always performs a full clone instead of a pull when I start a build.
      There were reports that this happens when the debug option is on for the mercurial plugin, but this is supposed to be fixed and this option isn't even on.

      I posted a log below and attached screenshots of the relevant options.

      Started by user Matthias Kauer
      Building in workspace /var/lib/jenkins/jobs/pyunittest/workspace
      [workspace] $ hg showconfig paths.default
      ERROR: Workspace reports paths.default as https://matthias_tumcreate@bitbucket.org/matthias_tumcreate/pyunittest
      which looks different than https://matthias_tumcreate:xxxx@bitbucket.org/matthias_tumcreate/pyunittest
      so falling back to fresh clone rather than incremental update
      $ hg clone --rev default --noupdate https://matthias_tumcreate:xxxx@bitbucket.org/matthias_tumcreate/pyunittest /var/lib/jenkins/jobs/pyunittest/workspace
      adding changesets
      adding manifests
      adding file changes
      added 1 changesets with 4 changes to 4 files
      [workspace] $ hg update --rev default
      4 files updated, 0 files merged, 0 files removed, 0 files unresolved

          [JENKINS-16138] mercurial SCM always clones (instead of pulling) when using https

          Jesse Glick added a comment -

          Duplicate of another issue, will look it up later. If you specify your HTTP(S) password in the URL the .hg/hgrc file in the workspace will omit the password and so a simple hg pull would not work (the plugin would need to append the original URL to the command line). The workaround is to either use another connection method such as SSH; or install the Mercurial plugin to remember HTTPS passwords using some manner of local keystore.

          Jesse Glick added a comment - Duplicate of another issue, will look it up later. If you specify your HTTP(S) password in the URL the .hg/hgrc file in the workspace will omit the password and so a simple hg pull would not work (the plugin would need to append the original URL to the command line). The workaround is to either use another connection method such as SSH; or install the Mercurial plugin to remember HTTPS passwords using some manner of local keystore.

          hi,
          the SSH Pull does indeed work.

          I could finally set it up. Won't say it's impossible or even hard for the target audience, but it's still quite a bit more complicated than just using https.
          (Windows users will be especially unhappy, I didn't try, just have a feeling)

          Maybe one could add a warning that using https:// will always clone?

          Anyway,
          thanks for the tip.

          Best,
          Matthias

          Matthias Kauer added a comment - hi, the SSH Pull does indeed work. I could finally set it up. Won't say it's impossible or even hard for the target audience, but it's still quite a bit more complicated than just using https. (Windows users will be especially unhappy, I didn't try, just have a feeling) Maybe one could add a warning that using https:// will always clone? Anyway, thanks for the tip. Best, Matthias

          Jesse Glick added a comment -

          A warning would be better than nothing, but I think there is an actual fix; just have not gotten to it yet.

          Jesse Glick added a comment - A warning would be better than nothing, but I think there is an actual fix; just have not gotten to it yet.

          Jesse Glick added a comment -

          One of several issues that should be resolved when Credentials integration is implemented.

          Jesse Glick added a comment - One of several issues that should be resolved when Credentials integration is implemented.

          Jesse Glick added a comment -

          Credentials integration obsoletes this issue.

          Jesse Glick added a comment - Credentials integration obsoletes this issue.

            jglick Jesse Glick
            matthiask Matthias Kauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: