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

ruby-changes:42316

From: naruse <ko1@a...>
Date: Tue, 29 Mar 2016 18:59:33 +0900 (JST)
Subject: [ruby-changes:42316] naruse:r54390 (trunk): * tool/redmine-backporter.rb (backport): show merger.rb's path.

naruse	2016-03-29 18:59:27 +0900 (Tue, 29 Mar 2016)

  New Revision: 54390

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

  Log:
    * tool/redmine-backporter.rb (backport): show merger.rb's path.
    
    * tool/redmine-backporter.rb (show): show current issue again if no
      ticket number is given.
    
    * tool/redmine-backporter.rb (rel): show error message if current
      bugs.ruby-lang.org doesn't support the API.

  Modified files:
    trunk/ChangeLog
    trunk/tool/redmine-backporter.rb
Index: tool/redmine-backporter.rb
===================================================================
--- tool/redmine-backporter.rb	(revision 54389)
+++ tool/redmine-backporter.rb	(revision 54390)
@@ -299,6 +299,10 @@ def show_last_journal(http, uri) https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L299
   puts x["notes"]
 end
 
+def merger_path
+  File.expand_path('../merger.rb', __FILE__)
+end
+
 def backport_command_string
   unless @changesets.respond_to?(:validated)
     @changesets = @changesets.select do |c|
@@ -312,7 +316,7 @@ def backport_command_string https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L316
     end
     @changesets.define_singleton_method(:validated){true}
   end
-  " backport --ticket=#{@issue} #{@changesets.join(',')}"
+  " #{merger_path} --ticket=#{@issue} #{@changesets.join(',')}"
 end
 
 def status_char(obj)
@@ -348,10 +352,15 @@ commands = { https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L352
   },
 
   "show" => proc{|args|
-    raise CommandSyntaxError unless /\A(\d+)\z/ =~ args
-    id = $1.to_i
-    id = @issues[id]["id"] if @issues && id < @issues.size
-    @issue = id
+    if /\A(\d+)\z/ =~ args
+      id = $1.to_i
+      id = @issues[id]["id"] if @issues && id < @issues.size
+      @issue = id
+    elsif @issue
+      id = @issue
+    else
+      raise CommandSyntaxError
+    end
     uri = "#{REDMINE_BASE}/issues/#{id}"
     uri = URI(uri+".json?include=children,attachments,relations,changesets,journals")
     res = JSON(uri.read($openuri_options))
@@ -407,6 +416,12 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L416
     Net::HTTP.start(uri.host, uri.port, http_options) do |http|
       res = http.post(uri.path, "issue_id=#@issue",
                      'X-Redmine-API-Key' => REDMINE_API_KEY)
+      begin
+        res.value
+      rescue
+        $stderr.puts "deployed redmine doesn't have https://github.com/ruby/bugs.ruby-lang.org/commit/01fbba60d68cb916ddbccc8a8710e68c5217171d\nask naruse or hsbt"
+        return
+      end
       puts res.body
       class << @changesets
         remove_method(:validated) rescue nil
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54389)
+++ ChangeLog	(revision 54390)
@@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Mar 29 18:56:55 2016  NARUSE, Yui  <naruse@r...>
+
+	* tool/redmine-backporter.rb (backport): show merger.rb's path.
+
+	* tool/redmine-backporter.rb (show): show current issue again if no
+	  ticket number is given.
+
+	* tool/redmine-backporter.rb (rel): show error message if current
+	  bugs.ruby-lang.org doesn't support the API.
+
+Tue Mar 29 18:54:34 2016  NARUSE, Yui  <naruse@r...>
+
+	* tool/merger.rb: support to backport header as backport identifier.
+	  Now you can specify by 'merge revision(s) 49254: [Backport #10738]'.
+
 Tue Mar 29 16:53:44 2016  Martin Duerst  <duerst@i...>
 
 	* enc/unicode/case-folding.rb, casefold.h: Tweaked handling of 6

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

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