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

ruby-changes:36865

From: nobu <ko1@a...>
Date: Wed, 24 Dec 2014 02:12:45 +0900 (JST)
Subject: [ruby-changes:36865] nobu:r48946 (trunk): make-snapshot: fix stable snapshot

nobu	2014-12-24 02:12:25 +0900 (Wed, 24 Dec 2014)

  New Revision: 48946

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

  Log:
    make-snapshot: fix stable snapshot
    
    * tool/make-snapshot (package): VCS#branch_list expects glob a
      pattern string but not a regexp.  based on the patch by Vit
      Ondruch.  in [ruby-core:67064].  [Bug #10636]
    * tool/vcs.rb (VCS::SVN#branch_list): strip newlines.
    * tool/vcs.rb (VCS::GIT.get_revisions): retrieve modified time
      from toplevel log too.
    * tool/vcs.rb (VCS::GIT#branch_list): yield for each lines.

  Modified files:
    trunk/ChangeLog
    trunk/tool/make-snapshot
    trunk/tool/vcs.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48945)
+++ ChangeLog	(revision 48946)
@@ -1,3 +1,16 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Dec 24 02:12:22 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* tool/make-snapshot (package): VCS#branch_list expects glob a
+	  pattern string but not a regexp.  based on the patch by Vit
+	  Ondruch.  in [ruby-core:67064].  [Bug #10636]
+
+	* tool/vcs.rb (VCS::SVN#branch_list): strip newlines.
+
+	* tool/vcs.rb (VCS::GIT.get_revisions): retrieve modified time
+	  from toplevel log too.
+
+	* tool/vcs.rb (VCS::GIT#branch_list): yield for each lines.
+
 Wed Dec 24 00:23:13 2014  NAKAMURA Usaku  <usa@r...>
 
 	* tool/extlibs.rb (do_extract): the pipe should be binmode.
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 48945)
+++ tool/vcs.rb	(revision 48946)
@@ -161,6 +161,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L161
     def branch_list(pat)
       IO.popen(%W"svn ls #{branch('')}") do |f|
         f.each do |line|
+          line.chomp!
           line.chomp!('/')
           yield(line) if File.fnmatch?(pat, line)
         end
@@ -195,7 +196,8 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L196
       logcmd[1, 0] = ["-C", srcdir] if srcdir
       logcmd << "--grep=^ *git-svn-id: .*@[0-9][0-9]*"
       idpat = /git-svn-id: .*?@(\d+) \S+\Z/
-      last = IO.pread(logcmd)[idpat, 1]
+      log = IO.pread(logcmd)
+      last = log[idpat, 1]
       if path
         log = IO.pread(logcmd + [path])
         changed = log[idpat, 1]
@@ -222,10 +224,15 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L224
       branch(IO.pread(cmd)[/.*^(ruby_\d+_\d+)$/m, 1])
     end
 
-    def branch_list(pat, &block)
+    def branch_list(pat)
       cmd = %W"git for-each-ref --format=\%(refname:short) refs/heads/#{pat}"
       cmd[1, 0] = ["-C", @srcdir] if @srcdir
-      IO.popen(cmd, &block)
+      IO.popen(cmd) {|f|
+        f.each {|line|
+          line.chomp!
+          yield line
+        }
+      }
     end
 
     def grep(pat, tag, *files, &block)
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 48945)
+++ tool/make-snapshot	(revision 48946)
@@ -139,7 +139,7 @@ def package(vcs, rev, destdir, tmp = nil https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L139
   when /\Atags\//
     url = vcs.tag($')
   when /\Astable\z/
-    vcs.branch_list(/ruby_[0-9]*/) {|n| url = /\Aruby_\d+_\d+\z/ =~ n}
+    vcs.branch_list("ruby_[0-9]*") {|n| url = n[/\Aruby_\d+_\d+\z/]}
     url &&= vcs.branch(url)
   when /\A(.*)\.(.*)\.(.*)-(preview|rc)(\d+)/
     prerelease = true

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

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