Actions
Defect #19835
closedNewlines stripped from CVS commit messages
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
I noticed this in 3.0.3 but I think the issue was introduced with this change.
This is on Linux with the 3.0.3 tarball, rails 4.2.1, ruby 2.2.2-p95, CVS 1.12.13 and mysql 5.6.24 with the msyql2 adapter.
A quick fix that seems to work is:
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb
index 92be438..8aceca6 100644
--- a/lib/redmine/scm/adapters/cvs_adapter.rb
+++ b/lib/redmine/scm/adapters/cvs_adapter.rb
@@ -260,7 +260,7 @@ module Redmine
                   #                  version.line_minus = 0
                   #                end
                 else
-                  commit_log << line unless line =~ /^\*\*\* empty log message \*\*\*/
+                  commit_log << line << "\n" unless line =~ /^\*\*\* empty log message \*\*\*/
                 end
               end
             end
but I'm not sure if something should be done with the encoding.
       Updated by Toshi MARUYAMA over 10 years ago
      Updated by Toshi MARUYAMA over 10 years ago
      
    
    - Target version set to 3.0.4
Original change is r13442.
Index: cvs_adapter.rb
===================================================================
--- cvs_adapter.rb    (revision 13441)
+++ cvs_adapter.rb    (revision 13442)
@@ -168,6 +168,7 @@
             file_state = nil
             branch_map = nil
             io.each_line() do |line|
+              line = line.strip
               if state != "revision" && /^#{ENDLOG}/ =~ line
                 commit_log = String.new
                 revision   = nil
I think we can revert this "line = line.strip" addition because Redmine 3.0 does not support JRuby.
       Updated by Jean-Philippe Lang over 10 years ago
      Updated by Jean-Philippe Lang over 10 years ago
      
    
    - Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Change reverted.
       Updated by Jean-Philippe Lang over 10 years ago
      Updated by Jean-Philippe Lang over 10 years ago
      
    
    - Status changed from Resolved to Closed
Actions