1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/make-snapshot (package): accept revision as BRANCH@REV.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-08-19 13:34:40 +00:00
parent 85198c5e3c
commit c40c2839d6
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Thu Aug 19 22:34:32 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* tool/make-snapshot (package): accept revision as BRANCH@REV.
Thu Aug 19 19:53:26 2010 Tanaka Akira <akr@fsij.org> Thu Aug 19 19:53:26 2010 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (ancillary_timestamp): fix a constant type. * ext/socket/ancdata.c (ancillary_timestamp): fix a constant type.

View file

@ -71,6 +71,9 @@ Dir.chdir tmp
def package(rev, destdir) def package(rev, destdir)
patchlevel = false patchlevel = false
if revision = rev[/@(\d+)\z/, 1]
rev = $`
end
case rev case rev
when /\Atrunk\z/, /\Abranches\//, /\Atags\// when /\Atrunk\z/, /\Abranches\//, /\Atags\//
url = SVNURL + rev url = SVNURL + rev
@ -87,7 +90,7 @@ def package(rev, destdir)
warn "#{$0}: unknown version - #{rev}" warn "#{$0}: unknown version - #{rev}"
return return
end end
revision = `svn info #{url} 2>&1`[/Last Changed Rev: (\d+)/, 1] revision ||= `svn info #{url} 2>&1`[/Last Changed Rev: (\d+)/, 1]
version = nil version = nil
unless revision unless revision
url = SVNURL + "trunk" url = SVNURL + "trunk"
@ -106,7 +109,7 @@ def package(rev, destdir)
else else
v = "ruby" v = "ruby"
puts "Exporting #{rev}@#{revision}" puts "Exporting #{rev}@#{revision}"
IO.popen("svn export #{url} #{v}") do |pipe| IO.popen("svn export -r #{revision} #{url} #{v}") do |pipe|
pipe.each {|line| /^A/ =~ line or print line} pipe.each {|line| /^A/ =~ line or print line}
end end
unless $?.success? unless $?.success?