Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7858

Show
Ignore:
Timestamp:
10/13/07 14:17:54 (9 months ago)
Author:
minam
Message:

When Subversion#query_revision fails, give a more sane error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/CHANGELOG

    r7857 r7858  
    11*SVN* 
     2 
     3* When Subversion#query_revision fails, give a more sane error [Jamis Buck] 
    24 
    35* Don't run the upgrade:revisions task on non-release servers [Jamis Buck] 
  • tools/capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb

    r7694 r7858  
    5353        def query_revision(revision) 
    5454          return revision if revision =~ /^\d+$/ 
    55           result = yield(scm(:info, repository, authentication, "-r#{revision}")) 
    56           YAML.load(result)['Revision'] 
     55          command = scm(:info, repository, authentication, "-r#{revision}") 
     56          result = yield(command) 
     57          yaml = YAML.load(result) 
     58          raise "tried to run `#{command}' and got unexpected result #{result.inspect}" unless Hash === yaml 
     59          yaml['Revision'] 
    5760        end 
    5861