diff options
author | Scott Barron <scott@elitists.net> | 2006-04-04 17:44:34 +0000 |
---|---|---|
committer | Scott Barron <scott@elitists.net> | 2006-04-04 17:44:34 +0000 |
commit | 6b3bc1bc5216b7859552a131dbd8cdf843982119 (patch) | |
tree | d248db117ed5749b37571a8b23fbdf8b9aa855aa | |
parent | fb8428fe0dbb53d1793ecc9cb623f96418566029 (diff) | |
download | rails-6b3bc1bc5216b7859552a131dbd8cdf843982119.tar.gz rails-6b3bc1bc5216b7859552a131dbd8cdf843982119.tar.bz2 rails-6b3bc1bc5216b7859552a131dbd8cdf843982119.zip |
A better idea, take the -qr HEAD log as before but use the root of the svn
instead of rails trunk. This allows svn 1.1.x (debian) to work with freeze
edge out of the box, without having to specify REVISION.
References #4356, #4450, #4569.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/tasks/framework.rake | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 034d26ef49..d12471949b 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -35,30 +35,25 @@ namespace :rails do desc "Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)" task :edge do $verbose = false - svn_version = `svn --version -q` rescue nil + `svn --version` rescue nil unless !$?.nil? && $?.success? $stderr.puts "ERROR: Must have subversion (svn) available in the PATH to lock this application to Edge Rails" exit 1 end - - major, minor, sub = svn_version.strip.split '.' - if ENV['REVISION'].nil? && major.to_i == 1 && minor.to_i < 2 - puts "The --limit option is not available in your version of svn." - puts "Please try this syntax: rake rails:freeze:edge REVISION=4145" - exit 1 - end - + rm_rf "vendor/rails" mkdir_p "vendor/rails" + + svn_root = "http://dev.rubyonrails.org/svn/rails/" if ENV['TAG'] - rails_svn = "http://dev.rubyonrails.org/svn/rails/tags/#{ENV['TAG']}" + rails_svn = "#{svn_root}/tags/#{ENV['TAG']}" touch "vendor/rails/TAG_#{ENV['TAG']}" else - rails_svn = 'http://dev.rubyonrails.org/svn/rails/trunk' + rails_svn = "#{svn_root}/trunk" if ENV['REVISION'].nil? - ENV['REVISION'] = /^r(\d+)/.match(%x{svn log -q --limit 1 #{rails_svn}})[1] + ENV['REVISION'] = /^r(\d+)/.match(%x{svn -qr HEAD log #{svn_root}})[1] puts "REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}." end |