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

Prefix or truncate the file path of a change set to build Trac source browser URL

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • trac-plugin
    • None

    Description

      Trac browser URL can not always be created by appending the Trac URL and the changed file path.
      Sometimes the file path must be truncated (see JENKINS-7032), sometime the file path must be extended by a prefix.

      Example for Truncate
      The link will then point at:
      http://trac.mycompany.com/trac-project/browser/Product/Trunk/subdir/file.txt
      But my Trac installation has its root at Product/Trunk/, so the only link that would work is:
      http://trac.mycompany.com/trac-project/browser/subdir/file.txt

      Example for Prefix
      Only the path to the file is included resulting in incorrect urls. So for example, I get this incorrect url:
      http://trac.mycompany.com/browser/myfile.py
      instead of this correct url:
      http://trac.mycompany.com/browser/myrepo/myfile.py

      Attachments

        Activity

          gerd_zanker Gerd Zanker created issue -
          gerd_zanker Gerd Zanker added a comment -

          See also JENKINS-7032

          gerd_zanker Gerd Zanker added a comment - See also JENKINS-7032
          gerd_zanker Gerd Zanker made changes -
          Field Original Value New Value
          Description Trac browser URL can not always be created by appending the Trac URL and the changed file path.
          Sometimes the file path must be truncated (see JENKINS-7032), sometime the file path must be extended by a prefix.


          *Example for Truncate*
          The link will then point at:
          {{http://trac.mycompany.com/trac-project/browser/Product/Trunk/subdir/file.txt}}
          But my Trac installation has its root at Product/Trunk/, so the only link that would work is:
          {{http://trac.mycompany.com/trac-project/browser/subdir/file.txt}}

          *Example for Prefix*
          Only the path to the file is included resulting in incorrect urls. So for example, I get this incorrect url:
          {{http:// trac.mycompany.com/browser/myfile.py}}
          instead of this correct url:
          {{http:// trac.mycompany.com/browser/*myrepo/*myfile.py}}
          Trac browser URL can not always be created by appending the Trac URL and the changed file path.
          Sometimes the file path must be truncated (see JENKINS-7032), sometime the file path must be extended by a prefix.


          *Example for Truncate*
          The link will then point at:
          {{http://trac.mycompany.com/trac-project/browser/Product/Trunk/subdir/file.txt}}
          But my Trac installation has its root at Product/Trunk/, so the only link that would work is:
          {{http://trac.mycompany.com/trac-project/browser/subdir/file.txt}}

          *Example for Prefix*
          Only the path to the file is included resulting in incorrect urls. So for example, I get this incorrect url:
          {{http://trac.mycompany.com/browser/myfile.py}}
          instead of this correct url:
          {{http://trac.mycompany.com/browser/*myrepo/*myfile.py}}
          gerd_zanker Gerd Zanker made changes -
          Description Trac browser URL can not always be created by appending the Trac URL and the changed file path.
          Sometimes the file path must be truncated (see JENKINS-7032), sometime the file path must be extended by a prefix.


          *Example for Truncate*
          The link will then point at:
          {{http://trac.mycompany.com/trac-project/browser/Product/Trunk/subdir/file.txt}}
          But my Trac installation has its root at Product/Trunk/, so the only link that would work is:
          {{http://trac.mycompany.com/trac-project/browser/subdir/file.txt}}

          *Example for Prefix*
          Only the path to the file is included resulting in incorrect urls. So for example, I get this incorrect url:
          {{http://trac.mycompany.com/browser/myfile.py}}
          instead of this correct url:
          {{http://trac.mycompany.com/browser/*myrepo/*myfile.py}}
          Trac browser URL can not always be created by appending the Trac URL and the changed file path.
          Sometimes the file path must be truncated (see JENKINS-7032), sometime the file path must be extended by a prefix.


          *Example for Truncate*
          The link will then point at:
          {{http://trac.mycompany.com/trac-project/browser/Product/Trunk/subdir/file.txt}}
          But my Trac installation has its root at Product/Trunk/, so the only link that would work is:
          {{http://trac.mycompany.com/trac-project/browser/subdir/file.txt}}

          *Example for Prefix*
          Only the path to the file is included resulting in incorrect urls. So for example, I get this incorrect url:
          {{http://trac.mycompany.com/browser/myfile.py}}
          instead of this correct url:
          {{http://trac.mycompany.com/browser/myrepo/myfile.py}}
          gerd_zanker Gerd Zanker made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          gerd_zanker Gerd Zanker made changes -
          Assignee Gerd Zanker [ gerd_zanker ]

          Code changed in jenkins
          User: Gerd Zanker
          Path:
          pom.xml
          src/main/java/hudson/plugins/trac/TracRepositoryBrowser.java
          src/test/java/hudson/plugins/trac/TracSvnRepositoryBrowserTest.java
          src/test/resources/hudson/plugins/trac/changelog-with-deleted-file.xml
          src/test/resources/hudson/plugins/trac/changelog_unsorted.xml
          http://jenkins-ci.org/commit/trac-plugin/70dbb9210b77cf46c76dc2330b7d8d6dabd6293e
          Log:
          Added test for existing subversion TracRepositoryBrowser class to have a
          clean, tested base for JENKINS-7032 and JENKINS-13366

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gerd Zanker Path: pom.xml src/main/java/hudson/plugins/trac/TracRepositoryBrowser.java src/test/java/hudson/plugins/trac/TracSvnRepositoryBrowserTest.java src/test/resources/hudson/plugins/trac/changelog-with-deleted-file.xml src/test/resources/hudson/plugins/trac/changelog_unsorted.xml http://jenkins-ci.org/commit/trac-plugin/70dbb9210b77cf46c76dc2330b7d8d6dabd6293e Log: Added test for existing subversion TracRepositoryBrowser class to have a clean, tested base for JENKINS-7032 and JENKINS-13366
          gerd_zanker Gerd Zanker made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          gerd_zanker Gerd Zanker added a comment -

          Merged with pull request #5 into trac master branch.

          gerd_zanker Gerd Zanker added a comment - Merged with pull request #5 into trac master branch.
          gerd_zanker Gerd Zanker made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 143830 ] JNJira + In-Review [ 190766 ]

          People

            gerd_zanker Gerd Zanker
            gerd_zanker Gerd Zanker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: