[前][次][番号順一覧][スレッド一覧]

ruby-changes:33109

From: naruse <ko1@a...>
Date: Thu, 27 Feb 2014 13:10:08 +0900 (JST)
Subject: [ruby-changes:33109] naruse:r45189 (trunk): tool/merger.rb: normalize the merged revision string

naruse	2014-02-27 13:10:03 +0900 (Thu, 27 Feb 2014)

  New Revision: 45189

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45189

  Log:
    tool/merger.rb: normalize the merged revision string

  Modified files:
    trunk/tool/merger.rb
Index: tool/merger.rb
===================================================================
--- tool/merger.rb	(revision 45188)
+++ tool/merger.rb	(revision 45189)
@@ -170,19 +170,25 @@ else https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L170
   end
 
   q = $repos + (ARGV[1] || default_merge_branch)
-  revs = ARGV[0].split(/,\s*/)
+  revstr = ARGV[0].delete('^, :\-0-9')
+  revs = revstr.split(/[,\s]+/)
   log = ''
   log_svn = ''
 
   revs.each do |rev|
     case rev
-    when /\Ar?\d+:r?\d+\z/
+    when /\A\d+:\d+\z/
       r = ['-r', rev]
-    when /\Ar?\d+\z/
+    when /\A(\d+)-(\d+)\z/
+      r = ['-r', rev]
+    when /\A\d+\z/
       r = ['-c', rev]
     when nil then
       puts "#$0 revision"
       exit
+    else
+      puts "invalid revision part '#{rev}' in '#{ARGV[0]}'"
+      exit
     end
 
     l = IO.popen %w'svn diff' + r + %w'--diff-cmd=diff -x -pU0' + [File.join(q, 'ChangeLog')] do |f|
@@ -224,7 +230,7 @@ else https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L230
 
   version_up
   f = Tempfile.new 'merger.rb'
-  f.printf "merge revision(s) %s:%s\n", ARGV[0], tickets.join
+  f.printf "merge revision(s) %s:%s\n", revstr, tickets.join
   f.write log_svn
   f.flush
   f.close

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]