aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorScott Barron <scott@elitists.net>2006-04-04 17:00:17 +0000
committerScott Barron <scott@elitists.net>2006-04-04 17:00:17 +0000
commitfb8428fe0dbb53d1793ecc9cb623f96418566029 (patch)
tree01c91175112ad0354663051e0afa6cca134350e8 /railties
parentc66b44e76daa96bcff62267cd2690a3755ca6bbd (diff)
downloadrails-fb8428fe0dbb53d1793ecc9cb623f96418566029.tar.gz
rails-fb8428fe0dbb53d1793ecc9cb623f96418566029.tar.bz2
rails-fb8428fe0dbb53d1793ecc9cb623f96418566029.zip
If using svn 1.1.x and no REVISION is specified, give an error message
to the user suggesting they use REVISION. References #4450 Closes #4569 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/tasks/framework.rake11
1 files changed, 9 insertions, 2 deletions
diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake
index 097253b810..034d26ef49 100644
--- a/railties/lib/tasks/framework.rake
+++ b/railties/lib/tasks/framework.rake
@@ -35,12 +35,19 @@ 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` rescue nil
+ svn_version = `svn --version -q` 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"