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

Gitweb URL can be mangled (if it doesn't contain a path?)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      With git plugin at b2a731e62272c93a60f7f45d9d3c5d3b1e57fa11 (so that repository browser URLs are saved) then the URL to our repository https://gerrit.company.local/gitweb?p=repo.git gets mangled to https://gerrit.company.local/gitweb/?p=repo.git. Note the extra slash after gitweb.

      I believe this is introduced by the call to normalizeToEndWithSlash() which was done for some repository types prior to https://github.com/jenkinsci/git-plugin/commit/7abfafcf58addbce2c268dbfed1910a90d4fe2a3 but is now done for all repository types in GitRepositoryBrowser. This is wrong for our particular usage. I'm happy to create a patch to fix this for all repo types that didn't formerly do this if some knows that this is the right way forward.

        Attachments

          Activity

          Hide
          joibel Alan Clucas added a comment -

          Just wondered if you wanted them squashing down?

          Show
          joibel Alan Clucas added a comment - Just wondered if you wanted them squashing down?
          Hide
          markewaite Mark Waite added a comment -

          I would prefer if you squashed them down so that there isn't an intermediate state where the constructor is missing.

          Show
          markewaite Mark Waite added a comment - I would prefer if you squashed them down so that there isn't an intermediate state where the constructor is missing.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alan Clucas
          Path:
          src/main/java/hudson/plugins/git/browser/BitbucketWeb.java
          src/main/java/hudson/plugins/git/browser/CGit.java
          src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitBlitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitLab.java
          src/main/java/hudson/plugins/git/browser/GitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitWeb.java
          src/main/java/hudson/plugins/git/browser/GithubWeb.java
          src/main/java/hudson/plugins/git/browser/GitoriousWeb.java
          src/main/java/hudson/plugins/git/browser/KilnGit.java
          src/main/java/hudson/plugins/git/browser/Phabricator.java
          src/main/java/hudson/plugins/git/browser/RedmineWeb.java
          src/main/java/hudson/plugins/git/browser/RhodeCode.java
          src/main/java/hudson/plugins/git/browser/Stash.java
          src/main/java/hudson/plugins/git/browser/ViewGitWeb.java
          http://jenkins-ci.org/commit/git-plugin/510337b35a4665f1d938d35215801bd9d354554e
          Log:
          JENKINS-22342 ensure URL normalization correct

          Previous attempts to fix this stored the normalization flag
          in the serialized repository browser. Moved to be a function
          call to avoid the deserializer getting involved

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alan Clucas Path: src/main/java/hudson/plugins/git/browser/BitbucketWeb.java src/main/java/hudson/plugins/git/browser/CGit.java src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitBlitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitLab.java src/main/java/hudson/plugins/git/browser/GitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitWeb.java src/main/java/hudson/plugins/git/browser/GithubWeb.java src/main/java/hudson/plugins/git/browser/GitoriousWeb.java src/main/java/hudson/plugins/git/browser/KilnGit.java src/main/java/hudson/plugins/git/browser/Phabricator.java src/main/java/hudson/plugins/git/browser/RedmineWeb.java src/main/java/hudson/plugins/git/browser/RhodeCode.java src/main/java/hudson/plugins/git/browser/Stash.java src/main/java/hudson/plugins/git/browser/ViewGitWeb.java http://jenkins-ci.org/commit/git-plugin/510337b35a4665f1d938d35215801bd9d354554e Log: JENKINS-22342 ensure URL normalization correct Previous attempts to fix this stored the normalization flag in the serialized repository browser. Moved to be a function call to avoid the deserializer getting involved
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/hudson/plugins/git/browser/BitbucketWeb.java
          src/main/java/hudson/plugins/git/browser/CGit.java
          src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitBlitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitLab.java
          src/main/java/hudson/plugins/git/browser/GitRepositoryBrowser.java
          src/main/java/hudson/plugins/git/browser/GitWeb.java
          src/main/java/hudson/plugins/git/browser/GithubWeb.java
          src/main/java/hudson/plugins/git/browser/GitoriousWeb.java
          src/main/java/hudson/plugins/git/browser/KilnGit.java
          src/main/java/hudson/plugins/git/browser/Phabricator.java
          src/main/java/hudson/plugins/git/browser/RedmineWeb.java
          src/main/java/hudson/plugins/git/browser/RhodeCode.java
          src/main/java/hudson/plugins/git/browser/Stash.java
          src/main/java/hudson/plugins/git/browser/ViewGitWeb.java
          http://jenkins-ci.org/commit/git-plugin/737e25272e598fa3786ab2dd961cbcf0ebe2eceb
          Log:
          Merge pull request #224 from Joibel/master

          [Fixed JENKINS-22342] ensure URL normalization correct, retain compatibility

          Compare: https://github.com/jenkinsci/git-plugin/compare/743d715f2118...737e25272e59

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/browser/BitbucketWeb.java src/main/java/hudson/plugins/git/browser/CGit.java src/main/java/hudson/plugins/git/browser/FisheyeGitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitBlitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitLab.java src/main/java/hudson/plugins/git/browser/GitRepositoryBrowser.java src/main/java/hudson/plugins/git/browser/GitWeb.java src/main/java/hudson/plugins/git/browser/GithubWeb.java src/main/java/hudson/plugins/git/browser/GitoriousWeb.java src/main/java/hudson/plugins/git/browser/KilnGit.java src/main/java/hudson/plugins/git/browser/Phabricator.java src/main/java/hudson/plugins/git/browser/RedmineWeb.java src/main/java/hudson/plugins/git/browser/RhodeCode.java src/main/java/hudson/plugins/git/browser/Stash.java src/main/java/hudson/plugins/git/browser/ViewGitWeb.java http://jenkins-ci.org/commit/git-plugin/737e25272e598fa3786ab2dd961cbcf0ebe2eceb Log: Merge pull request #224 from Joibel/master [Fixed JENKINS-22342] ensure URL normalization correct, retain compatibility Compare: https://github.com/jenkinsci/git-plugin/compare/743d715f2118...737e25272e59
          Hide
          markewaite Mark Waite added a comment -

          Fixed in git-plugin 2.2.1 release 12 Apr 2014

          Show
          markewaite Mark Waite added a comment - Fixed in git-plugin 2.2.1 release 12 Apr 2014

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              joibel Alan Clucas
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: