ruby-changes:45810
From: naruse <ko1@a...>
Date: Sun, 12 Mar 2017 04:03:15 +0900 (JST)
Subject: [ruby-changes:45810] naruse:r57883 (trunk): Generate log from svn log
naruse 2017-03-12 04:03:11 +0900 (Sun, 12 Mar 2017) New Revision: 57883 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57883 Log: Generate log from svn log When there's multiple revisions, all svn logs should be used. Modified files: trunk/tool/merger.rb Index: tool/merger.rb =================================================================== --- tool/merger.rb (revision 57882) +++ tool/merger.rb (revision 57883) @@ -212,13 +212,14 @@ else https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L212 end log << l - log_svn << l.lines.grep(/^\+\t/).join.gsub(/^\+/, '').gsub(/^\t\*/, "\n\t\*") + l = l.lines.grep(/^\+\t/).join.gsub(/^\+/, '').gsub(/^\t\*/, "\n\t\*") - if log_svn.empty? - log_svn = IO.popen %w'svn log ' + r + [q] do |f| + if l.empty? + l = IO.popen %w'svn log ' + r + [q] do |f| f.read - end.sub(/\A-+\nr.*\n/, '').sub(/\n-+\n\z/, '').gsub(/^(?=\S)/, "\t") + end.sub(/\A-+\nr.*\n/, '').sub(/\n-+\n\z/, '').gsub(/^./, "\t\\&") end + log_svn << l a = %w'svn merge --accept=postpone' + r + [q] STDERR.puts a.join(' ') -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/