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

Newline characters in commit logs not parsed correctly

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Master (Windows 7), Slaves (Windows 7, Ubuntu 14.04 LTS)
      Jenkins: 2.7.1 LTS
      Subversion plugin 2.6
    • Similar Issues:

      Description

      I have several jobs building via subversion commit triggers.
      The commit messages contain several lines with the majority in the following format:

      Commiter Name:
      Details of change1.
      Details of change2.
      

      Up to Jenkins version 1.651.1 + Subversion plugin 2.5.7, the build page displayed the commit message with several lines correctly under "change history".
      After upgrading to Jenkins 1.651.3 + Subversion plugin 2.6 and now Jenkins 2.7.1 + Subversion plugin 2.6, the commit message is displayed as a single line.
      For example, the commit message above would be displayed as follows:

      Commiter Name:<br>Details of change1.<br>Details of change2.
      

      Checking the html page source of the build page, it looks like the newline characters in the commit message are being generated as:

      &lt;br>
      

      As a result, the commit message is being displayed as a single line.

        Attachments

          Issue Links

            Activity

            Hide
            reinholdfuereder Reinhold Füreder added a comment -

            Thanks Jesse Glick and Łukasz Jąder: I have thus filed JENKINS-42740 – a minor improvement issue for that.

            Show
            reinholdfuereder Reinhold Füreder added a comment - Thanks  Jesse Glick and Łukasz Jąder : I have thus filed JENKINS-42740 – a minor improvement issue for that.
            Hide
            ljader Łukasz Jąder added a comment -

            Hi Reinhold Füreder,

            Honestly I'm with Jesse on having this reported as a separate issue.

            I've ran an initial analysis and I think parsing commit message should be implemented as in Git Plugin.
            The git-plugin checks if there is a blank 2nd line (commit message with format http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) and displays only this line on main job page and each build page,
            but it displays full commit message on "Changes" section (job/test-git-repo/4/changes).

            Just for reference, please checkout usage of "msgAnnotated" and "commentAnnotated" here:
            https://github.com/jenkinsci/git-plugin/blob/master/src/main/resources/hudson/plugins/git/GitChangeSetList/index.jelly

            Show
            ljader Łukasz Jąder added a comment - Hi Reinhold Füreder , Honestly I'm with Jesse on having this reported as a separate issue. I've ran an initial analysis and I think parsing commit message should be implemented as in Git Plugin. The git-plugin checks if there is a blank 2nd line (commit message with format http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) and displays only this line on main job page and each build page, but it displays full commit message on "Changes" section (job/test-git-repo/4/changes). Just for reference, please checkout usage of "msgAnnotated" and "commentAnnotated" here: https://github.com/jenkinsci/git-plugin/blob/master/src/main/resources/hudson/plugins/git/GitChangeSetList/index.jelly
            Hide
            jglick Jesse Glick added a comment -

            Reinhold Füreder maybe that would be a follow-up issue. I do not know anything about. I am not pretending to maintain this plugin or examine arbitrary issue reports in it, much less trying to fix them.

            Show
            jglick Jesse Glick added a comment - Reinhold Füreder maybe that would be a follow-up issue. I do not know anything about. I am not pretending to maintain this plugin or examine arbitrary issue reports in it, much less trying to fix them.
            Hide
            reinholdfuereder Reinhold Füreder added a comment -

            Jesse Glick According to https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin this issue has been fixed and released in version 2.7.2 of the plugin on 7.3.2017.

            I like this fix/improvement, but there also seems to be a "Summary" section in old/classic UI's "Changes" section, that I think should also be adapted like this (if possible):

            • see
            • see "src/main/resources/hudson/scm/SubversionChangeLogSet/index.jelly", line 33
            Show
            reinholdfuereder Reinhold Füreder added a comment - Jesse Glick According to https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin this issue has been fixed and released in version 2.7.2 of the plugin on 7.3.2017. I like this fix/improvement, but there also seems to be a "Summary" section in old/classic UI's "Changes" section, that I think should also be adapted like this (if possible): see see "src/main/resources/hudson/scm/SubversionChangeLogSet/index.jelly", line 33
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Łukasz Jąder
            Path:
            src/main/resources/hudson/scm/SubversionChangeLogSet/digest.jelly
            src/main/resources/hudson/scm/SubversionChangeLogSet/index.jelly
            http://jenkins-ci.org/commit/subversion-plugin/8dc995bf09d1e51b365e4e7308fb40ea7f705f8b
            Log:
            Merge pull request #174 from ljader/fix-commit-message-escaping

            JENKINS-36521 Print raw (not HTML escaped) commit messages

            Compare: https://github.com/jenkinsci/subversion-plugin/compare/de82ef7a892e...8dc995bf09d1

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Łukasz Jąder Path: src/main/resources/hudson/scm/SubversionChangeLogSet/digest.jelly src/main/resources/hudson/scm/SubversionChangeLogSet/index.jelly http://jenkins-ci.org/commit/subversion-plugin/8dc995bf09d1e51b365e4e7308fb40ea7f705f8b Log: Merge pull request #174 from ljader/fix-commit-message-escaping JENKINS-36521 Print raw (not HTML escaped) commit messages Compare: https://github.com/jenkinsci/subversion-plugin/compare/de82ef7a892e...8dc995bf09d1

              People

              • Assignee:
                ljader Łukasz Jąder
                Reporter:
                chikigai chikigai
              • Votes:
                11 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: