diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 17:12:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 17:12:25 +0000 |
commit | 730c94172800dd3e4d6dbea42845b3c5500a8171 (patch) | |
tree | c303255d594a30951880dd770eb384cc4ec487ca | |
parent | b1186bf39f4e9451b1c743ff8793034705f2dfa8 (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 13 | ||||
-rwxr-xr-x | tool/make-snapshot | 2 | ||||
-rw-r--r-- | tool/vcs.rb | 13 |
3 files changed, 24 insertions, 4 deletions
@@ -1,3 +1,16 @@ +Wed Dec 24 02:12:22 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@ruby-lang.org> * tool/extlibs.rb (do_extract): the pipe should be binmode. diff --git a/tool/make-snapshot b/tool/make-snapshot index 0c245325a2..46387cf81a 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -139,7 +139,7 @@ def package(vcs, rev, destdir, tmp = nil) 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 diff --git a/tool/vcs.rb b/tool/vcs.rb index 71eb689f0e..66d276450e 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -161,6 +161,7 @@ class VCS 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 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 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) |