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

ruby-changes:37298

From: usa <ko1@a...>
Date: Thu, 22 Jan 2015 18:06:10 +0900 (JST)
Subject: [ruby-changes:37298] usa:r49379 (trunk): * tool/redmine-backporter.rb (find_svn_log): use double quotes instead

usa	2015-01-22 18:05:53 +0900 (Thu, 22 Jan 2015)

  New Revision: 49379

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

  Log:
    * tool/redmine-backporter.rb (find_svn_log): use double quotes instead
      of single quotes because cmd.exe doesn't handle them.
    
    * tool/redmine-backporter.rb (done): the 2nd element of matched data
      is the offset of the end of matched string, not length.

  Modified files:
    trunk/ChangeLog
    trunk/tool/redmine-backporter.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49378)
+++ ChangeLog	(revision 49379)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jan 22 18:03:19 2015  NAKAMURA Usaku  <usa@r...>
+
+	* tool/redmine-backporter.rb (find_svn_log): use double quotes instead
+	  of single quotes because cmd.exe doesn't handle them.
+
+	* tool/redmine-backporter.rb (done): the 2nd element of matched data
+	  is the offset of the end of matched string, not length.
+
 Thu Jan 22 16:45:24 2015  Eric Wong  <e@8...>
 
 	* st.c (st_numhash): mix float value for flonum
Index: tool/redmine-backporter.rb
===================================================================
--- tool/redmine-backporter.rb	(revision 49378)
+++ tool/redmine-backporter.rb	(revision 49379)
@@ -238,7 +238,7 @@ def mergeinfo https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L238
 end
 
 def find_svn_log(pattern)
-  `svn log --xml --stop-on-copy --search='#{pattern}' #{RUBY_REPO_PATH}`
+  `svn log --xml --stop-on-copy --search="#{pattern}" #{RUBY_REPO_PATH}`
 end
 
 def show_last_journal(http, uri)
@@ -389,7 +389,7 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L389
       if h and val = h["value"]
         case val[/(?:\A|, )#{Regexp.quote TARGET_VERSION}: ([^,]+)/, 1]
         when 'REQUIRED', 'UNKNOWN', 'DONTNEED', 'WONTFIX'
-          val[*$~.offset(1)] = 'DONE'
+          val[$~.offset(1)[0]...$~.offset(1)[1]] = 'DONE'
         when 'DONE' # , /\A\d+\z/
           puts 'already backport is done'
           next # already done

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

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