diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/options.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index b16432da18..55b1a4d7ae 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Better svn status matching for generators. #2814 [François Beausoleil <francois.beausoleil@gmail.com>, Blair Zajac <blair@orcaware.com>] + * Don't reload routes until plugins have been loaded so they have a chance to extend the routing capabilities [DHH] * Don't detach or fork for script/server tailing [Nicholas Seckar] diff --git a/railties/lib/rails_generator/options.rb b/railties/lib/rails_generator/options.rb index 5a0aa9f59c..df9737f13f 100644 --- a/railties/lib/rails_generator/options.rb +++ b/railties/lib/rails_generator/options.rb @@ -127,7 +127,12 @@ module Rails opt.on('-q', '--quiet', 'Suppress normal output.') { |options[:quiet]| } opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |options[:backtrace]| } opt.on('-h', '--help', 'Show this help message.') { |options[:help]| } - opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') { options[:svn] = Hash[*`svn status`.collect { |e| e.chop.split.reverse unless e.chop.split.size != 2 }.flatten] } + opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do + options[:svn] = `svn status`.inject({}) do |opt, e| + opt[e.chomp[7..-1]] = true + opt + end + end end end |