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

ruby-changes:36850

From: naruse <ko1@a...>
Date: Tue, 23 Dec 2014 22:04:12 +0900 (JST)
Subject: [ruby-changes:36850] naruse:r48931 (trunk): avoid a bug of the latest redmine

naruse	2014-12-23 22:04:06 +0900 (Tue, 23 Dec 2014)

  New Revision: 48931

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

  Log:
    avoid a bug of the latest redmine
    
    even if call ?include=changesets, latest redmine doesn't return
    changesets.

  Modified files:
    trunk/tool/redmine-backporter.rb
Index: tool/redmine-backporter.rb
===================================================================
--- tool/redmine-backporter.rb	(revision 48930)
+++ tool/redmine-backporter.rb	(revision 48931)
@@ -276,20 +276,24 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/redmine-backporter.rb#L276
     #end
     sio.puts i["description"]
     sio.puts
-    sio.puts "= changesets"
-    @changesets = []
-    i["changesets"].each do |x|
-      @changesets << x["revision"]
-      sio.puts "== #{x["revision"]} #{x["committed_on"]} #{x["user"]["name"] rescue nil}"
-      sio.puts x["comments"]
+    if i["changesets"]
+      sio.puts "= changesets"
+      @changesets = []
+      i["changesets"].each do |x|
+        @changesets << x["revision"]
+        sio.puts "== #{x["revision"]} #{x["committed_on"]} #{x["user"]["name"] rescue nil}"
+        sio.puts x["comments"]
+      end
     end
-    sio.puts "= journals"
-    i["journals"].each do |x|
-      sio.puts "== #{x["user"]["name"]} (#{x["created_on"]})"
-      x["details"].each do |y|
-        sio.puts JSON(y)
+    if i["journals"] && !i["journals"].empty?
+      sio.puts "= journals"
+      i["journals"].each do |x|
+        sio.puts "== #{x["user"]["name"]} (#{x["created_on"]})"
+        x["details"].each do |y|
+          sio.puts JSON(y)
+        end
+        sio.puts x["notes"]
       end
-      sio.puts x["notes"]
     end
     more(sio)
 

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

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