diff --git a/CHANGELOG b/CHANGELOG index 72dd1bd8..fd17855b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* When Subversion#query_revision fails, give a more sane error [Jamis Buck] + * Don't run the upgrade:revisions task on non-release servers [Jamis Buck] * Fix cap shell to properly recognize sudo prompt [Mark Imbriaco, barnaby, Jamis Buck] diff --git a/lib/capistrano/recipes/deploy/scm/subversion.rb b/lib/capistrano/recipes/deploy/scm/subversion.rb index 8b1d69db..4de260ff 100644 --- a/lib/capistrano/recipes/deploy/scm/subversion.rb +++ b/lib/capistrano/recipes/deploy/scm/subversion.rb @@ -52,8 +52,11 @@ module Capistrano # executed (svn info), and will extract the revision from the response. def query_revision(revision) return revision if revision =~ /^\d+$/ - result = yield(scm(:info, repository, authentication, "-r#{revision}")) - YAML.load(result)['Revision'] + command = scm(:info, repository, authentication, "-r#{revision}") + result = yield(command) + yaml = YAML.load(result) + raise "tried to run `#{command}' and got unexpected result #{result.inspect}" unless Hash === yaml + yaml['Revision'] end # Determines what the response should be for a particular bit of text