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

Mercurial Push Notifications: URLs should be compared in canonical form

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • mercurial-plugin
    • None
    • Linux, Jenkis 1.506, Mercurial extension v. 1.44, mercurial 2.2

      The comparison of a job's repository URL and the URL passed to notifyCommit will fail when the 2 URLs differ slightly, even though they point to the same place.

      Example that triggers the problem:

      Repository URL (in job configuration screen): http://mymercurialrepo.com.br/hg/main/myproj/
      hook configuration:
      [hooks]
      commit.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj
      incoming.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj

      The URL comparison should first transform both URLs to their canonical form (by appending a slash at the end if one is missing, for instance).

      I guess it will also fail if one of the URLs includes an HTTP redirect.

          [JENKINS-17260] Mercurial Push Notifications: URLs should be compared in canonical form

          Elifarley created issue -
          Elifarley made changes -
          Environment New: Linux, Jenkis 1.506, Mercurial extension v. 1.44, mercurial 2.2
          Elifarley made changes -
          Description Original: The comparison of a job's repository URL and the URL passed to notifyCommit will fail when the 2 URLs differ slightly, even though they point to the same place.

          Example that triggers the problem:

          Repository URL: http://mymercurialrepo.com.br/hg/main/myproj/
          hook configuration:
          [hooks]
          commit.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj
          incoming.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj


          The URL comparison should first transform both URLs to their canonical form (by appending a slash at the end if one is missing, for instance).

          I guess it will also fail if one of the URLs includes an HTTP redirect.

          New: The comparison of a job's repository URL and the URL passed to notifyCommit will fail when the 2 URLs differ slightly, even though they point to the same place.

          Example that triggers the problem:

          Repository URL (in job configuration screen): http://mymercurialrepo.com.br/hg/main/myproj/
          hook configuration:
          [hooks]
          commit.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj
          incoming.jenkins = wget -q -O /dev/null http://myjenkins.com.br/jenkins/mercurial/notifyCommit?url=http://mymercurialrepo.com.br/hg/main/myproj


          The URL comparison should first transform both URLs to their canonical form (by appending a slash at the end if one is missing, for instance).

          I guess it will also fail if one of the URLs includes an HTTP redirect.

          Jesse Glick made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 148093 ] New: JNJira + In-Review [ 177089 ]

            jglick Jesse Glick
            elifarley Elifarley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: