diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-17 16:36:34 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-17 16:36:34 +0000 |
commit | 30e341db6963d71fccf2d1bf24744ab828bee151 (patch) | |
tree | 48d0d989256c847c81fa69712da986803c63c30f /lib/redmine/scm/adapters/cvs_adapter.rb | |
parent | bd5977d97eaf92f852c1bfe499052b6b07ab8aae (diff) | |
download | redmine-30e341db6963d71fccf2d1bf24744ab828bee151.tar.gz redmine-30e341db6963d71fccf2d1bf24744ab828bee151.zip |
Support frozen_string_literal in lib/**/*.rb (#26561).
Contributed by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@17988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/cvs_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 730ee5caa..c45987f33 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # redMine - project management software # Copyright (C) 2006-2007 Jean-Philippe Lang @@ -93,7 +93,7 @@ module Redmine def entries(path=nil, identifier=nil, options={}) logger.debug "<cvs> entries '#{path}' with identifier '#{identifier}'" path_locale = scm_iconv(@path_encoding, 'UTF-8', path) - path_locale.force_encoding("ASCII-8BIT") + path_locale = path_locale.dup.force_encoding("ASCII-8BIT") entries = Entries.new cmd_args = %w|-q rls -e| cmd_args << "-D" << time_to_cvstime_rlog(identifier) if identifier @@ -161,7 +161,7 @@ module Redmine cmd_args << path_with_project_utf8 scm_cmd(*cmd_args) do |io| state = "entry_start" - commit_log = String.new + commit_log = "" revision = nil date = nil author = nil @@ -171,7 +171,7 @@ module Redmine branch_map = nil io.each_line() do |line| if state != "revision" && /^#{ENDLOG}/ =~ line - commit_log = String.new + commit_log = "" revision = nil state = "entry_start" end @@ -186,7 +186,7 @@ module Redmine elsif /^symbolic names:/ =~ line state = "symbolic" #unless entry.nil? elsif /^#{STARTLOG}/ =~ line - commit_log = String.new + commit_log = "" state = "revision" end next @@ -230,7 +230,7 @@ module Redmine }] }) end - commit_log = String.new + commit_log = "" revision = nil if /^#{ENDLOG}/ =~ line state = "entry_start" @@ -261,7 +261,7 @@ module Redmine # version.line_minus = 0 # end else - commit_log << line unless line =~ /^\*\*\* empty log message \*\*\*/ + commit_log += line unless line =~ /^\*\*\* empty log message \*\*\*/ end end end |